Eliminate the problem "An error has occurred in the application" on Android. Location services android constantly pops up how to remove the cause of the error

If the location services android constantly pops up on a mobile device, then it is often not enough just to turn off geolocation. Under this name may hide dangerous virusthat penetrates into system foldergetting unlimited access to all phone functions.

What are location services?

It is a system application that is responsible for determining the location of a mobile device. It is not dangerous, the geolocation function has recently been introduced into any software: games, programs, clients of popular social networks etc. When the application needs to determine the coordinates of the phone and find out its location, the program contacts the geolocation service, starting the location services.

Data is collected by GPS satellites and information mobile network, and then passed to the application that requested them. As a result, for example, when a photo is published on VKontakte, a geolocation is attached to the image, indicating the place where it was taken. You can even launch location services with a camera turned on.

Disable service

If location services pops up constantly, you can completely disable the geolocation service.

So you completely abandon geolocation. If this option does not suit you, then see which applications require location determination. You can remove permission for individual programs using the App OPS utility. After installing it on Android, in the application settings, permissions will be presented in the form of switches that can be deactivated. You need to disable the "Location" item, after which the program will stop calling the location services. Instead of App OPS, you can use the Xposed Framework Permission Master module. After installing it and restarting the device, you will see in the list of applications new icon - a shield with a gear. Click on it to go to the permission management. On the first tab, you will find a list of all permissions. Click on geolocation to see apps that have been granted this permission. Tap on the program from which you want to revoke the right to access the geolocation service. It will be crossed out with a red line and will no longer bother the location services component. At the same time, the geolocation itself will function, so that in other applications there will be no problems with determining the location.

If you figured out how to disable geolocation completely or for individual applications, but the problem with the constant appearance of location services persists, then you are probably dealing with a virus that disguises itself as a system component. In addition to the inadequate operation of the location service, there are other signs of a virus infection.

  • Money is debited from the account, unknown entries appear in the call and SMS log.
  • Some applications do not start, they give an error.
  • Some functions of the device stop working or function incorrectly (in this case, the device incorrectly determines the location).
  • The battery is discharging faster than usual.
  • The antivirus program informs about the presence of malicious code.

If the antivirus detects malware, it will be able to remove it on its own. Unfortunately, the problem is not always solved so quickly. The virus refuses to be removed or quarantined, or is not detected at all by antivirus software, although other signs clearly show that malicious code got into the phone and is active. In this case, you have to use other methods - remove the virus manually or reset the settings to the factory state.

If your phone is rooted, you can manually find and delete the malicious application file. Use a powerful file manager such as Root Explorer for this purpose. If this cannot be done normally, try the procedure in safe mode.

To get into safe mode, press the power key, and then tap and leave your finger on the "Power off" item until a small window appears. It will offer you to switch to safe mode.

Safe mode is nice because it doesn't work third party applications... Therefore, it is highly likely that the virus will stop functioning and you can safely remove it. But the advantage becomes a disadvantage: antiviruses do not start in safe mode either, so it will not work to use them to detect and remove malware.

Other ways to remove the virus

Previously, Android devices were defined as removable drivesthat could be checked with antivirus. Nowadays, most phones do not have this feature, because even with debugging enabled, they are displayed as media devices. Therefore, the option with using an antivirus on a computer android programs Commanders no longer work. But this does not mean that the virus cannot be removed in any way. You can use the following methods to clean your phone:

  • through the system menu.
  • Rollback to the factory state via the Recovery menu.
  • Re-flashing a mobile device.

These methods have one common drawback: after applying them, you will get a clean device with no contacts, no messages, or other personal data. To minimize losses, use information backup. But do not make a complete "mold" of the system, save required files in manual mode, so as not to transfer to backup virus.

Contacts can be synchronized with the Google service or copied to a SIM card, music, photos, videos can be temporarily transferred to a computer,. After finishing preparatory phase you can start implementing one of the above methods. First try resetting the settings through the system menu.

Some Android users have encountered a strange issue. The machine displays the following message: "The com.google.process.location process has stopped." The most interesting thing is that the error does not appear in the process of installing applications or receiving updates, but just like that - by itself.

The situation can be corrected in one of three ways, the simplest of which is the first. It does not even imply clearing the cache of applications and allows you to limit yourself only to the inclusion of programs that were previously disabled. To do this, follow these steps:

1. Go to "Settings" -\u003e "Applications", select "Disabled".

2. Enable all programs that are disabled.

3. Reboot the device.

Unfortunately, this way does not always work.

The second method is quite standard and is often used to eliminate all sorts of errors - this is clearing the cache:

1. Go to the "Applications" section, select "all", then find the line "google.process.location" or something similar.
2. Select "Clear cache" and "Wipe data".
3. Reboot the device.

And finally, the third way, the cardinal one. In 99% of cases it works, but the data from the smartphone disappears, so you need to take precautions. The sequence of actions is as follows:

1. Save all information from your smartphone (video, photo, music, etc.) on another device, preferably on home computer... Contacts and apps need to be synced.

2. Go to "Settings", find " Backup and reset ”, then“ Restore factory settings ”. Execute "Reset phone settings".

Mobile technologies are developing so quickly that we no longer have time to change smartphones. It seems that I just bought a new device, but more advanced models with more memory, processor cores and NFC support have already appeared on the market. And to hell with them, with cores, two, four, eight, at least sixteen. The new version of the OS slows down! This is the real problem.

Instead of introducing

I address this article to all those who still use smartphones that came out before the appearance android version 4.0, to all those who were "lucky" to buy a device with 512 MB random access memory, and a month later Ice Cream Sandwich came out, and I had to stay at 2.3 or put up with the brakes. In general, for the owners of prehistoric, but loved ones HTC Desire, Motorola Defy and Samsung Galaxy S.

I myself am the owner of one of these devices. About three years ago, for today's price of a Nexus 4, I bought a Motorola Defy smartphone. This is a brick with a 3.7-inch screen, 1 GHz processor, 512 MB of RAM and protection from dirt and water. I walked with him for about a year and subsequently replaced it with a Galaxy Nexus, however, I did not dare to give or sell the beaten motorola, which had sunk several times and passed with me through everything that was possible. The smartphone was really good, comfortable, easy to fit in your pocket and withstood any test.

The only problem was that by default, Defy was installed on Android 2.2, which later could only be updated to 2.3. The greedy and lazy motorola cut off all the hopes of the owners, saying that 4.0 will not be on the smartphone - there is not enough memory in the animal.

Fortunately, they started porting Android 4.0 to Defy almost immediately after opening the source, and by the time the need for 4.X was ripe, the developers rolled out a good full-fledged port (a story about what they went through to do this in the conditions of an unbreakable locked bootloader , worthy of a separate article). But even the already licked Android 4.X (represented by CyanogenMod 10.2) worked very badly on the old device. The currently scanty amount of memory simply choked the system, and it was constantly kept at the limit of its capabilities. Compared to 2.3, a new version was just an incredible brake, which there was no desire to use. The search for any optimization ways began.

In essence, all the following narration is a story about how to make Android 4.3 (CyanogenMod 10.2) work on Motorola Defy or any other outdated device of a similar configuration (in particular, the Motorola Droid had exactly the same filling and the Samsung Galaxy S similar) ... However, all of the above will be true for any device on Android 4.X, from Samsung Galaxy Nexus to HTC One.

What, why and why

So, we have a smartphone under android 4.X, and it is shamelessly slow. Applications take a long time to launch, scrolling occurs with delays, the total FPS is about 5-10 frames. There are, as expected, two problems here: processor and memory.

Official system requirements Android 4.X is a 1 GHz processor and 1 GB of RAM. Only such a smartphone can pass certification and be able to sell with a pre-installed Google play... Anything below is not. And there is no reserve in memory or frequencies, this is the edge below which the brakes begin. Not because of the crookedness of anyone's hands, but because of the functionality of the OS, which has really grown significantly with the release of Ice Cream Sandwitch (well, or you can blame everything on Java).

How much memory does Android 4.X consume? Lot. Just loaded operating system takes about 350 MB, minus the kernel code and non-paged components on a device with 512 MB of memory, about 120 MB remain free. An average modern application like Twitter or Instagram can gobble up up to 50 MB while running. That is, the RAM will be depleted after turning on the device and launching a couple of applications.

Yes, you do not need to run several programs at the same time, but Android is not Windows, it does not quit the application when you close it, but only minimizes it, as a result of which the software continues to eat up memory even when you are not using it. To prevent the axis from dying from lack of memory, a process called Low Memory Killer wakes up at critical moments and mercilessly kills background applications.

Freeing memory automatically

Low Memory Killer is a very important tool for us. This is not just a clumsy nailing of software, but an intelligent mechanism that can be reconfigured to suit any needs. The algorithm of this intranuclear process is based on "importance" values \u200b\u200bthat are assigned to each application running in the system and can change over time. There are six such values \u200b\u200bin total:

  • FOREGROUND_APP - the application visible on the screen, it must not be killed in any case;
  • VISIBLE_APP - a process running in the background that is responsible for displaying certain information on the screen (icon in the status bar, slide-out panel, widget, etc.), it is better not to kill it either;
  • SECONDARY_SERVER - background service, such as a music player, alarm clock, data synchronization, can usually be killed without serious consequences for the system as a whole, but with a loss of functionality;
  • HIDDEN_APP - an application running in the background, can be killed at any time, but this will affect its functionality;
  • CONTENT_PROVIDER - a background service responsible for storing and providing any information (settings, photos, whatever), but currently idle (no clients), can be painlessly killed;
  • EMPTY_APP - any background process (app) that does nothing is the first candidate for murder.

The applications of each group grow in importance from the bottom up. That is, if there is not enough memory, the Low Memory Killer will start killing from the last group and, if there is not enough memory again, it will move higher. The very concept of "memory deficit" in Low Memory Killer is defined by six thresholds, one for each group of processes. On all smartphones (and firmware) the values \u200b\u200bof these thresholds are different, for example, on Motorola Defy with CM-10.2 on board, they are as follows:

FOREGROUND_APP: 25 MB VISIBLE_APP: 30 MB SECONDARY_SERVER: 40 MB HIDDEN_APP: 50 MB CONTENT_PROVIDER: 55 MB EMPTY_APP: 70 MB

Less than 70 MB of free memory - unemployed background applications are killed, less than 55 MB - Content Poroviders will be consumed, and so on. When there is only 25 MB of memory left, the currently used application will be killed, but the likelihood of such an outcome is extremely small; after killing all other applications, there will be simply no one to occupy memory.

The beauty of this whole mechanism is that it can be reconfigured at any time. Android has a file / sys / module / lowmemorykiller / parameters / minfree, which can be read to get the current threshold values \u200b\u200bor write new values \u200b\u200b(separated by commas in 4K blocks) into it, which will take effect immediately after writing. The same can be done using the Auto Memory Manager application, MinFree and analogs.

What values \u200b\u200bwould be appropriate? It all depends on how you use your smartphone. If you need the device only to make calls, read mail and twitter, it is better to either leave the values \u200b\u200bas they are, or decrease them (but I do not recommend setting them below 50 MB). Then the system will free up memory only as a last resort, and all applications that you often use will remain in memory and will start instantly.

If you are used to using a smartphone to run a large number of various applications and games, then it is better to increase the values \u200b\u200b(in Auto Memory Manager this can be done in one tap by pressing the Aggressive button). Then the system will always have enough memory to run several heavy applications at once, and it will not waste time freeing up RAM.

Another radical option is to raise the limits of the last two groups to the maximum, as a result of which Android will actually turn into a single-tasking system, which until recently was iOS and still remains Windows Phone (conditionally, of course). In other words, the system will automatically kill applications immediately after they are closed, but only if the software does not do anything at that moment. System components they will remain in memory.

Regardless of which of the options you choose, it's worth playing around with the possible values \u200b\u200bto find the optimal ones.

We clean the smartphone from garbage

All our manipulations with Low Memory Killer will not bring much performance gain if the system memory is clogged with different clients of Facebook, VKontakte, Hangouts Google+ and others. Usually, such software starts immediately after the system boots and falls either into the SECONDARY group SERVER or HIDDENAPP (sometimes in CONTENT_PROVIDER), so that the memory clearing mechanism gets to it only last, and even if it does, the software restarts after a while (usually this is associated with some system event).

Therefore, the second point in our plan to improve the speed of work will be getting rid of all such applications. No, the ones that are really needed, of course, are better left, and those that are worth checking off are removed. If you use third party firmware, like CyanogenMod, standard archive Gapps (the one that is stitched after the firmware itself) is better replaced with the minimum one (goo.im/gapps/minimal). From Google applications, it only contains the market itself and Gmail, and Hangouts, maps and a bunch of other services are cut out, so they will not start at boot time and consume memory (any of them can be installed from the market).

Apart from Google services, Android services and auto-launch applications can eat up quite a lot of memory. Surprisingly, in the memory of a running Android system, you can easily find a bunch of software that you don't use at all. It can be a voice recorder, calculator, "Black Hole" (unfortunately, these are just live wallpapers), as well as voice dialing services (dialing, not searching), calendar and speech synthesizer. Moreover, if the former were simply launched at boot time and are quickly replaced by Low Memory Killer, the latter are full-fledged services that hang in the memory throughout the life of the smartphone.

Many of these services can be disabled through the standard application manager without even having root. It is enough to go to "Settings -\u003e Applications -\u003e All", tap on the desired software and press the "Disable" button (well, or "Delete", and then "Disable" if updates were installed). Here is a list of applications that, from the point of view of Google engineers, can be painlessly disabled:

  • Voice dialing (com.android.voicedialer)
  • Voice recorder (com.android.soundrecorder)
  • Calendar (com.android.calendar)
  • Calculator (com.android.calculator)
  • CyanogenMod Update (com.cyanogenmod.updater)
  • Calendar memory (com.android.providers.calendar)
  • Sync bookmarks (com.google.android.syncupdaters.bookmarks)
  • Calendar sync (com.google.android.syncupdaters.calendar)
  • Standard screensavers (com.android.dreams.basic)
  • Backgrounds (com.android.musicvis and com.android.magicsmoke)
  • Black hole (com.android.galaxy4)
  • com.android.wallpaper.holospiral
  • Email (com.android.email)
  • Picasa Uploader (com.google.android.apps.uploader)
  • Pico TTS (com.svox.pico)

In parentheses, I have given the system name of the application so that, if necessary, you can not just disable it, but also delete it (why waste space?). All system applications are stored in the / system / app directory and can be removed using any file manager with root support.

By default, the system will not allow you to disable some very voracious, but nevertheless important services. These include, for example, "Phone" (this application is part of the FOREGROUND_APP group and therefore always hangs in memory), "Equalizer" (only in CyanogenMod and derivatives), Google Backup Transport (~ 45 MB), responsible for the backup of installed software in google cloud (restored after reinstalling the firmware, for example), "SIM card menu" and Fused Location (~ 45 Mb), a service that collects location data from all possible sources ( cellular network, IP address, barometer, GPS, compass) and, based on them, calculates the exact position of the smartphone on the map. Applications like navigators will work without it, but with less precision.

Bloat Freezer root application will help to get rid of all these processes. It allows you to disable not only applications that are allowed to be disabled by the system itself, but in general any, including the main system process android.process.acore. In addition to the memory eaters listed above, you can painlessly nail down so many more system applicationsthat it will be easier for me to give a list of those that cannot be disabled. Here they are:

  • Apollo (CyanogenMod)
  • cLock (CyanogenMod)
  • Google Services Framework
  • Launcher (Trebuchet in CyanogenMod)
  • Google Accounts
  • Browser
  • Gallery
  • System graphical interface
  • Download manager
  • Downloads
  • Google keyboard
  • Contacts
  • Package Access Wizard
  • Network location
  • Settings
  • Memory of numbers / SMS / MMS
  • Layout options
  • Package installer
  • Certificate installer
  • Google contacts sync
  • Posts
  • HTML Viewer
  • Telephone
  • Files (CyanogenMod)
  • Flashlight (CyanogenMod)
  • Contact store
  • Media storage
  • Settings storage

Everything else can be safely turned off (well, or leave those that may still be useful, such as FM radio). When everything is done, open any process manager, nail down all user processes and see how much memory is used. In my case, 200 MB. Very good compared to the original 350 MB.

Fighting greedy software

Of course, we cannot delete or disable all applications, but we need to take care of the most gluttonous of them. Usually software for Android (and for any other OS) suffers from two main problems of obesity: it either eats up incredible amounts of RAM during its operation (for example, a twitter client can continue to store long-read messages and viewed images in memory), or it is constantly doing something in the background, which makes the smartphone less responsive, and its battery life decreases. In especially severe cases, both diseases are combined in one software.

What we can do? Of course, remove such software, or at least replace it with an analogue. If this is not possible, there are two more tricks you can try. The first is to force kill the application. Usually, the program starts to get fat during operation, and immediately after launching it does not take up too much memory. Killing software is not a very good idea, but if you are going to do it, then it is better to use the built-in function of CyanogenMod and derivatives for this: kill by long holding the "Back" button ("Settings -\u003e For Developers -\u003e Closing the application").

The second thing we can do is to disaccustom gluttonous applications to do anything in the background. For this there is a wonderful application Greenify (requires root), which allows you to freeze selected applications so that they cannot work at all until they are visible on the screen. Launch Greenify, press "+" and see a list of running software, sorted by the degree of gluttony, tap on the desired application and that's it, from now on it will always sleep in the background.

What else can you do to speed up your smartphone and clear its memory? In general, nothing else. There are, of course, such completely radical methods as replacing heavy software with simple lightweight analogues, hacking software in order to cut out resources, but all this does not fit well with the idea of \u200b\u200bhaving a fully functional smartphone. It's easier then to install Android 2.3 (CyanogenMod 7) and forget about performance problems altogether.

However, there are two more powerful tips. The first is the activation of zRam technology, which allows you to allocate a small piece of RAM and create a virtual swap partition from it with data compression. As a result, the total amount of RAM will virtually increase, freeing up the extra 50-100 MB.

The only problem with activating zRam is that the technology itself is not in every core. Most custom kernels as well as kernels cyanogenMod firmwareParanoid Android and AOKP usually include zRam support, but this is not always true. Stock firmware usually comes with non-zRam kernels. In CyanogenMod and derivatives, you can activate Z-RAM through the menu "Settings -\u003e Performance -\u003e Memory management -\u003e Use zRam". By default, the system allocates 18% of the memory for compressed swap, but the value can be increased to 26% if necessary. In other firmwares, zRam is activated using the Trickster Mod application ("Specific Features" tab), but only 10% of the memory can be allocated this way.

The second effective tip is to transfer all applications to internal memory instead of installing on a memory card. The advantage here is that the built-in NAND memory of a smartphone is by definition much faster than the memory of an SD card, so launching an application from the internal memory will be faster. Moreover, the mechanism for launching applications from an SD card in Android itself is implemented using encrypted containers, which also introduces additional costs.

By transferring all applications to internal memory, we will achieve faster launch. The software already installed on the memory card can be easily returned back through the settings: "Applications -\u003e Third-party -\u003e Application selection -\u003e Transfer to smartphone". To completely disable the function of installing new applications on a memory card, you need root rights and a terminal emulator. Launch the terminal and type two commands:

$ su # pm setInstallLocation 1

Now, by default, all software will be installed in the internal memory. To save the setting between reboots, take any file manager with root support, go to the /system/etc/init.d/ directory and create the following file 99disable-app2sd.sh:

#! / system / bin / sh / system / bin / pm setInstallLocation 1

And with the help of the same file manager, we put the execution bit on it. This is a recipe for CyanogenMod and derivatives. On stock firmware First you need to install the Universal Init.d application, launch it and turn on the switch on the main screen of the application.

conclusions

Applying all the techniques described in the article, I was able to significantly increase the speed of work when using Motorola Defy with CyanogenMod 10.2 on board. The smartphone, of course, did not come close to the speed of the Nexus 4 and other modern devices, but in comparison with the default settings, the comfort from use increased significantly and approached that when using stock Android 2.3.


INFO

If you do not use Google search on your home screen, I recommend uninstalling / disabling the application " Google search". Savings: 10-15 MB and desktop space (the search bar will disappear).