[Q] CM9 : Permanent Background process limit - Galaxy S I9000 Q&A, Help & Troubleshooting

Hi guys,
just one question, search for it but didnt found a solution jet.
I´m using CM9 , latest version ofc. Under Settings -> Developer options -> Background process limit there is some options to choose. I´m unsig "At most, 2 processes". But, after rebooting the device, the option reset itself to "standart".
My question is : Is it possible to set this command as an startup file in the init folder, that after every restart it will be "2 processes" instead of "standart" ??
I hope to get some help, thanks !!!

saphirrot said:
Hi guys,
just one question, search for it but didnt found a solution jet.
I´m using CM9 , latest version ofc. Under Settings -> Developer options -> Background process limit there is some options to choose. I´m unsig "At most, 2 processes". But, after rebooting the device, the option reset itself to "standart".
My question is : Is it possible to set this command as an startup file in the init folder, that after every restart it will be "2 processes" instead of "standart" ??
I hope to get some help, thanks !!!
Click to expand...
Click to collapse
Just a thought but I doubt you can as the phone needs more than 2 process to boot up?.....so I'm guessing this won't ever be a persistent or init.d feature,
Sent from my GT-I9000 using xda premium

Bro, noone said that i want to apply this while booting to phone up...

saphirrot said:
Bro, noone said that i want to apply this while booting to phone up...
Click to expand...
Click to collapse
It was merely a thought
Sent from my GT-I9000 using xda premium

I´ve the same problem....
But I´ve an idea. This app runs an sh file on startup: search in google play for Autostart (root).
but I don´t know the command to set the background process limit... And I don´t know if theres any...

Or can somone say where th Backround Process Limit is saved?

Pretty interesting feature that saves lots of memory and makes the devices work better; i have been using this feature on my Samsung Galaxy tab 2 7, and still setting it up. Makes thing runs better although sometimes you can kill apps that you want to be running in the background.
Any ideas on his question?.

shinydesert said:
Pretty interesting feature that saves lots of memory and makes the devices work better; i have been using this feature on my Samsung Galaxy tab 2 7, and still setting it up. Makes thing runs better although sometimes you can kill apps that you want to be running in the background.
Any ideas on his question?.
Click to expand...
Click to collapse
I'm setting up phones for other people and I have found out that it is the single feature that probably speeds up -the most- most of the phones especially those that are low in the memory department.... Unfortunately to most of the people (that I'm helping with their phones) it is impossible to set this option each and every time that their phones boot so I thought maybe I'd add it a as init.d feature or -maybe so that not to disrupt the booting process- as sth which would run after a timer (which -say- lasts for a minute) runs it's course.
My only question is if anyone know how to enable this feature programmatically (e.g via shell)...
(sorry for the thread ressurection btw)

Two years old unsolved thread and no answer yet... what a shame ...
Greetingz.

this app works for me, there's an option in settings to stop background processes http://forum.xda-developers.com/xposed/modules/recent-app-cleaner-t2734053 although you need to be rooted and have Xposed Framework.

Finally figured this out, man was it annoying.
I need it for my 2012 Nexus 7 running Android 5.1.1
It was running slower than molasseses until I changed the data partition to f2fs (make sure you have a kernel and ramdisk that support f2fs!) and enabled this tweak.
It can be done with root access with a single command.
service call activity 51 i32 x
Where x is the number of background processes you want.
If the API changes in the future, it's easy to look it up again.
http://grepcode.com/file/repository...4.4_r1/android/app/IActivityManager.java?av=f
Look for the line with SET_PROCESS_LIMIT_TRANSACTION
Then just extrapolate that info to http://grepcode.com/file/repository...ERSION/android/app/IActivityManager.java?av=f
Replacing DESIRED_ANDROID_VERSION with the version you're interested in.

Activity number has changed for android 8 and 9
For now the end of 2019, android 8,9 has been the major platform for recent user's handy phone, the command for those use:
```
service call activity 51 i32 x
```
can not be exactly do what you will see in android8 and android9, the major issue was for the activity number '51' must to set it to 42 to Oreo and 47 for Pie, see github issue link (https_:_ //_github.com/flode/SetAndroidProcessLimit/issues/5#issuecomment-546690235 )
That means you should use: `service call activity 42 i32 x` for Oreo and 47 replaced for Pie.
Hope for adding new activity number for Android10

Check that thread for reference:
https://forum.xda-developers.com/showthread.php?t=1494530

Related

Auto Memory Manager 1.0.3

Hi guys. Just wanted to plug my app here. It's based on the work that has been happening in the "auto task killer" thread.
In a nutshell this app lets you configure Android's internal memory manager to help define when to shut down different types of apps.
Features:
- Presets and custom settings
- Works with Android 1.5+
- Sliders for easy setting of the apps.
If you have any questions just pop me and email or hit me up on twitter. This is very much a work in progress so I'll be updating it fairly often. So give it a try (QR code below) and I hope you find it useful.
Requires root access
Another good reason to root my Hero. I'd probably do that before upgrading to 2.1.
sanderg said:
Requires root access
Another good reason to root my Hero. I'd probably do that before upgrading to 2.1.
Click to expand...
Click to collapse
Sorry. forgot to mention that it requires root. If you are rooting then I would recommend flashing a 2.1 ROM since that's faster than the 1.5 ROMs. There are caveats of course since not everything is working perfectly on the 2.1 ROMs but it's working good enough for me. Call me shallow but I LOVE live wallpaper.
Could you perhaps give more information? I have set it to mainly 120MB (to test) and nothing is happening. Does it happen every x mins or something?
G8D said:
Could you perhaps give more information? I have set it to mainly 120MB (to test) and nothing is happening. Does it happen every x mins or something?
Click to expand...
Click to collapse
This works differently than a task killer. What you are doing is setting thresholds for each application type. So if you set the threshold for Empty Apps to be 120MB then Android will kill these apps when there is only 120MB left. This would be most of the time.
However these thresholds are soft settings. So if Android needs to start an app/service or the user manually initiates an app/service then these will still start as normal.
This is my understanding of how it works. (I am not an expert regarding this.) However I have noticed that Android is still starting up certain apps that seem to be useless and I haven't used either e.g. Amazon MP3. This could be something to do with the out-of-memory priority of the app. (will need to investigate this)
For me at least, I have found that using a task killer to kill all apps after you apply your settings works the best. But the app should keep things much tidier in terms of memory usage.
As mentioned above these are soft settings and I have tried setting all bars to 120MB and everything still works fine. You may or may not get the same experience but these are soft settings so the worst that could happen is that you have to reboot your phone and revert to the default setting.
In the next update the settings will be saved after reboot but you will still able to go into the app to change the setting anyway.
I hope I answered your question.

[2.1+] SwitchMe - Share Your Device [MULTIPLE USER SPACES]

MOD EDIT: links removed
Another Android first from Fahrbot Mobile
SwitchMe is a unique application for root users that allows you to log in and out of multiple installations of Android just as you would on a desktop computer.
The technology behind SwitchMe saves all of your applications and data, protects it and stores it as a file in memory. You can then log out of an
account and log into a fresh installation of Android or another account with its own unique content.
You may create as many profiles as the memory is capable of holding. Some of these may require very little free memory because they contain few apps,
others will be larger as they contain many applications and lots of cache and data.
Why is this functionality useful?
Privacy - the most obvious benefit is that you can securely share one device among multiple users, which gives you privacy and peace of mind.
E-reading - whenever you want to read on your tablet but dont want any notifications or need any connectivity, just switch to an ereader profile.
Testing - if you are a developer, you can use profiles as clean sandboxes to test your applications and their interaction with the system.
Gaming – with multiple installations of Android on a single device, you can now play online MMOs as different characters.
Speed - the games your kids play slow down your tablet, but with SwitchMe you can easily create profiles without games or instant messengers.
Battery life - when the battery is low but there are important emails or documents to edit later, switch to a profile which only contains these essentials.
These of course are only suggestions - there are plenty of other uses for the functionality SwitchMe offers.
Usage warning
Its critical to understand that incorrect use of this application can potentially harm your device. This can happen if you create and switch to a profile that
exceeds the available memory – switching into this profile will cause a boot loop as Android attempts to unsuccessfully build the Dalvik cache.
Before proceeding with use we strongly recommend that you perform a full nandroid backup through recovery.
UNOFFICIAL A2SD SOLUTIONS ARE NOT SUPPORTED, USE AT YOUR OWN RISK
Stay tuned, and please rate the application by pressing the star button on the main screen - good ratings help us improve and expand functionality!
Usage warning
Its critical to understand that incorrect use of this application can potentially harm your device. This can happen if you create and switch to a profile that
exceeds the available memory – switching into this profile will cause a boot loop as Android attempts to unsuccessfully build the Dalvik cache.
Before proceeding with use we strongly recommend that you perform a full nandroid backup through recovery.
MOST UNOFFICIAL A2SD AND SIMILAR SOLUTIONS ARE NOT SUPPORTED, USE AT YOUR OWN RISK
Stay tuned, and please rate the application by pressing the star button on the main screen - good ratings help us improve and expand functionality!
Market link:
The Lite version only allows the creation of two profiles and has no security features.
Screens:
Seems neat, can you use the same version of Android with multiple profiles?
Yes... isn't that what it says?
Sent from my GT-P7500 using xda premium
So it is a lot like BootManager? Only hopefully works well and doesnt have tons of bugs
No its nothing like bootmanager.
Hi, first thanks a lot for this app, was looking for something like this a while.
My question is,
i create two accounts, as tell by the help.
One is my main OS, CM7, nightly 181, glitch 13.1
The other account i just see like four hundred kb memory used. if i reboot with this account i get a boot loop only solved by nandroid restore.
What am i doing wrong?
Enviado desde mi GT-I9000 usando Tapatalk
I don't know, its probably something to do with SD links to apps, or just sme weird crazy from the nightly. Works fine on all our cm7 and 9 builds at the office.
By the way, tried the TASK from for 10.1 - it worked fine! So your issues are probably from the mods and other crap. But while you're there, ask yourself, what kind of nutjob would want a grey framework on a tablet like this? Just ditch it for something cool like KANG or at least that Overcome!
Sent from my GT-P7500 using xda premium
ftgg99 said:
I don't know, its probably something to do with SD links to apps, or just sme weird crazy from the nightly. Works fine on all our cm7 and 9 builds at the office.
By the way, tried the TASK from for 10.1 - it worked fine! So your issues are probably from the mods and other crap. But while you're there, ask yourself, what kind of nutjob would want a grey framework on a tablet like this? Just ditch it for something cool like KANG or at least that Overcome!
Sent from my GT-P7500 using xda premium
Click to expand...
Click to collapse
Ok, message received.
Will try from clean cm7 and then I'll go on from there.
Thanks
Enviado desde mi GT-I9000 usando Tapatalk
ftgg99 said:
Yes... isn't that what it says?
Sent from my GT-P7500 using xda premium
Click to expand...
Click to collapse
I was just double checking...
Any issues to report?
1.0.10 - this release is aimed at increasing compatibility, if your device was not supported before for some reason, please use the new logging function to let us know why!
Improved logging, added ability to send logs even from incompatible devices
Reworked native switch code - it is now faster and much more stable on all architectures
Added new notification graphics for all screen resolutions
Any issues to report? Did the last version help those who could not fast switch?
i have jus tried on my kindle, and it works. now ill have to re root it to switch back
This is very cool! I had to pull my battery on the first restart though. My boot animation was up for over 30 minutes. Pulled the battery and it booted right into the second profile.
Unlike the above post, I did not need to reroot. I'm assuming it's just because my ROM is rooted already.
Please excuse my ignorance, I try to avoid flashing as much as possible, but how would I go about installing a different ROM onto just one profile?
Thanks for this nice app! I will actually use it!
EDIT:
Things I noticed:
-On my first swap back into my default profile, I had no vibration! No apps, ringer, notifications, or anything at all. I messed with my settings but it would not vibrate until I restarted.
-This might sound crazy, but I actually think this improved my boot speed. I am running a Droid Charge with Humble 5.0. It wasn't slow before, and maybe it's in my head, but it seems really fast! (I don't have fast swap enabled either)
tctim said:
i have jus tried on my kindle, and it works. now ill have to re root it to switch back
Click to expand...
Click to collapse
You will only loose root if it was installed outside /system with a different name... since 1.0.8 the app copies the binary as well, so that should not be happening. Let me know if it still is please!
Works fine for me! Bought the pro version as this is really very handy - and cheap!
The only real issues so far have been with MIUI... almost everything else should work fine.
I enabled fast switch, and I am very impressed with it! I can switch to my second profile in about 15-20 seconds.
It works great on Droid Charge running Humble 5.0 (2.3.6)
One thing I noticed is that I need to configure my account settings on both profiles, or it messes up my normal profile. Because I am not logged in to my google account on the second, it got rid of all my contacts on the first, and had some verification issues when I tried to buy apps, and with google voice. It also changed my keyboard. None of these are huge issues, you just need to reconcile these differences between the profiles.
Does it work for all Android ?
KCP100 said:
I enabled fast switch, and I am very impressed with it! I can switch to my second profile in about 15-20 seconds.
It works great on Droid Charge running Humble 5.0 (2.3.6)
One thing I noticed is that I need to configure my account settings on both profiles, or it messes up my normal profile. Because I am not logged in to my google account on the second, it got rid of all my contacts on the first, and had some verification issues when I tried to buy apps, and with google voice. It also changed my keyboard. None of these are huge issues, you just need to reconcile these differences between the profiles.
Click to expand...
Click to collapse
That shouldnt be happening... are you sure?
mrubs said:
Does it work for all Android ?
Click to expand...
Click to collapse
It works for all Android versions except those with some types of folder and file links like a2sd.

Script for ICS "Background process limit"?

Hi,
Does anybody know how to create a shortcut or a script to change the background process limit under developer options?
Ideally, I want to have a shortcut on my homescreen that will automatically change the background process limit to 0 before I play ram intensive games (to prevent lags).
The closest thing I can do is create a shortcut that goes to developer options, but then i still need to change the settings manually.
Thanks!
It's "amazing" that nobody has posted a solution for this one yet ... two years old thread ...
Greetingz.
this app works for me, there's an option in settings to stop background processes http://forum.xda-developers.com/xposed/modules/recent-app-cleaner-t2734053 although you need to be rooted and have Xposed Framework.
pryerlee said:
this app works for me, there's an option in settings to stop background processes http://forum.xda-developers.com/xposed/modules/recent-app-cleaner-t2734053 although you need to be rooted and have Xposed Framework.
Click to expand...
Click to collapse
Thanks but I want to disable bg processes automatically (on boot). I tried your suggested app but it just kill few bg processes, not all... I got only 120MB of free RAM, while I got +200MB with manual disabling.
Greetingz.
Finally figured this out, man was it annoying.
I need it for my 2012 Nexus 7 running Android 5.1.1
It was running slower than molasseses until I changed the data partition to f2fs (make sure you have a kernel and ramdisk that support f2fs!) and enabled this tweak.
It can be done with root access with a single command.
service call activity 51 i32 x
Where x is the number of background processes you want.
If the API changes in the future, it's easy to look it up again.
http://grepcode.com/file/repository...4.4_r1/android/app/IActivityManager.java?av=f
Look for the line with SET_PROCESS_LIMIT_TRANSACTION
http://grepcode.com/file/repository...ERSION/android/app/IActivityManager.java?av=f
Replacing DESIRED_ANDROID_VERSION with the version you're interested in.
It's a "bit" late to post it, but if someone wants to manage that option in the background or manually for whatever reason, here you have a way using the Tasker automation app:
https://www.reddit.com/r/taskernet/comments/d4x1ni/task_toggle_androids_background_process_limit/
tech128 said:
Finally figured this out, man was it annoying.
I need it for my 2012 Nexus 7 running Android 5.1.1
It was running slower than molasseses until I changed the data partition to f2fs (make sure you have a kernel and ramdisk that support f2fs!) and enabled this tweak.
It can be done with root access with a single command.
service call activity 51 i32 x
Where x is the number of background processes you want.
If the API changes in the future, it's easy to look it up again.
http://grepcode.com/file/repository...4.4_r1/android/app/IActivityManager.java?av=f
Look for the line with SET_PROCESS_LIMIT_TRANSACTION
http://grepcode.com/file/repository...ERSION/android/app/IActivityManager.java?av=f
Replacing DESIRED_ANDROID_VERSION with the version you're interested in.
Click to expand...
Click to collapse
hello, anyone? if links for lookup above changes, what to do?
CrashOverride93 said:
It's a "bit" late to post it, but if someone wants to manage that option in the background or manually for whatever reason, here you have a way using the Tasker automation app:
https://www.reddit.com/r/taskernet/comments/d4x1ni
Click to expand...
Click to collapse
hey can u help me change it using termux?

What are those apps named 1020 and 1021 ?

While i was checkng my 4g data usage on my huawei p9, i saw these two apps. But i cant see them in applications menu. What are those? Do your devices also have them?
nope.
What version of OS you have? it is branded by operator? any customization you had on it?
Akinaro said:
nope.
What version of OS you have? it is branded by operator? any customization you had on it?
Click to expand...
Click to collapse
No, not branded. i am on L09C636B134 and running androig 6.0. with emui 4.1 and no other customization.
hard to tell, cant find any specific info about such apps in Huawei devices. And I never saw such apps in other Android devices that I have.
One post on some forum mentioned wakelock process, but it was about "10121"
Did you check system processes in App section of settings?
And permissions section?
Also do they take loots of data? Because maybe its just one of many process of SystemAndroid that contain actually lots of smaller sub-processes, and it just show as separate app...
Its actually good to spend those 5min in app section and turn off access to internet that doesnt really need internet(after selecting app, go to DataUsage section and disable all options)
And also enabling turning off apps after screen is off, in Battery Options.
Here are the screenshots. They are neither in "applications" nor in the "system process"
And i cant change their statuses because as you can see they are greyed out.
Please take a look :
http://imgur.com/i7kKo2d
http://imgur.com/Zf4k1vg
http://imgur.com/fr2TpWX
http://imgur.com/odmJS8t
Damn, I have no idea, maybe someone else with better knowledge of android, and especially EMUI system could say if such applications should exist and drain data.
But seeing amount of data it take I can say that its really suspicious behavior, not normal to system apps/processes.
As I see you have enabled data for those apps, so if you can, set All those options bellow to "Not Allowed". It should stop draining your data transfer.
If you cant change that(system gray out those options), and this data drain is annoying for you, I would suggest typical answer: try to update your phone to latest EMUI 5.0 or at least EMUI 4.1.1
I know its overkill for such situation, but way back in early days of Android I found out that reflashing/factory reset/update made few times, actually fix almost all problems -_-
Funny but true....

Defragmentation option appeared. Wow!

For the first time ever since getting my Mate 10 on launch day, I just received a pop up notification to defragment my phone which will improve performance. I did so. Wow they were not wrong there! Everything is so quick now. Apps launch super quickly! Anyone else had the opportunity to defragment their phone?
hI,
what is your device rom version and locale?
ums1405 said:
hI,
what is your device rom version and locale?
Click to expand...
Click to collapse
Mate 10 non Pro. ALP L29C636. UK.
Stange, I got the same phone and rom version .
All I've got was an update to .132 yesterday....
haven't noticed anything about defragmenting phone......
Where can I find it?
cheers.
Great Post.
I don't think you can find it. It just appears out of nowhere. I guess it depends on how much you have used your storage and delete and save files.
One thing I have done recently is empty the recycle bin folder in the gallery app which had over 30 days of deleted photos and videos. Perhaps deleting the accumulated storage taken up left a big gap in the storage file system. This is purely a hunch. Have no idea if this was the reason I got the defragmentation notification.
I wish I took a screenshot of it now.
Just found this blurb.... Defragmentation is mentioned....
"The HUAWEI Mate 10 and HUAWEI Mate 10 Pro take the “Born Fast, Stay Fast” promise to a new dimension. Leveraging AI-powered Battery Management, the devices improve memory allocation utilization, using different mechanisms such as: CPU Resource Allocation and Management, Run-time Memory Management, IO Resource Management, Storage Management and Defragmentation and Battery Management."
Yup I get a de-fragmentation pop up once in a while.
Still waiting for a firmware popup.
I saw this once and laughed, remembered me of Windows 98.
Android is supposed to support trim, so devrafmantation shouldn't be a thing... Unless Huawei is calling it Defrag but instead they're doing something else behind the scenes.
Anyways, the born fast stay fast BS is based on the system continuously trying to shutdown processes ASAP and keep them from working properly, and it's continuously pushing the user to delete all kind of "unused" files.
So I've a phone with 128 GB storage and 6GB of ram, but I neither can use the storage nor keep apps open in RAM cuz the system doesn't like it.
Wished we could disable the phone manager and its BS entirely.
Luinwethion said:
I saw this once and laughed, remembered me of Windows 98.
Android is supposed to support trim, so devrafmantation shouldn't be a thing... Unless Huawei is calling it Defrag but instead they're doing something else behind the scenes.
Anyways, the born fast stay fast BS is based on the system continuously trying to shutdown processes ASAP and keep them from working properly, and it's continuously pushing the user to delete all kind of "unused" files.
So I've a phone with 128 GB storage and 6GB of ram, but I neither can use the storage nor keep apps open in RAM cuz the system doesn't like it.
Wished we could disable the phone manager and its BS entirely.
Click to expand...
Click to collapse
I agree, that could be the reason apps like Adguard keep getting killed regardless of if its been whitelisted in Phone Manager.
As we approach having a stable TWRP/Root solution for ALP's, (cudos to Pretoriano80) I hope devs would find a solution to the over zealous AI/NPU.
Luinwethion said:
I saw this once and laughed, remembered me of Windows 98.
...
Android is supposed to support trim, so devrafmantation shouldn't be a thing... .
Click to expand...
Click to collapse
You are full of BS, one of the weaknesses of F2FS is fragmentation decreases performance more than EXT4, so it actually needs defragmentation.
doesnt F2FS do auto trim?
ums1405 said:
I agree, that could be the reason apps like Adguard keep getting killed regardless of if its been whitelisted in Phone Manager.
As we approach having a stable TWRP/Root solution for ALP's, (cudos to Pretoriano80) I hope devs would find a solution to the over zealous AI/NPU.
Click to expand...
Click to collapse
I am using Adguard without any problems!
CDI12 said:
I am using Adguard without any problems!
Click to expand...
Click to collapse
ditto
Sent from my BLA-L29 using Tapatalk
I just got the notification to defragment on my Huawei P10 VTR-L09 and I clicked it, But I was doing something so I decided to go back to it and do it later. I figured I would be able to do a search In the settings to find the defragment option. Well guess what... It is not there. I guess the only way to defragment is when the system wants you to and not whenever you feel like it. I should have just done the defrag when I first got the message. Now I have to wait until it pops up again.... They should give you the option in the phone manager. Anyone know how frequently the defrag option pops up??
Sent from my VTR-L09 using Tapatalk
Yes a warning to others. If you get the defrag option, you MUST do it there and then. Do not navigate away from that notification as you can't get it back.
tboy2000 said:
Yes a warning to others. If you get the defrag option, you MUST do it there and then. Do not navigate away from that notification as you can't get it back.
Click to expand...
Click to collapse
I've put a shortcut to it on my phone. I'm using nova launcher. Go to widgets/activities/settings. I've got 254 entries under settings, takes a while scrolling but you can find it and add it to your main screen
Edit: widgets/activities/phone manager/defragmentation
wbrambley said:
I've put a shortcut to it on my phone. I'm using nova launcher. Go to widgets/activities/settings. I've got 254 entries under settings, takes a while scrolling but you can find it and add it to your main screen
Click to expand...
Click to collapse
What name of activity
angeloamorato said:
What name of activity
Click to expand...
Click to collapse
Widgets/activities/phone manager/defragmentation.
is there any downside to de fraging the system (like to the updates or smth)

Categories

Resources