text:
Why is Android refusing to resolve DNS records pointing to internal IP addresses?
I have a very strange behavior on an Android device (Nexus 7) when trying to access local network applications. Instead of getting the actual IP of the machine on LAN, the Android device gets the public IP, which means that Chrome, Firefox or any other browser simply shows the web page of the router.
I have an internal DNS server which handles the local networks. Doing ping from a PC works correctly:
$ ping s.pelicandd.com

PING pelicandd.com (192.168.1.15) 56(84) bytes of data.
64 bytes from front.pelicandd.com (192.168.1.15): icmp_seq=1 ttl=64 time=0.524 ms
64 bytes from front.pelicandd.com (192.168.1.15): icmp_seq=2 ttl=64 time=0.578 ms
^C

On an HTC One device (accessed with adb shell), it works well too:
shell@m7:/ $ ping s.pelicandd.com

PING pelicandd.com (192.168.1.15) 56(84) bytes of data.
64 bytes from front.pelicandd.com (192.168.1.15): icmp_seq=1 ttl=64 time=2.56 ms
64 bytes from front.pelicandd.com (192.168.1.15): icmp_seq=2 ttl=64 time=27.8 ms
^C

However, this is what I get when doing the same ping from Nexus 7:
shell@flo:/ $ ping s.pelicandd.com

PING pelicandd.com (90.78.26.42) 56(84) bytes of data.
64 bytes from LFbn-1-2441-42.w90-78.abo.wanadoo.fr (90.78.26.42): icmp_seq=1 ttl=64 time=2.56 ms
64 bytes from LFbn-1-2441-42.w90-78.abo.wanadoo.fr (90.78.26.42): icmp_seq=2 ttl=64 time=8.63 ms
^C

Instead of resolving to the internal IP, it resolves to the public one.
The network configuration is—except the IP address of the device—exactly the same on both devices: IP settings are set to Static, and DNS servers are the internal ones. Both Android devices are connected through Wi-Fi (unlike the PC). A major difference, however, is that Nexus 7 is using Android 6.0.1, while HTC One uses Android 5.0.2.
There is no nm-tool, dig or nslookup on Nexus 7. The device is not rooted.
The problem existed since I bought the device a few weeks ago, so it could hardly be the issue with DNS cache.
What can I do to further inspect this issue?

First of all You must of course inspect problem. So please install IP Tools from Play Store, make some nslookup`s and so on and than we will know more. Especially DNS server Nexus use, DNS lookup and so on. Try this IP Tools. It is in Polish language but of course You can change it.
This tool I use in case of such problems.

Hm. In IP Info, it displays the correct DNS addresses. In DNS lookup, the correct IP is shown (192.168.1.15). However, Traceroute tab shows the wrong public IP (90.78.26.42).

So - in my opinion - there is something wrong with internal DNS entry for Nexus. I use simmilar configuration and everything works OK

Internal DNS works fine on my Nexus 6p, Nexus 5, Nexus 10, etc. Have you tried flashing factory images to the Nexus 7 (if its bootloader unlocked) to make sure it's running known-good software? (I presume you got it used, since the Nexus 7 is not a new device).

I bought it second-hand, but I did a reset before using it, followed by the upgrades up to the latest Android version. I imagine this is enough to ensure it is not running any custom software, given that the device is not rooted.

I had to revert to using c-ares (https://c-ares.haxx.se/) built for Android, instead of Android's built in DNS resolver.  Using c-ares, you can even, perform lookups of host names without a search domain attached on local networks.  (e.g.,  mycomputer, instead of mycomputer.local.tld)

We recently encountered this issue, and we narrowed it to occurring ONLY on devices running Android v5 and newer.  Android v4 and all other OS's have no issue.
With that tidbit, we determined that Android v5 and newer insists on using IPv6 for DNS name resolution.  (Since we've completely disabled IPv6 on our network, this jibes with the issue.)  If Android v5(+) can't get an IPv6 response from local DNS, then it reaches out to Google's public name host (8.8.8.8).  Hence, no internal DNS, just external.
We worked around the issue by creating DNS records on our public-facing DNS servers for select internal names and IPs.  With that done, Google's public DNS could resolve these internal names with internal IPs, and the devices could then reach our internal hosts.
We're proceeding with fully enabling IPv6 on our internal DNS servers (domain controllers) as a permanent fix.
=========================================
UPDATE--
Well, it turns out this may be a total red herring...or not.  My home network is Win2008R2, single-domain with DHCP and DNS and no IPv6 binding.  Tested an Android v5 device from there and had NO ISSUE.  Office network with issue is Win2012 (non-R2), single-domain.
Bypassed current office WAPs with stand-alone Linksys WAP and separate SSID for testing, issue persists.
Differences between office and home networks (that I can think of):
 - Windows version - 2012 vs. 2008 R2
 - router model (Cisco vs. Linksys)
 - WAP model (Dell-branded Aruba Networks vs. Linksys)
Proceeding with whatever further testing I can think of for narrowing the issue.  Any suggestions or input is extremely appreciated!
=========================================
PROBLEM GONE (?!)
Our issue seemed to disappear on its own following a network topology change that I wouldn't think was related, but here's the info in case.
(HUGE APOLOGIES for this long, drawn out story, but this is when our Android issues disappeared, so ride this out if you can.  I'm probably providing WAY too much detail here, but because I can't see a direct connection, I'm laying it all out exactly as it happened.)
Our ISP is Comcast Business Class—a cable modem with a static IP block of five addresses (weird number but that's how Comcast sells them).  Comcast's cable modem is essentially a combination modem/firewall/router/switch, with our static IP block remotely programmed into it.
For 10+ years and almost as many employers, I've always built office networks the same way:
Configure a LAN IP for the ISP modem/router, which NAT's traffic from the internet.  Couldn't be simpler, and that's how my current office network has been configured for four years.
Recently our office internet service went down.  Usually a modem restart corrects it, but when it didn't we called Comcast who sent a tech, who replaced the cable modem to restore service.
A few days later, the same thing happened again.  We called again, and the onsite tech (different tech than before) attempted to replace the modem again, this time with a newer model.  Surprisingly, the newer cable modem did not support changing the LAN subnet address.  The default subnet is 10.1.10.0/24, and it cannot be changed.  (Only the 4th octet was configurable.)  As our office subnet is 192.168.100.0/24, I let the tech know we couldn't use it without being able to change the LAN subnet.  He understood, but had no info as to why the cable modem would prevent the change.  So he installed a replacement modem of the same model as before, which we configured identically, and internet access was restored.
Another day or two passes, and the service goes down again.  This time when I called Comcast, the initial tech I spoke with asked detailed and knowledgeable questions about our network configuration.  When I explained that the cable modem was configured with a LAN IP on our subnet, he seemed puzzled by this.  He said that most Comcast customers connect a NAT'ing router between the cable modem and LAN rather than use the cable modem's NAT'ing.  In fact, he said he wasn't aware that the cable modem supported NAT'ing.
Comcast sent out another tech with a brand new cable modem (latest model that doesn't support changing the LAN subnet).  He did extensive testing on the existing modem, and finally determined that it was only passing IPv6 traffic—no IPv4.  He also confirmed what the phone tech had said--that it's recommended to use a separate router for NAT'ing, and to not change the LAN subnet on the cable modem (which we can't do on the newer modems now anyway).
And now we finally come to the network change we made.  I installed a simple LinkSys router between the cable modem and our core router, configured with our static IP on the modem side, and a LAN IP on the inside.  Internet service was then restored, and has remained stable for some time now.
After internet service was restored, I thought about the oddness of the IPv6 issue with the cable modem, which in turn reminded me of the Android v5 issue.  I then tested our Android devices in the office, and was stunned to see that the DNS issue was no longer occurring.
Adding the LinkSys router for NAT'ing is the ONLY NETWORK CHANGE WE MADE.  Coincidence??  Possibly, but it just seemed a little peculiar that both were related to IPv6.
Anyway, sorry again for the long story, but our Android issue is gone.  Make what you can out of it.
Dimarc67

Indeed, this should be the cause in my case as well, since, similarly, I don't use IPv6 internally. I circumvented the DNS issue by creating a local VPN server and asking the Android device to use VPN instead; it works, but it's obviously too drastic.

@ArseniMourzenko Did you ever resolve this issue?  I have literally wasted two days of doing nothing else but trying to fix this problem, as it has literally broken a lot of what was previously working. And yes, I tried a VPN but it reduced transfer rate from 100Mbps+ to about 20

@Michael: since my local DNS servers are configured to only support IPv4, Dimarc67's answer was relevant for me (this is also why this is marked as the accepted answer). From there, I just set up a VPN for all Android devices, and I'm happy to use it since then. I haven't noticed any reduction of transfer rate—not would I care, given how I use mobile devices. For what it's worth, I'm using OpenVPN on Debian server-side, and OpenVPN Connect on Android devices.

I came across this post while trying to get my Android 6.0 device to use the locally configured DNS server to resolve local hostnames.  One answer above indicated that Android 5.0 and newer insists on using IPv6 DNS servers. This was the clue that lead me to my solution.
My router was advertising the IPv6 DNS servers provided by my ISP using DHCP-PD.  I reconfigured my router to stop advertising the IPv6 DNS servers and now the Android 6.0 device is resolving the local hostname using the IPv4 DNS server provided by DHCP (IPv4).
I also have a DNAT to redirect all DNS queries (TCP/UDP port 53) to my local DNS server.  This was in place before disabling the router advertisement with IPv6 DNS servers so I don't know if Android 5.0+ falls back to the Google DNS servers (as claimed in the previous answer) and I caught them with my DNAT rule or whether my Android 6.0 device just used the DHCP assigned IPv4 DNS server.  Either way, the local hostname resolution is working now.

Disabling IPV6 on my router fixed the issue on ALL of my android devices!

I was finally able to solve this by setting up a DHCP server myself on the same network, which configures the correct Search Domain to send to the clients.
Once I had a dhcp server, in my case isc-dhcpd with the configuration in dhcp.conf:
option domain-name "myrealdomain.tld";

Android was able to resolve local A-records set in my DNS server.


text:
Android 6.0 Website doesn't render Mobile View LG G4
I got a brand new LG G4 H815 Running Android 6.0. I've searched everywhere with no answer to the issue I'm facing.
For some reason, Mobile View in either Chrome, Firefox, Stock Browser, WebView doesn't render properly the website. i.e: This is what I see using Chrome:

Now, If I activate Request Desktop Site, it works like it should

This is getting really annoying as I'm unable to use the phone as it should, every app that uses WebView doesn't render properly.
Any ideas?

Make sure all your apps are updated.
It looks like <meta name="viewport" content="width=device-width, initial-scale=1.0"> gets deleted and your browser renders page as if it's for PC (while stackoverflow determines when to serve PC/mobile version by User-Agent, not screen size). I'll suggest connecting via WiFi (or other carrier SIM card) or restoring the phone to factory settings.
You can check what is wrong with this short guide to Chrome debugging (based on the one I wrote for this answer):

download Google USB Drivers & ADB on your PC
plug your phone in
run adb devices, it should say your device is unauthorized
on your phone, you will get a window, select "Always trust this computer" and Yes
open Chrome on both your PC and phone
on PC, open Developer Tools on any page (f.e. about:blank)
select (hamburger)->More tools->Inspect devices...
make sure USB is checked
your device should appear on the left
open StackOverflow on your phone
on PC click on your device and select Inspect on your working tab
reload the tab

Then check for errors (maybe you get 500s because of Adblock-like app on your phone?) and if none, open <head> tag and check if you have following lines just below <link rel="stylesheet" ...> tags:

You can also provide report from http://amibeingtracked.com/ (even if said site doesn't wish to work for me).

source: Stack Exchange

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

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

sort: votes


text:
How to set MTP mode on phone with broken screen in USB charge-only mode
My phone’s screen broke from a 30 cm drop. The touchpad is dysfunctional while the display itself still works (i.e. I can see everything).

USB mode is charge-only, so connecting to the PC is not working (./adb devices yields empty results)
Developer mode is enabled, USB debugging is enabled
A MicroUSB to USB (OTG USB) cable is available, I can control the phone with a mouse
Phone is a LG G2 with Android 5

Now since the USB mode is charge-only, I cannot set the mode to MTP because I can't control the phone while it is plugged into the computer.
How can I switch to MTP mode or have my computer recognize the phone so I can retrieve data from it?
(I guess I could just move the data I have on there to a cloud storage, but I prefer to do it via computer)
(Honestly, not being able to set the preferred USB mode without a active USB connection is a pretty big design flaw for scenarios like this. It would be so simple.)

As it's still Android 5: Try switching that via OTG with your mouse (while not connected to the computer, obviously): Settings › Storage, tick the menu (3 dots), check if you can switch the USB mode there (screenshot – see Disabling MTP/PTP/all USB stuff except charging).

@Izzy That bugged because there is not an additional menu (i.e. the three dots) in the storage screen. Also, it reads Storage Management.

Unfortunate. Have you already checked with our broken-screen tag-wiki, especially with its data recovery section?

I have the exact same problem with a friend's phone, with the addition that it doesn't support OTG, so I can't connect a mouse or keyboard to navigate to switch on MTP...

Probably its too late. I had exactly the same problem and i used a Bluetooth keyboard with a touch pad / a Bluetooth mouse should also work. Use the OTG to connect the Bluetooth device then disconnect the OTG. Connect it to the Computer and you can change the mode with the Bluetooth device.

this is probably an old question, but if you can still see the screen, download a "Remote control" program, such as Teamviewer. you can use your mouse via OTG cable, turn on TeamViewer App [or whatever], connect via the PC you're going to be using and download/run the remote control program [Teamviewer]. connect to your phone, make sure it's all working, then move your phone from the OTG cable to desktop. use Teamviewer to switch the mode over to MTP and you're good to go.

not to mention you could use a remote desktop such as teamviewer to do the file transfer as is without the phone being connected via cable.

Thank you for documenting that. By the time I got a new phone and managed to reset the one in question.

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


text:
Can't install app (Error code: -26)
I am trying to install Lost Android and Wheres My Droid but I always get this error on both apps:

I have sufficient free space and have installed other apps so that's not an issue. I am using custom ROM MIUI 4.4.18.
I found this page having similar issue. They suggest manual apk install which works but updating the apk results to the same error on Google play.

That seems to be a MIUI-specific error. From the Locus Map help (translated by me):

This error occurs with Xiaomi devices, but has nothing to do with Google Play Store. Error -26 is caused by MIUI's package manager and stands for INSTALL_FAILED_SYSTEM_INCOMPATIBLE. Which means: for some unknown reason MIUI thinks the app is incompatible, and refuses to install it.
Solutions:

Try to install an older version of MIUI which is compatible with the app and doesn't block the installation.
Then disable automatic updates Aktualisierung of MIUI
Alternatively just wait until there's a newer, bug-fixed version of MIUI

Also, additional to your find, there's a thread on MIUI forum, which – surprise! – says almost the same. Dated 2014 (ouch).

Funnily, the same error -26 is also reported for the Samsung Galaxy S3 on Sprint. Folks here seem to have been more lucky. One user reports the following procedure as being successful:

Go to Application manager and find Google Play Store, Erase the cache and data. Then go to Accounts and remove the account associated with the google play services. Restart your phone phone and add the account back.

So if the latter doesn't work, I'm afraid you've to check that with MIUI. I wonder if it really takes them 2 years to get it fixed.
PS: What strangely seems to work is opening the downloaded .apk file using a file manager. Though that should just be an interface to the pm install command (which is also used indirectly by adb install) which did not work out when used directly.

Thanks for this research. The latter didn't work :(

Sorry to read that – though after your mentioning of MIUI I expected as much. Seems to be a bug in the MIUI package manager we can't do much about unfortunately. Not sure how you've tried the manual APK install, as there are 2 approaches. From the PC: adb install *.apk. Or, after copying the file onto the device, directly at its shell prompt: pm install *.apk. Afraid that will invoke the very same MIUI installer – but there's a little chance at least the latter gets the "native one" (AOSP) to do the job. Worth a try at least – please let me know then.

I installed it manually by simply tapping the apk file inside my phone file manager. The installation went well but once I update it via GooglePlay the same error occurs. I tried the pm install *.apk method via terminal app but it gives invalid version error. For now I think I have to install the apk manually (by simply tapping apk file) on every app update in the future.

Which, basically, should invoke pm install in the background – providing a GUI for results. Strange. But as long as it works – it does work I take it? So maybe I include that with my answer?

pm install does not work, it does not install the app at all.


text:
Keep Pokémon Go from taking over audio
I like to drop into Pokémon Go while I'm out and about in the world. Trouble is that I'm usually listening to a podcast or some music, and as soon as I launch the app it takes over the audio, so that whatever I was listening to stops.
Of course, I have the settings for the app with music and sound effects off.
Is there a way to use the app while still listening to a podcast?

You could try using automation app like Macrodroid. Trigger would be Pokemon app launched, action would be muting various options (can't say which one for sure since i dont play Pokemon). Constraints would be your podcast app running

@beeshyams As I mentioned, I already have all of the sounds off in the Pokémon app. What would your suggestion accomplish?

I had seen that but suggested as I am not sure how the Pokemon app sends its sounds- media/music, notification are possibilities and can be muted - you would of course need to experiment. App is not available in India to try

I solved the problem this way:
When you listen to your podcast or music and launch Pokemon Go, the music stops playing. Go to your recent tasks, open your music/podcast app and start playing your music again. After that just open recent tasks again and switch over to pokemon go.
If your phone holds more than 1 app in RAM and is not killing them, this should work.

Good idea. Unfortunately, for me at least, when I do that the Pokémon Go app restarts each time. If I had to guess I would say that I don't have enough RAM to keep both apps in memory.

Dunno if it's the latest version of the app or I was just persistent enough, but this just worked for me.

... But if the app ever re-starts, it takes over the audio again. Until Niantic fixes things, though, this is as good as it gets.

...although, to be fair, it could simply be that my device doesn't have enough RAM to hold both apps in memory and so is "killing" the one that's not in the forefront.

I use Podcast Addict. If you go to their Settings then Player there is a checkbox under Experimental for "Ignore Audio Focus requests" this will allow the podcasts to play while playing Pokemon Go or most other apps.

Thanks for the idea, but I'm not inclined to change my podcatcher. This might be useful for someone else, though.

I feel your pain  I'm looking for the same thing
But I found a work around similar to above but doesn't require you to "leave" Pokemon go
Just swipe down from the top and click play again
If your music controls show up in the bag menu)l that is.
If it's not then add the music to the drop down using the Personalize options in the options
Of course it all depends on you phone + os version, but thats my least invasive workaround until I find another way

Thing is, they don't. For this particular scenario, Android was dumping the podcast app out of memory altogether. With other apps I'm able to do what you describe. Fortunately, Santa is bringing me a new phone with a lot more RAM.

I use an audio player that even loses its notification when I switch to Pokemon Go.
I found that a headset button press (wired or Bluetooth) will start my audio back up. The app I use does not get focus when this happens so I am still in Pokemon Go listening to my music.

i found by when in game swiping up from bottom of screen and selecting the nintendo icon in the bottom left screen; i had "mute media" on.  by turning it off it allowed me to keep audio playing while using Pokemon Go


text:
Removing Youtube app search history
I've got a problem with the Youtube app's search history. It contains only two entries and none of the searches done before or after are shown. The app doesn't save the new entries.
I tried removing both cache and data for the app, but that didn't help. The 2 entries are restored soon after I log in again.
I'd like to remove all entries, or make new entries show up again - I'm happy with either solution.

Delete individual searches
You can delete individual searches from your search history when you’re signed in with your account by following these steps:
1.Tap the search icon
2.Tap and hold a suggested search result with the history icon  next to it.
3.Tap Remove on the pop-up asking if you want to remove this entry from your search history.
Clear your entire search history
To clear search history for your account, go to Menu > Settings > Privacy and tap Clear search history.
Source: https://support.google.com/youtube/answer/57711?hl=en

That worked just fine for removing the entries. New entries are still not saved, but that's not a big deal.


text:
Samsung S4 won't charge from socket
I am looking for help before sending my phone to maintenance service.
All of sudden my phone stopped charging from a socket. The phone is charging (bolt showing, charging screen showing etc) but actually it won't charge at all. We tried different chargers (got originals from Samsung and HTC) and different wall sockets. Nothing helped. I was able to charge it from USB in a car and USB from laptop (of course instead of 2-3 hours to fully charge it took over 5 hours but it works.) Also charged it from powerbank.
I purchased new battery but still got the same problem so the glitch is not in battery or socket charger ... any ideas?

Did you change charging cables? Guessing you did but checking. Next you can back up data and do a factory reset and see if problem persists

Well it was one thing I googled, however not very thrilled to do that, but will try.

If factory reset or safe mode ( if your device has that option) shows same behaviour, IMO it requires hardware check

What is safe mode exactly?

See https://support.sprint.com/support/article/FAQs-related-to-Safe-Mode-on-your-Samsung-Galaxy-S4/WFAQ_542_GKB81861-dvc7300002prd.  It basically rules out third party or installed apps causing trouble

You can update your question with findings of safe mode behaviour instead of reporting in comments.

+1: I had a device with the same behaviour, and I never found out the reason.


text:
How to troubleshoot SELinux issues?
On standard GNU/Linux computers, SELinux comes with a set of tools allowing the administrator to troubleshoot permission issues.
Such tools allow to:

Temporarily switch a single domain in permissive mode, thus reducing the security impact on the whole device compared to a global permissive mode (and yes, per-domain permissive mode is supported in Android's SELinux): semanage
List existing SELinux users, roles and categories (AFAIK categories are used for multi-users devices): semanage, seinfo, chcat
Query the SELinux policy: sesearch

I did not find any of these tools in my device.
Is there any equivalent or a way to install them?

Do not compare Android with GNU/Linux: the former is only inspired by the latter, and runs a Linux modified kernel, but Android is not Linux.

@DeathMaskSalesman: I know this, but SELinux remains SELinux, and the tools mentioned are all part of the SELinux core tools and not part of the GNU utils. There is no reason why SELinux core tools would not be available where SELinux is enabled, unless one wants to remove to end-users the control of their own platform (at least it is the only reason I can think of yet: we are meant to be consumers, not administrators).

Kudos for the last bit! As far as I know, there are only three commands connected to SELinux that are available on Android: selinuxenabled, sestatus and setenforce. You may also have chcon and runcon.

@DeathMaskSalesman: A complete list of commands provided by the original SELinux for Android and available by default is available on SELinux website. I don't think there is any plan to add more and if no intermediary took care of adding them, porting these commands will therefore be up to the users community. The point is I don't know if there is already such project.

As I feared, Google is against letting people tweak SELinux. This is stated explicitely in the Android Compatibility Definition Document:

SELinux or any other security features implemented below the Android
  framework:

[...]
SHOULD NOT be user or developer configurable.

However, the good news is that there is indeed a FOSS project porting SELinux tools to Android: setools-android. This tools ports the usual seinfo and sesearch commands as can be found in the upstream SELinux Tools project, but it also adds the sepolicy-inject command which allows to modify the current policy or set a domain in permissive mode.
This however suffer from a big issue: unlike on standard computers, modifications made to the /sepolicy file which stores SELinux policy are not persistent and will be lost upon device restart.
In fact, this file as part of the root directory is stored in a RAM disk image which, in turn, is stored in the device's boot image and extracted during the device's boot sequence. To apply permanent modification to this file it is therefore necessary to modify the version stored within the device's boot image.
While the operation may still be possible from the device itself (as far as I know SuperSU for instance updates the boot image as part of its installation procedure), for my use-case I find it more convenient to do the operation from an external computer connected to the phone (here is my detailed procedure). Tools running on the device still remain useful though when frequent checks and updates of the SELinux policy are required (typically during development stages) and for automation (if a project needs a SuperSU-like installer for instance).


text:
Apps crashing after updating Lenovo A2010 to Android 5.1 Lollipop
I updated my Lenovo A2010-a to the latest version (Android 5.1): I just clicked on a message that says "You have a new update. Update has downloaded and can be installed" then it opened a new window. On that window, I click on the button "install", then the phone rebooted and was updating (showing a green Android icon). The battery was in normal condition (not low). After that, the phone booted normally.
After updating, I have an error on all applications installed on my phone. Error for all applications in one separate window, one after one. With text like this (translated from Russian to English)

Error in application "Google Keyboard"

What I can do to resolve that problem?

In the end, I came to the Lenovo site and chose to chat with the tech support.
They say:

You need to reset the phone to factory config.

That's all.

That's not restricted to Lenovo. Those people in 1st level support are no "techies". They've got a list with known issues like "case X: do a". As it is with case statements, they have a "fallback" if none of the "named" conditions matches. With smartphone 1st level, that's always "default: do factory-reset; if that doesn't solve it, have the device sent in". So to decide whether your post is an answer: did a factory-reset solve the issue? Side-note: I've recommended "wipe cache and Dalvik". Can't be done with stock recovery and no root without doing a factory-reset.

Thank you, Izzy! But I already reset my phone to factory config. :) Now it working fine.

I expected as much. Basically this confirms what I suggested with my comment on your question. I will convert that comment to an answer for others to benefit from.

Some background
While Lenovo suggested doing a factory-reset (which always is the last-resort you get by support hotlines before they have you sent-in your device), this would have been easier to resolve (without data loss) – provided either your device is rooted, or you have a custom recovery available:
Whenever you switch to a different ROM, or upgrade/downgrade to a different Android version, it is recommended to wipe your cache and Dalvik/ART cache. Background is that different ROMs/Android-versions use different versions of the Dalvik/ART engine which might have (subtle or not-so-subtle) difference in structures – so when the "new version" accesses structures of the "previous version" which it doesn't understand, it leads to problems as described in the question.
For OTA updates provided "the official way", the responsibility to take care for that lies in the vicinity of the provider: Their update script(s) running on a level having access to both, and thus should take care to wipe cache as well as Dalvik/ART cache when needed (so blame them if they didn't).
If you flash a custom ROM, this task lies in your vicinity – as the "ROM cook" cannot know in advance if you're flashing it over a different ROM/version. Installation instructions for those custom ROMs usually include that step.
TL;DR
If you happen to be in the situation as described in the question, but don't want to root your device or install a custom recovery, you can either perform a factory-reset (WARNING: all your data and the apps you've installed are lost then, so take care having a good backup at hand) – or you can *boot (not install) a custom recovery once to wipe cache and Dalvik/ART. One recovery usually supporting that is twrp:
There's a guide to install TWRP on the Lenovo A2010 which includes a link to download TWRP for this device (Note: I cannot vouch for the safety of those sites or integrity of the download – so better check yourself for a reliable source, or verify this one).
Once you have the TWRP image file, you also need the fastboot tool on your computer. Boot your device into bootloader mode, then run fastboot boot twrp.img (replace twrp.img with the name of the .img file you've got). Now your device will boot up into TWRP. Select to wipe cache and wipe Dalvik/ART, let it perform the action, then have it reboot normally. TWRP will be gone from your device, and everything should be "back to normal" – while no data have been lost.

I've just recovered from this issue by removing all updates of Google Play Services. The procedure is quite tricky, since "Application stopped working ..." messages keep popping up. But after you confirm about the first 20 popups, they pop up more slowly and it is somewhat possible to navigate through menus.
Open Settings from the device pull-down menu, select Applications -> All -> Google Play Services -> Remove all updates (it may ask for deactivating device manager, confirm deactivation). Wait for the uninstallation to proceed, then long power button press -> Reboot. Upon next boot you should see "Optimizing application x/n", it takes a while, but the phone should be usable again.
Then you should upgrade Google Play Services and reboot again to have a fresh version.

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


text:
Facebook links keep opening inside the app
In my facebook app I have checked the option to open links externally, but some links still open internally. Is there a way to stop this? ALL links must open externally. Version 87.0.0.7.78, if that makes any difference.

Are you referring to the instant articles? If so they can only be displayed in app (however, after opening one, press the share button [top right] to open in in your browser).

No, not just the instant articles. Some links open externally like they are supposed to, and some do not.

Then I have no idea, have you tried clearing app data then uninstalling (make sure you clear data first)?


text:
Android Intent problems
So a few days ago I build an update for my custom android car tablet with my own launcher (based on nexus 7 2013). I added a few new features and some fixes, and I added accidentally the device admin permission together with the install packages permission.
After the update was installed on the tablet, the device opened always the Android for work app when clicked something which should start an external app (like Spotify or Maps). I thought it might be something with these permission and I deleted them and reinstalled a new version of the app (not updated!), but it didn't worked, it still started the Android for work app.
Then I uninstalled the Android for work app, and now the google now app started. After uninstalling it too, the settings app keep launching?!
Has anyone an idea why this is happening and what I can do to get rid of it?

We can't help, since you yourself built the software. Development questions are off-topic.

No it is stock android and the app does nothing than launching normal intents. And these intents are normaly working in another activity, but in this specific one, android interups it and opens it own apps, because of that I think it has something to do with android it self. But if you say it shouldn't be here I can also post it on SO

Honestly, I'm not sure if we can answer this question here. Certainly it looks strange that there's a certain app that's always run when you launch an Intent, but since this is related to your own app/update, I'm not sure we can debug it without any code or more hints (however, it's off-topic here due to development-related). You could try [so], also try to explain the case as detailed as possible (like, what modifications you've applied) since I think it's a bit too broad as of current writing (debugging issue is off-topic on SO).

Not a development question, it could be an apk installed from outside the play store and have the same behaviour, in which case it would be an appropriate question, so this is too.

Try:

Restarting
If you can (i.e. phones bootloader is unlocked):
Try clearing the cache and 'davlik-cache' (By installing a custom bootloader
Deleting the offending app using adb (the same software you use to put the app you wrote on there)

Ok did everything before and did it also right now again, but it is still not working

You deleted the app and cleared both caches?

exactly, and i removed any file that has something to do with the app

That is very strange, because I would expect clearing both caches systemwide to deal with it, in which case I can't think of anything else but a factory reset

Are you sure you went into bootloader and cleared all caches?

@ollie299792458 Maybe you meant Recovery?

@DeathMaskSalesman possibly, both work, you can overwrite the cache images using a pc in bootloader (which he has as he has been developing apps).

Ok it came out that for some reason the package name for the packagemanager which gets the intent was empty and therefore android starts the settings app as a fallback(?). But anyways it is now solved! Thanks for anyone who helped!


text:
Is it possible to change Device's location?
I want to change my device location (lat,lang, etc) to a different place. I don't want to mock. I want it to function like If I open Google Maps, it points to my desired location not the real location.
Is it possible?
If yes, does it require root?
Suggestions are welcome.

No mock locations? Requires root. Easiest would be any of the GPS spoofing apps using Xposed but there are many out there that only need root acess.

Yes You can do it if you have root access first you must Download the FakeGPS the link for the one i suggest is Download Form Here and Change Location Mode to Device Only(preferred) and turn on Mock Location from Developer options
and set the location in the app this will spoof the GPS and its Working Fine !! :)


text:
Is it possible to resize gallery thumbnails?
I want to reduce the thumbnail size of the videos in Gallery.  Is there a way to do this?

You mean how large the preview image appears within the Gallery app?  Or how large the cached thumbnail image is?  Or something else?

I meant the size of the preview pictures. More specifically, I want to see more thumbnails per screen regardless how this is achieved. For example, it shows 10 thumbnails per screen on my tablet. I would like to see at least 20  per screen.


text:
Cannot create Symlink via adb
I try to create a symlink for a folder using adb. This is my attempt:
ln -s /storage/sdcard0/Android/media/com.amazon.mp3 /storage/sdcard0/mp3amazon

My device is rooted and as you can see this is the internal SdCard. not the external, so there should be no file-system-issues.
But all I receive for that command is a

ln: /storage/sdcard0/mp3amazon: Function not implemented

Have to answer myself (though this isn't a solution).
Android 5.0 Lollipop uses "Fuse" as file system which does not support SymLinks

And if it would, still the underlying filesystem could be fat, that wouldn't allow it, depending on if the symlink would end up in a fat partition...

@StefanHegny I was expecting the good old "ext" for the internal file system.


text:
How often is Google Location History updated?
How often does Android Location Reporting send an update to Google Location History? Is the reporting interval customizable?

After a bit of research this is what I was able to find.
"Each time the phone was within range of a Wi-Fi access point, it would send its MAC address and SSID to Google’s servers. Using GPS (when available) and cell ID data, it can locate where that Wi-Fi access point is, which is then collected and stored to create the history you see on the map."
Keep that in mind with my personal experience of seeing it update as often as every single minute!
I do not believe configuration of the frequency is adjustable.
I hope this helps!


text:
my phone froze over night (i have a galaxy s7) and is on a black screen
I woke up and my screen is black but the green charged led is on and my phone is no longer plugged in. I've tried multiple things to fix it such as holding the power button, holding volume up and the home and power, I've let it sit for an hour off the charger, I've tried to connect it to google play.... i'm not sure what I should do any help would be appreciated.

Have you tried recovery mode? Usually, volume down and the power button will boot you into recovery. Other than that, there's plenty of ways to reboot your phone with adb. adb shell reboot -p
Adb shell reboot-p

will set you straight I believe
Edit: this will only work in the case of a frozen phone. If its off and won't turn on at all, and recovery mode won't work, it may be hardware related


text:
How to simulate no GPS fix
I wonder if there is a way to simulate NO GPS signal without going in the basement. As if you were inside a tunnel or under the earth surface. I am not talking about location mocking. I wonder if we can leave the GPS turned on but prevent application from getting a GPS fix.

You want a Faraday cage. There are do-it-yourself instructions for making one out of aluminum foil. You can also approximate one by trying prebuilt metal boxes like microwave ovens, metal filing cabinets, or refrigerators. Just put your device inside to see whether it blocks the GPS signal.


text:
How to undo forced stop app in Android
how do I undo a forced stop for google play services.  I tried rebooting but it did not clear the forced stop.

You can't. Google Play Services will be rerun when it's needed, you don't/can't manually run it.... or, did you mean the "Force stop" button is disabled? You can't manually force stop this service either.


text:
How to open password protected ODT file using LibreOffice
I have a Samsung Galaxy Tab A.  LibreOffice is installed and ODT file is loaded into document folder.  This file is password protected and I have the password.   So how do I open this file????

acejavelin:  This file was created with LibreWrite.  Have no problem  opening it in Linux  using any PC.   OpenDocument reader can't open it.  Asks for me to upload so they can look at it.  I won't do that, file has sensitive info.        LibreWrite when accessing it goes into a 10 sec loop and hangs.  Doesn't ask for a password...

It should prompt you for the password when you attempt to open it, if not, try OpenDocument Reader available in the Play Store... if neither can open it, it is likely a corrupt file.


text:
Whatsapp backup in Google Drive
Does Whatsapp backup in Google Drive differentiate with one Gmail account from 2 different devices with different Whatsapp account?

To be honest, it is quite straight forward how Google Drive back up work with WhatsApp.
For a WhatsApp account, which is tied to your phone number, lets say, you used abc@gmail.com as the Gmail Account to Store WhatsApp back up.
So, all your back up is now with abc@gmail.com. You should remember this Gmail Account and use this Gmail account to restore the back up of your WhatsApp Account.
Now, for Another WhatsApp account, which is tied to another number, you can use the same Gmail Account, in theory, which is abc@gmail.com, and you can restore the back up of this WhatsApp account using the abc@gmail.com
It really does not matter, which phone from where you are accessing the WhatsApp, as A backup file does not exist on the Google Drive account or locally on the phone.
You can read about the WhatsApp back up on Google Drive on Official FAQ page of WhatsApp.


text:
can I enable android on my device which is of Samsung Rex s3802?
I am trying to enable this on my device for an hour but nothing's working!

Very unlikely. The Samsung Rex 70 S3802 is a feature-phone with just 10 MB internal storage (even Android versions before 4.x required more than 200 MB just for the system stuff).
For reference, the same question was asked back in 2013 when this phone debuted: Can I make a Samsung Rex 70 an Android phone? – where all answerers came to the same result. I also very much doubt someone has written a ROM for it (hard to do due to the mass of proprietary hardware elements of the device, including its CPU), provided this background – so no ROM, no install.


text:
Stop video ads in apps?
This is not a question about blocking ads in apps - they're annoying but if I choose a free ad-supported app, it's right I should see ads.
But, some ads feature video - for instance one app I am forced to watch a 30s trailer to Finding Dory about 20 times a day. My main issue here is data usage; I'm worried it will eat my mobile data and even by broadband limits if I am using a MiFi device when travelling.
Can I have any control over what ads are played through Google Play apps? e.g. disable video-based ads?

Some apps will still work in Airplane mode meaning you can't get any ads through. Whether this works for the app(s) you're using I'm not sure. It may prevent the app working entirely.

Interesting idea. This is an online game (Scrabble) so I don't think it's an option but worthwhile trying on other apps.

Video ads pay more (for the app developer) than still ones, so they wouldn't offer an honest way to replace them. If you're going to cut into the app developer's income like this, you might as well just go all the way and remove the ads entirely.

I don't think there's a way to disable certain type of ads appearing on Android apps without using an ad-blocker.
The idea is to force users to switch to paid versions.
You may, however, choose between "personalised ads" or non, using Google account dashboard.
For me, using a VPN helps disable internet access to selected apps. This minimises to a certain extent, the number of ads I see. Also, some VPN compress most ads that I still have to see, so I save data that way, too.
I, personally, use Opera Max. There may be others, too.
But be careful, though. Some apps don't work without internet access.

It just seems irresponsible for an app to play video if someone is on mobile data... like FAcebook's auto-play videos which thankfully you can set to only work on WiFi (or not at all)... it seems this model is quite common so it's a bit weird the central ad service(?) does't follow this. In many scenarios I wouldn't have good enough signal for video anyway... what happens then?

I just watch the video and then check data usage on Opera Max, it usually saves at least 50%.

If you're rooted, you should consider using Lucky Patcher.
It's an app that allows you to change the make-up of an app, and allows you to re-install the app with those specifications.
For example: you can set it to remove all ads, and install an apk with no ads enabled. Now, this is not perfect, nor fool-proof, and wont work for every case. but its somewhere to start.
See this article for more information on lucky patchers ad blocking.

If I wanted to remove all ads I'd just pay for the ad-free version. I don't object to ad-supported free apps I just don't want to pay for the data used to display video ads!

thats why i suggest lucky patcher. it's app specific, meaning if there isnt a paid version to get rid of ads, and you're worried about it draining data, you can try to manually remove the ads from the app.


text:
How I can prevent my android phone from getting rooted?
Usually  people try to install a custom rom on a stolen android phone to erase all its data and identity.
Is there any way to prevent the thief from installing a custom rom or rooting it.

If a thief has physical access to your hardware, it's his.
You cannot prevent the thief from entering the bootloader or recovery and flashing your device.
What you can do is go to your local police department, tell them your phone has been stolen and you have the IMEI (it's on the box but note it down separately) and they should block any use of that IMEI.
No cellular connection will be possible with that device, it's merely a small tablet and all connection attempts will be logged with location of the cell tower, approximate location of the device and time.
After that, wipe your personal data using one of many different remote security solutions (like the Google Device Manager).
Also tell your cell provider that your phone has been stolen so you can get a new SIM (might need to pay for that) and to block any use of the old SIM card.
Also: Thieves usually just wipe the data and don't install a custom ROM (rooting is an option, though).

No brother, after stolen you cannot do any thing, for security purpose you can set strong password, always make a backup of your mobile data and note down your IMEI number somewhere and save it for further inquiry or install android device manager app in your android for online track and delete your data. or any other security related app. not more than this


text:
Cyanogen installs bloatware automatically
I'm using a OnePlus One, running Cyanogen OS 13.1 (build date June 16, 2016), stock, non-rooted.
I usually disable/uninstall all bloatware like a knee-jerk reaction.
But recently I've noticed that some of these apps re-enable or re-install automatically, namely Cyanogen One Note Plugin, Email by Boxer, etc.
How's this even possible? How may I disable/uninstall them permanently without rooting?

If the apps in question appears to be user-uninstallable but keeps coming back, they might be in /vendor and /system/vendor. But if they are only available for disabling, then they're real system apps.
Either way, you'll need to gain root to access and eliminate them. As you have pointed out, unlike CM, COS doesn't come with root, so it might pose a problem.

They're uninstall-able. Then they automatically install themselves later.

Then it should be the former situation. Try a root-enabled file explorer (e.g. Root Explorer) and see what's inside the 2 folders. Note that you don't need to have root to view the files.

You're right. I see in /system/vendor/bundled-app at least 10 such application packages.

The evil of COS and Cyngn as a corporate. Root and remove them if you want, or better, just install CM instead of COS. If you don't use these vendor apps bundled with COS then I don't see any advantages COS has over CM.

To clear your confusion, COS does not come with root. You may edit to update the answer and I'll accept it.

Thanks for notifying, all the more reason for me to avoid COS. Edited.

Cyanogenmod is root by default it just needs to be turned on. and its going to install apps that are part of the OS like a email service.

That's what I thought. :(


text:
I need help with my phone...this is urgent
i have a rooted phone.i recently tried download the modded play store but it failed resulting in my phone not having a proper google play store and google framework was buggered.i kept getting the 'unfortunately com.google.gapps has stopped' error so i decided to factory reset my device.once i put it on again for the initial setup,i got the same 'unfortunately com.google' message.i tried to finish the initial setup by constantly closing the message but only could get to the wifi part and it would get stuck and reboot right back to the initial setup.please help me with my issue...thanks
note:i have a rooted moto g(2015) and can still access TWRP

Unfortunately, you did this to yourself... flashing a "modified" gapps package that is not known to work with your device can cause unknown conditions. These packages are applied to the system, so a factory reset will not correct them
You have 3 choices to correct this:
1) Restore a previous backup from TWRP if you have one. If you do not, once your device is operational again I suggest maintaining regular backups in TWRP.
2) You can attempt to flash a known working Gapps package from OpenGapps. Make sure to select the correct Platform (ARM), Android (5.1 or 6.0 whichever applies), and Variant... The variant part will be the toughest, I would suggest using Mini, or possibly Full, as the stock Moto gapps fall somewhere in between those 2 packages. Remember to wipe caches/dalvik before rebooting.
3) The final option means a total factory reflashing using the stock images. Stock images and instructions for flashing can be obtained from XDA in the Moto G (3rd Gen) Factory Firmware Images thread. Be ABSOLUTELY sure you have the correct model and version for your device, flashing the incorrect version can have... umm... lets just say "undesirable effects". If this method is chosen, you can likely upgrade your device to Marshmallow in the process, but remember that you can go up in version with the factory images, but downgrading is not recommended.
One of these three options will correct the problem, as long as you follow the instructions properly. Again, this is another friendly reminder to backup on a regular basis and before making significant changes, it is easier to revert to a known working system that is a few hours, days, or even weeks old then to start from scratch.


text:
How to enter safe mode in lg g4c
I'm trying to boot my LG G4c in safe mode. I've tried 2 methods and none of them works.
1)Turn phone off and then hold power and volume down button until logo appears. Then release them and hold them back again. When I do this, the factory data reset menu appears with just yes an no options and no option for boot in safe mode.
2)Turn phone off and then hold volume down button. Nothing happens.
What is the correct way to enter safe mode ?
(at this point I'd like to add that I want to do this because my phone cannot boot. It only reaches the LG logo screen and the animation keeps playing forever, so I'd like to know if there is a way to do this starting from a switched off phone)

http://www.hardreset.info/devices/lg/lg-g4c/recovery-mode-and-safe-mode/

@keshav this is the exact article I read and it doesnt work. I don't want to do a factory reset. Just recovery mode

Post your edit (last para), my answer is meaningless to your situation but leaving it in case it helps someone else in future

Safe mode for LG G4C

Begin by pressing and holding the Power key unti the phone's options are displayed on the screen.

Afterwards select and hold Power off until "Restart in safe mode" is displayed.

Then tap Turn on safe mode in order to confirm the operation.

As far as I know you cannot initate safe mode from phone turned off state.

Thanks for the reply but phone won't boot so I would like to know if there is a way to do this from power off state and not from inside the operating system.

I have no idea what you're talking about. Can you be a bit more exlicatory?

From how it's described I think you're trying to enter recovery mode, not "safe mode" which is just booting up and disabling all 3rd party apps. In that case, attempt this one: enter link description here
I have no guarantee this works; after all, even though G4 and G4c are devices of a same generation, their hardware are vastly different. There shouldn't be any harm trying, though.
If even this fails, you might have to resort to download mode to do a full reflash of the phone.

No I am trying to get to safe mode. I will edit the question to get what I say about recovery mode out because I thought that recovery mode and factory data reset were different menus.


text:
What happens to the already existing internal storage memory if I make SD card my internal storage marshamallow
I recently bought a phone (Lava P7) and upgraded it to Marshmallow. I need more internal memory space so I thought to make SD card my Internal storage. My SD card is 16Gb and internal storage is 8GB if I make SD card my Internal storage, then
My internal storage memory become 16+8 24Gb or 16Gb
if 16Gb, where does the already existing memory goes?

Your total available storage will be 16Gb, including internal storage. Please see [tag:adoptable-storage] tag ( which has been added to your question) to fully understand)

Related: How does the “Format as internal storage” feature work in Android 6.0+? Quote: if you had a phone with 8GB of storage and a 32GB microSD card, you’ll only have 32GB of space for music, movies, games, or other files, not 40GB. Another quote: Where before you might only have had 10-12GB of storage available on a “16GB” phone, you could have around 70GB if you adopt a 64GB microSD card.

Let's say that 3 GB of your internal storage is used by the system, leaving you with 5 GB of usable space, and your SD card is empty.
Currently, you have 5 GB usable for apps (internal storage) and 21 GB usable for media (both the internal storage and the SD card).  Note that the media storage will still be divided between the two storage locations, which makes it hard to manage.  Installing apps/app data will reduce the available space for internal media, and vice versa.
Under adoptable storage, you will have 21 GB for apps (internal storage + SD card) and 16 GB usable for media (SD card).  Note that each app is either fully on the internal storage, or fully on the adopted SD card.  Installing/moving apps and their data to the SD card will reduce the available space for media on the SD card, and vice versa.
Essentially, your choice is: Allow media to also be on the internal storage, or allow apps to also be on the SD card.  (Plus, in the latter case the SD card will no longer be accessible when removed from the device unless decrypted.)  You cannot have both; both storage locations remain separate and are not combined into a single logical partition.  The only difference is what is "allowed" in each spot and how it can be accessed.
Please refer to this reddit post for more background on how this works.

Very Helpful great


text:
Backup creates basically empty file
I am very tired of all the Samsung bloatware imposed on me so I am trying to back up my data prior to rooting the phone and cleaning it up.
There are numerous claims on the internet that this is done using this adb command:
adb backup -apk -shared -all -system -f myBackupAndroid.ab

Some also suggested adding backslashes before spaces after the backup. That didn't affect my results, which is (basically) empty file:

This is pretty nasty trap set on anyone who doesn't double check the status of the backup, before doing something like factory reset.
Unless this is intended by android developpers, what did I do wrong? How to get actual backup of android data? I am using android 4.1.2 on Samsung GT-S7710 - which is Galaxy XCover 2 as I found by googling (they are too shy to mention product name in their OS release).

Your process is mostly correct, although here some general recommendations... after -f supply the full pathname to a file in your user directory, saving it elsewhere is known to cause failure. Always use a password when you backup and restore, the process has been known to fail without one specified. Word of advise though, don't trust an ADB backup, for some reason they fail, a lot, and often won't restore completely regardless of what you do. Best bet is to boot or flash TWRP/CWM and do a full nandroid backup, then save it off the device.

Well, but doesn't what you recommend require root permissions? Both of the acronyms you mentioned (which I googled) seem to have something to do with flashing roms and other scary stuff.


text:
How do I stop the "Unfortunately, Google Play services has stopped" message from popping up every three or so seconds?
Last night I had turned my phone off and on again because my data connection at the moment is pretty poor and I was trying to send a message to a friend through Snapchat. This had worked before, and worked this time too, except now there is a message popping every three or so seconds saying "Unfortunately, Google Play services has stopped." I have read another thread on this problem, and tried everything, but nothing worked. I would appreciate all and any help. :)

Try clearing the cache for Google Play Services and reboot.

@giucal I have the same problem, but clearing cache and rebooting didn't help.

I just had the same problem today. Clearing the cache of Google Play services didn't solve it for me. But clearing all data of Google Play Services, uninstalling its updates, rebooting, installing the updates back and rebooting seems to have made the problem go away.


text:
Where can I find my device's DPI?
I'm an android developer, and for that reason I have to find out how much DPI my tablet has. I looked through settings, device info and tried to google it but could not find anything clear enough. I'm looking for DPI, NOT PPI.
Looked through the default; Tests about it, but only PPI was mentioned. I really need the DPI.

Already tried the old-fashioned way (installing a Terminal emulator and issuing getprop ro.sf.lcd_density)?

no, but I managed to complete it using code


text:
How can I turn off data when my phone's screen is off and only let data come back on once per hour or so to sync apps?
I have been using an app called Doze which turns off data when my phone's screen is off. I'd like to find a way that would turn off data when the screen is off but would turn on data once per hour or so, sync all apps to get new messages, updates, etc, and then turn data back off. Is this possible or do I need to write my own app?
I found having the mobile data off more than doubles battery life.

Device is not rooted. I forget which doze app now. I just upgraded to 6.0 and the battery life is a lot better. I'll look up macrodroid.

If you need help with Macrodroid, ping after detailing what you have tried by editing the question. BTW Force Doze is good (available for root and non root ). I use it with Macrodroid for a different scenario

Android 6.0 (Marshmallow) introduced new OS features called Doze and App Standby to improve battery life. Doze defers data usage to short windows while the Android device is stationary. App Standby reduces the resource usage of applications that you don't use.
Personally, I found the battery life improvement from Doze to be tremendous. I often take my phone out of my pocket when I am not using it to keep it stationary to take advantage of the doze battery savings.

There is an app in the Play Store called Juice Defender which will do EXACTLY what you are looking for, although the time span for turning mobile data on and off is 15 (?) minutes and cannot be changed in the free version, you may have to upgrade to to Plus or Ultimate to get the exact time intervals you are looking for. It works well, at least the last time I used it which was probably the JellyBean era.


text:
Is it safe to remove "Google app" from android system completely?
I rooted my device and I removed some obvious bloat-ware, such as Cardio trainer (I bike to work, I definitely do not need that), some Google music, Google books, Google maps and many other Google XXX and Samsung XXX consumer applications.
Now, in second purge iteration, I'm looking at apps that are big but their purpose is not obviously blatant.
One of them is "Google app". The name isn't very informative. Does it manage my link between android and Google account? Or is it some search service? What is that app and what are the consequences of deleting it?

Sure you can iff the Google app has the "G" logo, it is just a search app. I am on a custom ROM, Cyanogen Mod 13 and it doesn't come with bloatwares or Google apps.

I have removed Google App on several Orignal stock ROMs without any problems. It provides a Search Bar and some other functionality which is not required for their other apps to function (Maps, Gmail, Store etc). It's a resource hog. I think in the future they will make it harder to remove it by making it integral part of their framework, but for now it's ok to get rid of it.

You can remove various Google apps, but you should refrain from uninstalling Android System Webview. Once you do that, Google setting, Gmail etc. will stop working.


text:
How to change the Brand and Model name of Yu Yureka Plus?
This is a very common question for the Android Community, but trust me, I tried almost everything to change the Brand Name and Model name on my Yureka Plus phone (running Cyanogenmod Nightly Build), but actually nothing worked.
Can anyone suggest any method which can perform it on my phone?
Here is what I tried:

I edited the build.prop in /system and changed ro.product.brand, ro.product.manufacturer etc. to samsung (original values-YU). And rebooted the phone, but then phone is not getting started. Stucks on the Logo screen.
Then I tried changing only Model name, and the same issue happened that phone got stuck on logo screen. Never gets boot-up.

Does anyone have solution for this, please help. Thanks.
Here is the original build.prop of my phone:
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=MOB30R
ro.build.display.id=YUREKA-userdebug 6.0.1 MOB30R 86209b5819 test-keys
ro.build.version.incremental=86209b5819
ro.build.version.sdk=23
ro.build.version.preview_sdk=0
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=6.0.1
ro.build.version.security_patch=2016-07-05
ro.build.version.base_os=
ro.build.date=Sun Jul 24 08:26:46 PDT 2016
ro.build.date.utc=1469374006
ro.build.type=userdebug
ro.build.user=jenkins
ro.build.host=cyanogenmod
ro.build.tags=test-keys
ro.build.flavor=cm_tomato-userdebug
ro.product.brand=YU
ro.product.name=YUREKA
ro.product.board=MSM8916
# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,
# use ro.product.cpu.abilist instead.
ro.product.cpu.abi=arm64-v8a
ro.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=armeabi-v7a,armeabi
ro.product.cpu.abilist64=arm64-v8a
ro.product.manufacturer=YU
ro.product.locale=en-US
ro.wifi.channels=
ro.board.platform=msm8916
# ro.build.product is obsolete; use ro.product.device
ro.build.product=YUREKA
ro.product.device=YUREKA
# Do not try to parse description, fingerprint, or thumbprint
ro.build.description=YUREKA-user 5.1.1 LMY49J YOG4PAS8A4 release-keys
ro.build.fingerprint=YU/YUREKA/YUREKA:5.1.1/LMY49J/YOG4PAS8A4:user/release-keys
ro.build.characteristics=default
ro.cm.device=tomato
# end build properties

#
# ADDITIONAL_BUILD_PROPERTIES
#
keyguard.no_require_sim=true
ro.carrier=unknown
media.aac_51_output_enabled=true
ro.sys.fw.dex2oat_thread_count=4
ro.config.max_starting_bg=8
ro.sys.fw.use_trim_settings=true
av.streaming.offload.enable=true
audio.offload.buffer.size.kb=64
audio.offload.gapless.enabled=true
audio.offload.min.duration.secs=30
audio.offload.pcm.16bit.enable=false
audio.offload.pcm.24bit.enable=true
use.voice.path.for.pcm.voip=true
ro.qualcomm.bt.hci_transport=smd
debug.composition.type=c2d
debug.mdpcomp.idletime=600
persist.hwc.mdpcomp.enable=true
persist.hwc.ptor.enable=true
debug.enable.sglscale=1
ro.opengles.version=196609
drm.service.enabled=1
vidc.enc.narrow.searchrange=1
ro.vendor.extension_library=libqti-perfd-client.so
ro.min_freq_0=960000
ro.min_freq_4=800000
persist.data.qmi.adb_logmask=0
persist.radio.apm_sim_not_pwdn=1
ro.telephony.call_ring.multiple=false
ro.use_data_netmgrd=true
ro.disableWifiApFirmwareReload=true
wifi.interface=wlan0
ro.hwui.texture_cache_size=72
ro.hwui.layer_cache_size=48
ro.hwui.r_buffer_cache_size=8
ro.hwui.path_cache_size=32
ro.hwui.gradient_cache_size=1
ro.hwui.drop_shadow_cache_size=6
ro.hwui.texture_cache_flushrate=0.4
ro.hwui.text_small_cache_width=1024
ro.hwui.text_small_cache_height=1024
ro.hwui.text_large_cache_width=2048
ro.hwui.text_large_cache_height=1024
ro.qc.sdk.audio.fluencetype=fluence
persist.audio.fluence.voicecall=true
persist.audio.fluence.voicerec=false
persist.audio.fluence.speaker=false
persist.camera.cpp.duplication=false
persist.camera.hal.debug.mask=0
persist.data.target=dpm1
persist.radio.multisim.config=dsds
ro.config.always_show_roaming=true
rild.libpath=/system/vendor/lib64/libril-qc-qmi-1.so
ril.ecclist=000,08,100,101,102,110,112,118,119,120,122,911,999
ro.telephony.default_network=9,1
ro.error.receiver.system.apps=org.cyanogenmod.bugreport
ro.rommanager.developerid=cyanogenmodnightly
ro.com.google.clientidbase=android-micromax
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html
ro.com.android.wifi-watchlist=GoogleGuest
ro.setupwizard.enterprise_mode=1
ro.com.android.dateformat=MM-dd-yyyy
ro.com.android.dataroaming=false
ro.build.selinux=1
persist.sys.dun.override=0
ro.cm.build.version.plat.sdk=6
ro.cm.build.version.plat.rev=0
media.sf.omx-plugin=libffmpeg_omx.so
media.sf.extractor-plugin=libffmpeg_extractor.so
persist.sys.root_access=0
ro.cm.version=13.0-20160724-NIGHTLY-tomato
ro.cm.releasetype=NIGHTLY
ro.modversion=13.0-20160724-NIGHTLY-tomato
ro.cmlegal.url=https://cyngn.com/legal/privacy-policy
ro.cm.display.version=13.0-20160724-NIGHTLY-tomato
ro.config.notification_sound=Argon.ogg
ro.config.alarm_alert=Helium.ogg
ro.config.ringtone=Orion.ogg
persist.sys.dalvik.vm.lib.2=libart.so
dalvik.vm.isa.arm64.variant=cortex-a53
dalvik.vm.isa.arm64.features=default
dalvik.vm.isa.arm.variant=cortex-a53
dalvik.vm.isa.arm.features=default
dalvik.vm.lockprof.threshold=500
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.build.expect.trustzone=TZ.BF.3.0.R2-00034
ro.expect.recovery_id=0x03b923ae91dc2249b4b7bd9e10ad2a7646f0fd13000000000000000000000000

What's the purpose of changing the brand and model name may I ask?

This means this CyanogenMod package is meant for multiple device models of the same codename, in your case, "tomato". CM automatically determines what model your device actually is and displays the corresponding model.
While I don't know how to manipulate that behavior, you can easily override that by adding a field to build.prop:
ro.product.model=MODEL_YOU_WANT_TO_SPOOF_AS

Save and reboot.
This is verified to work on my own CM13-running device (which also has the one codename VS multiple models situation), so I guess it'll also work on yours.


text:
SELinux restricting my system app even while it was signed with the same key as the previously shipped one!
Well, I have something weird going on. I was thinking fiddling around with Dotcase.apk from CyanogenMod 13, so I was able to rebuild the apk. I even made sure to sign it with the Platform Android test key (I checked, the original APK was signed with this exact same key! I extracted the CERT.RSA and compared the certificates - they are the same!).
Then I replaced the APKs in /system/priv-app/Dotcase, swapping the Dotcase.apk for my own built - basically the same as the shipped one, no code changed, just built by myself.
The Dotcase app is using UEventObserver and opening a "DEVPATH=/devices/virtual/switch/cover"
And this is where the problem arises. SELinux is giving me a headache with the message:
07-29 01:07:56.918  4902  4902 W UEventObserver: type=1400 audit(0.0:1229): avc: denied { create } for scontext=u:r:platform_app:s0:c512,c768 tcontext=u:r:platform_app:s0:c512,c768 tclass=netlink_kobject_uevent_socket permissive=0

after that the app crashes, taking with him com.android.systemui, with:
07-29 01:07:56.960  2558  4902 E AndroidRuntime: java.lang.RuntimeException: Unable to open socket for UEventObserver

while the same app with the same code and the same signature key is fine.
I tried some tricks which involves usage of something like supolicy from SuperSU, etc, to no avail - seems like the app (which boots as android:sharedUserId="android.uid.systemui") is starting before anything else is kicking in.
Now the questions:

What I did wrong?
How to fix it?
Is there maybe a possibility to disable SELinux completely by patching something in /system - at least for the time being while I'm fiddling around with it?
Or the only option is to built the whole cyanogenmod rom image with my changes each time I need to test a small change? :(

PS: device is HTC M9 GSM (himaul)

Well I found out that I messed up. I was building it with the wrong manifest. It should had been android:sharedUserId="android.uid.system" instead of android:sharedUserId="android.uid.systemui". When I compared the manifests (thank you apktool for decrypting the manifest for me!) it become obvious. Replacing the related bits in the manifest fixed it. Problem solved. Probably I was just using the wrong repository.

This is even noted here: https://github.com/CyanogenMod/android_device_htc_hima-common/commit/77284dc98741de153bb411a6a3a7d56edb891b1f - it indeed requires an additional SElinux rule, so it was reverted back. I was using some other repository by error where it wasn't reverted.


text:
Unknown PIN preventing me from changing screen lock on Note 4
One day, I've noticed that the pattern I always use to unlock my phone and the recovery PIN don't work (never gave it to anyone nor have changed it since I initially put them in). I unlocked it using my Google account, but now the lock screen is stuck to Swipe. I then went to the Screen Lock setting and changed it to PIN, but not only has it not changed from Swipe, but the setting is now protected by a PIN, of which the PIN I used doesn't work.
What do I do now to get rid of that PIN without having to fully reset my phone?

I'm assuming you've resolved by this point, but for anyone else that comes across this issue:
I just ran into the same issue on my Galaxy S5.  I managed to resolve it by going to https://www.google.com/android/devicemanager and used the lock option to set a different password.  Then I was able to go into lock screen settings and change to pin/pattern/ect as normal.


text:
What is the MIN # that looks like a cell number under my actual cell number?
When I go to settings, scroll all the way down to "About Phone", and tap on it, all this info pops up. Like MAC address or IP address if you use data. Phone Status and so on. I see my cell number then under it is a MIN # that looks like an actual cell phone number. I called it and a dude named Bill answered. I'm so confused. What is this??

The MIN # is the Mobile Identification Number.  This number is used to uniquely identify your phone within your mobile carriers network and may or may not be the same as your cell phone number, also known the Mobile Directory Number or MDN.  The MIN, just like the MDN, is limited to 10 digits so it appears to be a phone number but is not.


text:
Problem rooting intex y2 aqua 1gb
I am trying to root my phone using Ubuntu.
 When I try

adb reboot bootloader

My device boots into fastboot mode
When I try

fastboot devices

It list my device.
But when I try

fastboot oem unlock

It freezes with 3 dots.
Any idea what is the issue?

Not every device is rooted the fastboot way like Nexus phones do, especially when the device in question is a MediaTek one.
I did a quick search and the result checks out: you'll need MediaTek's scatter flashing tool. Read this: LINK: XDA-Developers
I don't have the device so it's up to you to verify whether this works. Either way, do hang around XDA and other forums often for this sort of info.


text:
htc m7 can't update it to lollipop
Whenever I try to download my software update. The download completes but at the end it gives a notification that my phone has already been modified. I don't know what it is but I can't update my phone's software. HELP ME WITH IT...

Did you root your phone or have you installed custom recovery and such on it? Like the notification says, it throws such errors when the phone is detected to have been modified.
If you really haven't touched the phone in aforementioned ways, then you might have to resort to manually upgrading by using OTA zips, which has some prerequisites and is more complicated to do.


text:
Renaming text files based on a keyword inside the files
I have many files inside a folder with .txt extension. Now they are named randomly by an app but I want to rename each text file to some words written in those files itself after words Name: but before word Age:.
Example
A file named 13765_46748.txt contains:
This is just a test file containing info of each persons.
Name: Pearson Bratts Age: 55 Profession:Technician

Now I want the above file to be renamed to Pearson Bratts.txt using Tasker or any other script app with working script.

The complete shell script follows. You need a Terminal emulator, but I'll leave that to you.

if [ "$1" == "$(cat /dev/null)" ]; then
 echo "Usage: $0 <file>"
 return 1
fi

content="$(cat '$1')"
content="${content#*Name: }"
content="${content// Age*/}"

mv "$1" "$content.txt"

This is to be saved in a something.sh, which, when executed, will require an additional parameter. For example, we'll assume you'll call it renamer.sh, and thus the usage will be:
renamer.sh some/file.txt

. It'll rename the file you give it, accordingly to its content. To give it the correct file, is your responsibility, and it works for only a file per execution. It won't work if the file has spaces inside its name.


text:
Rooted my LG G Flex 2, but no root, and no supersu?
So today i decided to root my Lg G Flex 2 which runs on 5.1.1. Using the pc method everything went fine with no errors, but when phone booted up i have no superuser, and root checker basic said no root along with some other root checking apps. So i then tried rooting with the APK method (KingRoot, and some other apks aswell), but it said root failed. If anyone could help it would be greatly appreciated! Also if it matters.. I bought the phone unlocked off amazon.
I will post specs below
Specs:
Lolipop: 5.1.1
Kernel: 3.10.49
Build: LMY47S
Software Version: V15c- TWN-XX
Model Number: LG-H959
Hardware Version: Rev.1.0

"the PC method" and this method would be? Please don't use "one click root" apps, you'll only get malware.

Use "Kingroot"I have a LG tribute 2 and it rooted my phone with Kingroot from play store.Try unistalleing it,then reboot and install again.then download a root verifier and it will tell you if your phone is rooted......GOODLUCK!


text:
How can i Downgrade my Lg G Flex 2?
Is it possible for me to downgrade to kitkat... If it is can someone please tell me how. I am on a Lg G Flex 2, currently running on Lolipop 5.1.1..il leave further specs below.
Specs:
Lolipop: 5.1.1
Kernel: 3.10.49
Build: LMY47S
Software Version: V15c- TWN-XX
Model Number: LG-H959
Hardware Version: Rev.1.0

No you simply can't. The phone is released with Lollipop (5.0) as its initial version. And even if there was once KitKat available, chances are you can't downgrade to it due to bootloader restrictions.


text:
Cannot log in to google account when on data (works on Wifi)
Device: Lenovo A806 with Android 4.4.2
Problem: Cannot log in to google account while on data (works on wifi)
Description:
Cannot open google play (connection failed, retry) or add a new google account to the android settings (signing in, may take minutes). Also cannot eg log in to PokemonGO with google account while on data, but can log in with non-google account. The game keeps playing if later I go off-wifi. Wifi is required only for sign in. If I disconnect and allow some time to pass then cannot log in again on data.
Tried:

Date and time settings are automatic and I verified that the difference to atomic clock is under 1s.
Different SIM in different country has the same problem (network operator-independent)
Cannot add new google account (account independent, not related to 2-step verification or wrong password etc)
Hosts file contains only 127.0.0.1 localhost.
Uninstalling/Reinstalling, clearing cache, clearing data, forcing to stop the app and restarting does not seem to help because more than one app have the same problem.
Captured the HTTP/S traffic using Drony but didn't manage to understand which is the call to the google account, and see its status.

I know the question may seem a duplicate, but I haven't found any solved question about having this problem ONLY on data (wifi works so that rules out many solutions)

Do you have background data restricted? Usually I can't login to my Google account with background data restricted. Try with removing background restriction.

There is no general background data restriction option on the above mobile/android configuration. If I authenticate on wifi, I can continue on data without problem.

Then maybe your Google play services has no access to mobile data. See if providing the necessary permissions for Google play services to access mobile data works

I think it got fixed, it was probably something similar: The mobile data access was available for google services in android settings but there is a built-in lenovo app called 'security' which has a submodule called 'firewall', and this was blocking google services when on data to save on MB usage.
Thank you

I also faced the same problem in LE 1s, So,I have done  system settings-->dual sim and mobile networks-->data management-->connection control-->select app that you want in mobile data.

[SOLVED] by Patroklos A Jul 25 '16 at 15:39
I think it got fixed, it was probably something similar: The mobile data access was available for google services in android settings but there is a built-in lenovo app called 'security' which has a submodule called 'firewall', and this was blocking google services when on data to save on MB usage. Thank you –
go to settings > security > apps with usage access > google play services > click on 'i' icon > data usage > uncheck restrict background data
you can also access it from settings > apps > google play services > data usage > uncheck restrict background data
Done! Thanks for the clue, Patroklos!

When I installed my phone for the first time, I probably restricted too many apps from using mobile data.
I have system apps called 'msa' and "Browser services". When I turned mobile data for both apps back on, I finally was able to log into my Google account again via a mobile data connection. ':-D


text:
Removing active notifications on Marshmallow
So I always try Googling first and didn't find anything with any term I used. I'll try to be as specific as possible.
I just got a new phone the other day a Moto G4 Plus with Android 6.0.1 the phone plan I have is a Talk & Text only with Rogers. It includes unlimited MMS as well but I require data on to use this. So I restricted background data and set the data limit to 0 Bytes per month, then enabled data. I can now send the pictures I like.
The issue is that there's now two permanent notifications on the phone that I don't want there. One says "Background data restricted. Touch to remove restriction." and the other "Cellular data limit reached. Data paused for rest of cycle." I want to remove the notifications without removing the restrictions.
If there's a setting I've missed or an app out there that can help with this or a way of doing it without an app, that would be great.

With Marshmallow, long pressing the notification will bring up notification settings from there you can disable notifications for the specific app that's causing the persistent notification. Since you are working with the 'system' app you are not able to change any notification settings unless you are rooted. So in short without root permission you will not have access to change notification permissions on any app located in /system/app


text:
How to Organize Home Screen Icons in Folders?
I am using a Samsung Galaxy A3 2016 (SM-A310F) smartphone with Android 5.1.1. I am trying to combine several icons on the home screens into folders, like I did on various other Android devices before.
Samsung's manual for SM-A310F indicates that creating folders works like on the other Android devices I used; by tapping and holding an icon for a few seconds, then by dragging it onto another icon (to create a new folder) or onto an existing folder (to add the icon to that folder).
However, this does not work on the phone I am using: Holding an icon does not do anything while in the normal mode:

The home screen can only be edited after tapping Bearbeiten (Edit) in the top right corner of each of the home screen pages to switch to an edit mode:

In there, icons cannot be dragged, only deleted (each icon is adorned with a little "minus" overlay icon in this mode). If this is not the standard behaviour of Android 5.1.1, I am seeing no indication of that in the system info.
So, my question is: How can I create folders on the home screens in Android 5.1.1?
I found one vaguely similar question, but I am not looking for installing any special launcher apps or exceed the built-in maximum number of apps per folder, I just want to access the folder feature that has always been around on previous Android versions on devices by different manufacturers.
One additional option is described on Solvemix, where it is explained that users should tap "at the top right on the three-point symbol" in the app menu. However, no such three-point symbol is present in the app menu on the device I am trying to configure.

It's really been a while I've touched Samsung devices, but I remember there's a feature called "Easy Mode" that will disable home screen customization.

citation from side http://www.gsmarena.com/samsung_galaxy_a3-review-1174p3.php : In the app drawer, icons are presented as a customizable or alphabetized grid. You can also view only the ones you've downloaded yourself or just hide the ones you don't need. You can also disable some of the pre-installed apps so they won't take up any RAM.
try change launcher (Nova):
How to create folder in app drawer of galaxy A3?

I see - so, does this mean I'm looking at this "app drawer" rather than the usual home screens? In that case, how do I get back to the regular home screens that let me drag icons and group icons into folders, like the home screens I am using on the other devices (Samsung and otherwise), and like it is described in the A3 manual?

you can only create folders in app drawer, without additional software you can not create folders in home screen.

I'm sorry, I don't quite understand yet. I never installed any additional software on the other devices, and yet I was able to create folders on the home screens. Has this feature been removed for Android 5.1.1, so I now need to use a 3rd party software like that Nova launcher?

I have added two screenshots to the question to illustrate what the home screens look like. So, is that the "app drawer", or is it not?

I did it by creating the folder in the apps section
choose edit, then create the folder by dropping the icons on top of each other.
Once done, click on that folder and drag it to your home screen
In my findings, doing it directly on the home screen doesn't work.

There is no edit option in my apps section. There is only one on the home screen, but there, icons cannot be dragged.


text:
Disable Pattern lock with usb debugging or Login to WiFI network
Summary
I forgot the pattern lock on my new phone, it's an Acer Z630S running android 5.1. I managed to turn the WiFi on, but the only network my phone knows right now requires me to accept some conditions on a login page, however tapping the "Login to WiFi" notification asks for the pattern.
Fortunately I have USB debugging enabled, and my pc is a trusted device. Can I circumvent the lock screen is some way, or can I tap a button to log in to the WiFi network?
I also found this answer but none of those methods worked, here's a list of what went wrong with each of them:

Credentials stuff

My phone doesn't ask for them.

Bypass screenlock using a special app

I don't have WiFi, so I can't download anything.

Unlock via web

No WiFi, so isn't going to work.

Disable Pattern Lock via ADB

As in one of the WiFi attempts: sqlite isn't installed, pulling doesn't work and mounting doesn't work either.

Similar thing without ADB

My phone is not yet rooted.

Phone hole stuff

I'm not in my home country and accepting calls costs a lot of money, so I can't really do that right now.

Samsung users with Windows PC

It's an Acer device.
Any other things?
I've tried to document everything as good as possible, but I'd happily answer any other questions you might have!

This method will only work if you have an sd-card slot on your device and it's rooted.
You mentioned that you can't download any apps to bypass screenlock as you don't have an internet connection. But what you can do is:

Download any similar app on your PC (as an apk from the internet)
Create a recovery-flashable zip out of it, ie, make an update.zip package from the apk and save it onto your sd-card (using a card reader or a different device)
Insert the sd-card into your device boot it into recovery mode
Install the package (update.zip) from recovery

The app should take care of the rest.

If your device isn't rooted or your device does't have an external card slot, follow this link to learn how to factory reset your device from it's locked state, but it would wipe your device's data, so proceed cautiously.

My phone is not yet rooted. I tried it anyway using the build-in recovery with this tutorial with this apk  but the recovery simply said "Installation Aborted". I guess I'll have to factory reset my device unfortunately.


text:
Restore IMEI of Xiaomi MI4C Without Another Phone
In short: I have a Xiaomi Mi4c that shows has an "unknown" IMEI when checked via the settings in the stable and developer versions of MIUI and Cyanogenmod 13.1. However, when viewed through EFS professional or NV RF Manager, the IMEI is read correctly. Not having a "valid" (or any?) IMEI means I have a 5" wifi tablet, rather than a phone, which is something I've been trying to fix.
The long version:
The problems started right after I flashed CM 13.1, and I couldn't detect my sim card. Thinking it was my ROM, I reflashed my stock ROM and when that didn't solve the problem, I quickly deduced that the missing/unknown IMEI was the problem.
I finally got NV RF Manager working, and read all of the NV values from my phone. After finding the IMEI related value, I followed the odd schema for rearranging my IMEI and filled the boxes out and clicked "Write NV." However, I only received an error that read "Parameter is write-protected and thus read only." The same results were achieved with EFS professional. (Again, this was on CM) Now, I reflashed the stock ROM, and tried again. After rebooting the phone, I was able to read the correct IMEI values from the phone using both EFS professinoal and NV RF Manager, but the phone still showed baseband and IMEI as "unknown." Dialing *#06# causes the numbers to disappear, but nothing else happens.
So far, this is what I've tried:

NV RF Manager
EFS Professional
MTK Droid Tools
SP Flash Tools (Did not work at all, only for MTK chipsets?)
Apps like XPOSED IMEI Changer (Results in nothing changing)

There are a few related questions, but none of them work for me.
How to restore IMEI and get back network functionality?
Might work, but I have been unable to find the "modem" or nvram files on my phone. I also don't have an "efs" folder on my phone (that I can find.)
Mi4i full partition corrupted. Unable to restore EFS partition
Isn't jiving with me. The thought of uploading mi4i (rather than mi4c) specific files after removing my only remanents of my efs files seems like a bad idea to me.
How to restore the IMEI number on the Samsung Galaxy S4 I9505?
Is ROM specific, and since it doesn't work on multiple ROMs, I've ruled it out as related.
Again I have a Xiaomi Mi4C, the 32GB/3GB version with the Qualcomm MSM8992 Snapdragon 808 chipset.
Any help at all would be greatly appreciated, I've hit a wall fixing this problem.

And there is issue number one: you have no efs folder. That is where your IMEI data is stored, along with all others sorts of ID (MAC address, BT address)

I thought this might be the problem, but I have a BT address, a MAC address and my wifi & BT connections are working just fine.

weird. That would all be efs, and devices tend to keep the system for that the same.

This is what worked for me. I've documented everything in a GitHub repository, and have included some of the information here. However, I will not be updating this information, and I cannot upload the supporting files, making the GitHub repository the go to resource for many reasons. With that said, here is the excerpt:
Download files
I've attached a few files:

mi4c.qcn: an IMEI backup from another phone
QPST: the program for uploading the IMEI backup
IMEI converter converts IMEI to hex

The IMEI converter is optional, but useful.
Root phone and enable USB debugging
Other people have already written this part up, and in the spirit of refactoring, I will link to them rather than repeating what they say.

Unlocking the Mi4c Bootloader without verification by Xiaomi
Root and install twrp recovery on Xiaomi mi4c
SuperSu install
Enable USB debugging

Setup other software

Here's a guide for how to install ADB and Fastboot.
You'll need a hex editor. Here's one, but there are many to choose from.

Enable diagnostics mode
Open up your command prompt and run
adb shell
su
setprop sys.usb.config diag

This enables the diagnostics mode on your phone, priming it for QPST
Check drivers
Go to "Device Manager" and check if your drivers are installed correctly. If they are not, try enabling unsigned drivers and reinstalling/updating the drivers for the phone.
Edit mi4c.qcn
Open up your hex editor and search for "08 5A 44 13 66 06 75 76 36"
Change this to your IMEI that you converted into hex with the IMEI converter attached.
Erase existing IMEI files
adb shell
su

dd if=/dev/block/mmcblk0p28 of=/sdcard/modemst1
dd if=/dev/block/mmcblk0p29 of=/sdcard/modemst2
dd if=/dev/block/mmcblk0p33 of=/sdcard/fsg

dd if=/dev/zero of=/dev/block/mmcblk0p28
dd if=/dev/zero of=/dev/block/mmcblk0p29
dd if=/dev/zero of=/dev/block/mmcblk0p33

reboot

This clears the way for the new files.
Repeat Enable diagnostics mode
Use QPST to update EFS
Install and run QPST. It should automatically detect your phone.

Click the "Start Clients" tab, then select Software Download

Select your modified qcn file and click start. It may reach 100% quickly, but it will still be working until the exit button is not greyed out.

Reboot phone
Celebrate! (Or retry if not successful, sometimes it takes a few tries to get it right)
Credit to http://www.miuitutorial.com/2016/10/imei-xiaomi-mi4c-kamu-hilang-jangan.html and Defforest@enMiuiForum

What you need.

Download MTK Droid Root & tools.
A Windows computer.
Have already set USB Debugging mode enabled on your device.
A USB cable.
Have setup ADB & Fasboot on your PC.

Instructions.

Connect your device to PC, then launch MTK Droid Root & Tools.
Droid Root and Tools will detect your Android device.
If your device is detected, you will see its IMEI on the Phone Information tab on the droid root and tool interface.
Then find the Root button that's located on the lower right side of the interface.
Select Yes button if asked whether you wish to Root. You will see Root Shell Script Access.
Then you'll see a window box named Change IMEI, Backup/Restore, NVRAM.
Now replace the IMEI on the window box with the IMEI number from the rear side of your Android device.
Then choose Yes. Reboot your device for the changes to apply and finish.

I got the instructions from the following page; repair MTK IMEI, that page contains pictures to clearer its point.

I'm afraid this method proved unsuccessful as well. Whilst it seems as if everything went smoothly, the IMEI is ultimately not restored.


text:
Repartition internal storage with 0mb (tablet has 8 gigs!)
How do i repartition the storage so i get my tablet back. I accidentally formatted it and twrp corrupted the memory! it now says I have 0mb avaliable! help!


text:
Fastboot not working on Sony Xperia M
I'm using Xperia M and I have installed ADB and turned on USB debugging, turned off my mobile, then hold the volume up button and connected the USB.
I typed fastboot devices in cmd where I have my fastboot.exe, but it didn't type anything. No "(waiting for device)", no error, just nothing. The light on my mobile is blue like it has to be but it just not typing anything.
How to use fastboot on Xperia M?

Have you installed Google USB Driver? Try reconnecting your phone then.
Make sure you are following every step of this guide, especially:

making backup of IMEI and DRM keys
running fastboot.exe -i 0x0fce getvar version command


text:
How to configure the system to choose apps to open links/files in one click?
Every time I want to open a link or a file it asks me to choose which app to use and whether I'd like to use this app always or this time only. I want to be given the choice every time so I always click "just once". Can I hide the "just once"/"always" choice so that I'd be able to choose apps in one click, always assuming "just once"?
PS: I have no idea what tags to add to this question, please add some if you do.

This depends on what version of Android you are running, I am not sure since when this has been possible (At least since Android 6.0) I myself am on Android Nougat (7.0) Developer Preview 5 with a Nexus 6P. And when I go to Settings -> Apps -> Top Right Gear there are a number of items I can choose from to select an app which will open by default. Also I can get a list of all my apps to see which ones open certain links and which do not. This is also in this settings menu. I can not however change which links they do or do not open.
Items I am able to change however include:

List item
Browser
Phone
And SMS app

Tl;dr: Depending on your Android version this is possible for some apps, but not for every link you will ever open on your Android device with the apps you have installed.


text:
How to ensure apps get uninstalled cleanly?
I use to try (install and remove) a huge lot of apps to choose the ones I will actually like. I am afraid uninstalled apps can leave some residuals behind and this can crap up the system in some time. How to make sure this won't happen?

Before uninstalling the app, go into the App Info, force stop the app, clear the cache and data, and then Uninstall.
This is not 'guaranteed' to remove absolutely everything, but it should be a lot cleaner then just uninstalling it.

What can I do if I have already uninstalled it without doing so? Also, can this be automated?

@DeathMaskSalesman my apologies - I was meant to add NOT in there as evident per rest of the sentence. My mistake and I'm sorry for the misunderstanding.

@Nucleotide Oh, I see. I'll remove the comment, then.