[Q] GScript and SET CPU - G2 and Desire Z Q&A, Help & Troubleshooting

So I have gscript and set cpu. Im on temp root with visionary.
I go into gscript and activate, as well, as change it to its set value.
When I go into set CPU, I go to move thet bar to the settings I prefer, and all of a sudden, it defaults back to max @ 800MHZ......
Any ideas, why it is not saving?
Thankyou

Do you have a battery profile that could be causing the reset?
Sent from my HTC Vision using XDA App

When you setup SetCPU, make sure that you have your phone properly selected. Menu >> Device Selection >> AutoDetect
Also make sure that you have granted permissions to SetCPU to OC. Other than that, as Garcia said, check your profiles and particularly their properties that may be overwritting your setup.

Related

[HOWTO] Fix FastDormancy Battery drain without a full wipe/data-reset

After updating to XWKE2, some people reported their battery life greatly improved after doing a full factory reset on the device.
After some research I found out that all you have to do is delete the following files, if they exist on your system:
/data/data/com.android.providers.telephony/databases/nwk_info.db
/system/csc/nwk_info.db
(The second file may or may not exist.)
And reboot your phone. You will notice that FastDormancy will now do short pauses between queries on your logcat (5seconds or more), instead of query non-stop like crazy.
Better yet, if you have the skills, you can figure out which values to set on those databases to make FastDormancy work or disable it on networks that Dormancy is not supported.
Since there are hundreds of different networks out there, it would be impossible for me to figure out the configuration for each one of them, so for now just delete the file and you will already get a great improvement on your battery life.
If you want to know more about the FastDormancy problem, just search on this forum. There are a few threads that already discuss it in length.
Even better, here is how to set the FastDormancy pooling to a very high value, making it save even more battery when your network does not support Dormancy:
You will need to have the file /data/data/com.android.providers.telephony/databases/nwk_info.db on it's original location, so if you deleted, recover your backup copy back in place. If you dont have one anymore, you can download the attached file.
1. make sure the file /data/data/com.android.providers.telephony/databases/nwk_info.db exists
2. make sure you have sqlite3 binary installed (most people install it anyway while rooting). It's usually located at /system/xbin/sqlite3
3. open adb shell as root and execute:
# cd /data/data/com.android.providers.telephony/databases/
# getprop gsm.operator.numeric
310410 <-- write down this number, it's your carrier number and you will need it for the following commands
# sqlite3 nwk_info.db
sqlite> delete from dormpolicy where plmn="310410"; (replace the number 310410 on all commands with the number you got from the previous command)
sqlite> delete from nwkinfo where plmn="310410";
sqlite> insert into dormpolicy values("310410","My Carrier",30,30);
sqlite> insert into nwkinfo values("310410", "My Carrier", "off", 1500, "", "");
sqlite> (hit ctrl-d to exit sqlite3)
#
Done, FastDormancy will only pop on your adb logcat once every 30 seconds. you can change the number to whatever you want, in seconds.
Quick FAQ:
Q: But I don't have the second file?
A: That's fine, most people won't have it. But the code that checks for those files also checks for that one, so just in case I decided to make sure that one is deleted if ever exists.
Q: But that file may have more important network information?!
A: IT DOESN'T. If you take the time to open the file and look at it, you will se that it doesn't have much information at all. You will see it's ONLY contents are related to Dormancy, and NOTHING else. So if you are having FastDormancy problems, they already miss the information you need about your carrier anyway. Also, if you factory reset after KE2, it already delete those files.
Q: My battery usage seams the same!?
A: The problem only appears IF wifi is turned off or in "sleep mode". If you are testing it in those conditions, you won't see anything changed. You will only notice the fix while the phone has no wifi connectivity, has 3g on and is on standby. That's when FastDormancy goes nuts.
Q: How do I disable Dormancy?
A: If you wanna mess with the database or with ro.ril.disable.fd.plmn.prefix=23402,23410,23411, you can find your current network plmn running over adb shell the command: getprop gsm.operator.numeric . It's not guaranteed that it will turn it off. But if you have any luck, post here please.
Q: Why FastDormancy is there in the first place?
A: If your network support Dormancy AND the information required is on those databases, you can get a much improved battery life by using it. But only a few have that right now. Or at least working as intended.
Will give it a try, thanks I hope it helps.
Sent from my GT-I9100 using XDA Premium App
Done. Now we'll see.
Thanks a lot !
is the "nkw_info.db" that i have to delete ?
Something tells me that those dbs have network info that might be needed perhaps? I'm assuming there have been no side effects other than removing the fast dormancy problems?
I'll give it a try 2nt .
Just in case I will copy those files to somewhere else. I am not sure if deleting is the best option.
No change on the android os cpu time, still 2 min /h as before after this fix
CandyAndy said:
Just in case I will copy those files to somewhere else. I am not sure if deleting is the best option.
Click to expand...
Click to collapse
For some reason I even didn't have the second file
CandyAndy said:
For some reason I even didn't have the second file
Click to expand...
Click to collapse
Same here, no second file for me either. Moved the first onto the sd card for now.
where is the file located?
I don't appear to have either file on my device.
How to change dormancy to off?
Sent from my GT-I9100 using XDA Premium App
So has anyone found that this has helped?
Sent from my GT-I9100 using XDA Premium App
Battery much worse. Phone now in arabic, wont boot and also has lcd juice leaking out of the earphone socket
Sent from my GT-I9100 using XDA Premium App
I only had the first file to have moved that to my sd! Only time will tell I guess!
Sent from my GT-I9100 using Tapatalk
jangomango said:
Battery much worse. Phone now in arabic, wont boot and also has lcd juice leaking out of the earphone socket
Sent from my GT-I9100 using XDA Premium App
Click to expand...
Click to collapse
Nice one
Right, I'm an idiot, you can't see anything in the data directory without a decent file browser that takes advantage of superuser permissions.
I have now removed the first file (no trace of the second one, for reals) and will see how things go.
So far today, Android OS has account for 48 minutes of CPU in 5 hours, so it'll be interesting to see if that drops off...
I'm an idiot, too.
Not moved and directly deleted that file.
Damnit.. Next time it might be helpful if you are NOT 100% sure that it helps, please don't tell to remove instead of moving file..
13 Sekunden means 13 SECONDS!
Um, unixbyte, not sure what you're showing us there?
13 seconds of use isn't *really* enough to tell whether this has made a difference...

[FIX] Tasker and the pattern lock

One of the things that I wanted to use Tasker for was enable the pattern lock when I was away from home and then disable it at home. Unfortunately due to recent changes in the Android SDK that is no longer possible with Tasker directly.
With a bit of searching I discovered the Secure Settings plugin which can be installed to /system/app and thereby provide Tasker with the functionality. However, it seems that Secure Settings does not work on the Galaxy S2 because Samsung have their own pattern lock and method of controlling it.
I started doing a bit of digging (mainly using logcat to see what the system was doing when the pattern lock was enabled/disabled via the Location and security settings menu). I discovered that the Samsung lock system is controlled by some files in /efs and with a bit of experimentation I was able to enable/disable the pattern lock via a root shell. I contacted the author of Secure Settings who suggested I use the Locale Execute plugin to run shell commands via Tasker.
So I present here the commands I am now using on my phone and hopefully they will be of some use to others. The commands include a check that should ensure that it does not attempt to enable the pattern lock when no pattern has been set, but this has not been fully tested!
WARNING: These commands require root access and you use them at your own risk!
Make sure to install the Locale Execute plugin first and then to enable the pattern lock with a task simply add a new "Plugin/Execute" action and set the contents to:
Code:
@! if [ "`cat /efs/cryptprop_lockscreen.patterneverchosen`" = "true" ]; then echo -n true > /efs/cryptprop_lock_pattern_autolock; fi
To disable the pattern lock create an Execute action with the following contents:
Code:
@! if [ "`cat /efs/cryptprop_lockscreen.patterneverchosen`" = "true" ]; then echo -n false > /efs/cryptprop_lock_pattern_autolock; fi
These have been tested on rooted stock KE7 firmware.
Enjoy,
Dan
Sorry for sounding stupid (I probably will)
But could you make a tasker-noob-proof-tutorial?
I couldn't find where to change, if it should be active inside or outside the given area (home or not home)..
Thanks in advance
mljjlm said:
Sorry for sounding stupid (I probably will)
But could you make a tasker-noob-proof-tutorial?
I couldn't find where to change, if it should be active inside or outside the given area (home or not home)..
Thanks in advance
Click to expand...
Click to collapse
He described the command action so you can apply your own rule... Google for tasker and you'll find a lot of howto
Sent from my Galaxy SII
If you find this post usefull please press the "Thanks" button
Great!
Is there a way to toggle 2G/3G and GPS via tasker on the galaxy s2?
great thread, thank you!
could you please export your tasker profile and upload it somewhere? i'm a tasker noob
@mljjlm
I'm sorry but this is not a tutorial for Tasker, it simply provides the information necessary to configure your own profiles for toggling the pattern lock. Although the information at the end of this post may prove useful.
@bgx
No idea I'm afraid, I've not had a chance to look into those although I'm pretty sure it's not possible to switch 2G/3G or GPS in the same way that the pattern lock is toggled here.
@js931
My profile is based on location (using the "Cell Near" state) and so will not be much use for anyone else. However I basically configured the following:
Create profile called "Home".
Add a "Cell Near" state and configure for my local towers.
Add a task called "Home" and include the "Execute" action described above for disabling the pattern lock (I also turn off mobile data and turn on wifi here).
Add an exit task called "Away" which includes the "Execute" action to enable the pattern lock (I also turn on mobile data here).
In your code for disabling the pattern, should the code read 'patternneverchosen' rather than 'patterneverchosen' as you have written? I haven't tested, but the spelling seemed odd.
If it's correct, ignore me
Major_Sarcasm said:
In your code for disabling the pattern, should the code read 'patternneverchosen' rather than 'patterneverchosen' as you have written? I haven't tested, but the spelling seemed odd.
If it's correct, ignore me
Click to expand...
Click to collapse
It is actually correct (I double checked the first time I tested it out since it was an ambiguous name), it is supposed to be:
pattern-ever-chosen
which is why I check for it being true in my command since we want a pattern to have been set.
Edit:
It has actually been properly tested today, I was away from home and the pattern lock was enabled, when I got back home the pattern lock was disabled.
One thing to be aware of, when setting up the Tasker profile, is that each "Execute" command requires its own root permission, so you have to make sure that these have been allowed before it will work quietly in the background (you should be able to trigger them by testing the task).
It works . Thanks !!!
It works great, however when the Lock Pattern is disabled, I still get the "slide to unlock" type of screen when waking the phone up. Any command for that?
I am running the stock SGS2 ROM (rooted obviously)
Thanks !
I am new to tasker and would like some help/advice
I want to save power a bit so want my gps to only turn on in certain cell tower locations (in order to aid more specific tasks when in those cell locations). my issue is not setting this up, it is in the fact that taskers default gps toggle settings do not work on the sgs2. Can anyone help with this, rather than me having to keep it checking gps all the time (which I have currently delayed to 10 minute checking slots).
Edit: Also not sure if it is me just being dumb, but I cannot see that plugin on that link in the OP..?
Excellent work, do you know if this will work with the original Galaxy S as well?
@julien.me
The slide to unlock keyguard is handled differently to the pattern lock, but you should be able to enable/disable it using Tasker without any hacking. I use Tasker to disable the keyguard when it is plugged in.
@Lennyuk
I mentioned in an earlier post that I have no idea how the 3G or GPS is enabled disabled, but I am fairly sure it cannot be achieved using a method like this.
@m.shafik
The original Galaxy S handles the pattern lock differently so this solution will not work, but the Secure Settings plugin may be of use.
Regards,
Dan
m.shafik said:
Excellent work, do you know if this will work with the original Galaxy S as well?
Click to expand...
Click to collapse
I used Tasker to do the same thing on my Galaxy S last night coincidentally - only in a somewhat more simplistic way as I am not as technically strong as most people here.
I have a simple Tasker profile that checks my location and if I am at home it executes an action to turn "Keyguard Off". Keyguard is under "Display" in the Action categories. Setting Keyguard to Off disables both the pattern lock and the slide lock.
My case is actually a little more complex because I want to disable the keyguard in two situations, when I am at home or when I am driving in the car. I did this by creating two profiles, the first of which checks to see if the GS is connected to my home wifi, and the second of which checks whether I am connected to my car Bluetooth. If either case is found to be true the relevant profile sets a variable. When the case become untrue (ie. I leave the house or turn the car off) the profile will clear the variable (via an exit action). I then have a third profile that simply turns off the keyguard when the variable is set.
I appreciate that there are probably cleverer and better ways to achieve the objective but I only installed Tasker last night so I am only just lifting the lid.
Hi terranim, I was using your script several days and it worked like a charm, but now I updated to 2.3.4 and it does not work anymore. Any advice ?
Sent from my GT-I9100 using Tapatalk
@hotsync100
I have not gotten around to updating my phone to 2.3.4 yet. As soon as I have I will try to figure out what is going on with my pattern lock hack.
Regards,
Dan
I'm now running Lite'ning v2.2 and the tasker fix still seems to work.
Which ROM for 2.3.4 have you upgraded to?
Dan
terranim said:
I'm now running Lite'ning v2.2 and the tasker fix still seems to work.
Which ROM for 2.3.4 have you upgraded to?
Dan
Click to expand...
Click to collapse
Stock kg1
Sent from my GT-P1000N using Tapatalk
Tried again and worked. I do not know what did I changed, may be the kernel . Thanks anyway .
Sent from my GT-I9100 using Tapatalk
I can't get it to work well on my SGS2 2.3.3 stock unrooted. I enabled admin and set Tasker to disable the keylock in a profile (when I'm at home and the wifi ssid is visible). The profile activates but I always get the lock.
And I mean the stock lock screen with the pin (not the pattern one which I read that requires rooting and the method explained in this thread)
Missing something?

[Q] Battery tips after root

So I just unlocked the bootloader and rooted my VZ SGN. My first root! And I have been suffering, like many, from the Android OS bug that is affecting battery life. So I was just wondering, since I now have superuser access and whatnot, what can I do to make my battery life better?
I'm still on stock ROM, 4.0.2, as of now. I will start adding ROMs later on. So for now, what can I do?
thanks in advance
Flash a new kernel
joshnichols189 said:
Flash a new kernel
Click to expand...
Click to collapse
This. If you're into flashing roms and kernels I'd use AOKP with Franco's kernel. It's a great combo.
Tree of Knowledge said:
... use AOKP with Franco's kernel. It's a great combo.
Click to expand...
Click to collapse
^That's what im running
Sent from my Galaxy Nexus using XDA App
I use AOKP and Apex kernel. Great match for me
thanks for all the answers. how exactly do i install a kernal? i have rom manager and all, so maybe i can use that app to do it. also, does installing a new kernal mean i have to change the ROM? and if i do install it, will all my data be safe?
and for all those who already replied with recommendations for kernals, what sort of battery life do you get with them? and how good is the signal and performance etc?
sorry for so many questions, but im new to this
Try turning off GPS or freezing maps.
Sent from my Galaxy Nexus using xda premium
I'd start by not using rom manager.
flash CWM recovery and use that to flash ROMs/Kernels. Theres a great user guide in the development forum.
This is a battery saving list that was actually written for the Bionic, but most of it will apply to the Gnex too. The main caveat is to be careful about doing a Factory Data Reset. If you do one by select it in the Backup & Reset menu in Settings it will wipe everything off of your sdcard. So be sure to backup anything you want to saved to your computer first:
If you are having short battery life here’s a list of things that can help. Just read through the list and select the items that fit with the way you want to use your phone. Not all items will work for everyone and this list was written for the Droid Bionic but should work for your phone too:
- Don't use an automatic task killer--not even the one that comes with the phone. Reboot your phone and look at what's running. If anything that you've installed is running and there's no reason for it, then uninstall it and find an alternative that behaves. Ignore any stock apps that run on boot as I've found them to be more or less benign.
- Weather widgets, live wallpapers, news/social feeds, any app or service that you use that runs--do without it if you can. If you can’t do without it, lengthen it’s refresh time.
- Don't use antivirus
- Set your WIFI sleep policy to never. The default is "turn off when screen turns off". This will cause the wifi to reconnect every time you open the phone. From any Home Screen select Menu/Settings/Wireless & Networks/ and then use the Menu button to see some new options - select Advanced. Then select Wifi Sleep Policy and set it to Never. Home key to return to Home Screen.
- If you have access to wifi, leave it toggled on as it is more efficient than 3G. Wifi consumes less battery power than 3G.
- I leave GPS toggled on too by the way. Apps use it as needed. When I'm done with Maps or an app that uses it, I'm sure to return to the home screen so GPS can stop. Under wireless settings turn on "Google location services" so that an app is able to use network resources to get your location instead of GPS. I have "VZW location services" turned off--don't know why that option is even there. By the way, I increase the speed of voice output > text to speech > speech rate because I like the directions to get spit out faster. That saves a bit of battery. Turning off the display and just listening for directions help. Also, often I just get the directions and then exit back to the home screen: GPS uses so much battery I try to get it over with ASAP.
- When you get a 1) new battery, 2) do a factory reset, or 3) an OS upgrade - run your battery all the way down until the phone shuts off and then charge the battery all the way up. This will calibrate the phone's understanding of the battery's capacity. Do this once every month or two also, but don't do it too often if you can help it.
- I have my battery set to "Performance Mode" and data is on all the time because I am on call 24x7. If you don't mind, try out a more conservative battery profile to save more gobs of energy.
- Set screen brightness to "Automatic"
- Under Accounts, click on any account listed and turn off sync for any items that you're not interested in syncing. For example, Google Books if you don't use it. Don't use Backup Assistant--I prefer syncing my contacts with Google. You don't need both. Also go into your contacts > menu > display options > backup assistant > UNCHECK. Also do contacts > menu > more > settings > contact storage > and select your Google account and "remember this choice"
- Turn on Bluetooth only when you are going to use it.
- Consider turning off voice privacy. This may not be a big deal but it will save some processing (and therefore battery). It may also improve call quality.
-Turn off haptic feedback, animations, and any un-needed sounds in Android settings and in your apps
- Set your screen timeout to as low a time as you can stand (I use 1 minute) and manually turn the screen off when you’ve finished using the phone.
- Turn off in-pocket detection. In-Pocket Detection has been the source of many issues already.
- Keyboard: turn off vibrate on key press and sounds for any keyboards you use
- Use a red or black screen background. On the original Droid screen--not sure about this Bionic screen--red was the most efficient color that could be displayed.
- Camera app: I like keeping location on and flash on auto. Consider turning location off or at least returning to the home screen ASAP when using camera if location for camera is on.
- In stock browser the default home page is Google and it uses your location. This is a bad idea as it can waste your battery for no reason. Make something else your home page and make sure to close any web page that uses your location when you're done viewing it.
- Charge your phone via the wall charger instead of computer USB as it is faster. Also, don't use long USB cords--use regular power extension cords instead. I stick with the charger that came with the phone. Put the phone on charger when you go to bed every night.
- Consider install the Home Replacement app Zeam. It is basic app that uses very few resources and will help with battery power.
- Emails: I don't know what email app you use, but try this. It saves battery power and in some cases emails arrive quicker. This scheme will have you using only the Gmail app on the phone for all email accounts whether they are pop3 accounts or Gmail.
- If you are using Live Wall Papers, stop!
------------------------------------------------------------------------------------------------------------------
This is a link to some very good videos about saving battery power on the Bionic (there are 4 parts and the other parts will show up as available videos when part 1 finishes):
Battery Saving Video
Part 1: http://www.youtube.com/watch?feature=player_embedded&v=cvWg7SbUgsI
If battery life is still bad: Consider doing a factory reset: These have gotten pretty painless lately by following these simple steps: 1. Make sure Backup and Restore are checked in the Privacy setting. 2. When going through the setup after the reset, turn on wifi as soon as you can (assuming it is available). 3. After you have entered your Gmail account info, you will be presented with a screen that has two check boxes. Basically they are "Do you want Google to backup and restore this phone”. Make sure you check both of those. Your apps will then automatically reinstall (paid and free). Set the phone aside for a minute or two and let the apps download and install. 3. If rooted, use an app such as titanium backup to restore data only to select apps such as Tapatalk and you will not have to re-enter all your login information. I do this for 3-4 apps (Tapatalk, SPB Shell, etc.).
I've been flashing new roms/updates about once per day lately and I can be up and running with all my apps and settings back in place in less than 20 minutes. It's pretty painless now.
thanks for all the responses. i think i might flash AOKP and franco's kernel on my SGN.
I have a couple more questions though.
1. So if i wanna flash those two, i can simply flash the rom and then flash the kernel right after, without have to re-wipe my data or anything like that?
2. does the backup feature in CWM backup app data and homescreens and all? or do i need titanium backup or something? or is it just not possible for me to do?
3. and if an update comes out for either AOKP or the kernel after i have flashed it, do i need to wipe my data again and flash the latest zip file or can i just update over the existing one?
thanks
also, do i install the kernel first or the rom?
Peesashiz said:
can someone give me a link to the latest aokp rom?
i tried searching on rootzwiki but couldnt find it.
also, do i install the kernel first or the rom?
Click to expand...
Click to collapse
ROM first, the install will overwrite any kernel you have installed previously.
thanks.
can u answer a couple more questions?
1. does cwm backup everything? including app data and homescreens and all?
2. what is the command to mount a file onto the sd card? i used to know but i forgot
thanks again everyone!
Peesashiz said:
thanks.
can u answer a couple more questions?
1. does cwm backup everything? including app data and homescreens and all?
2. what is the command to mount a file onto the sd card? i used to know but i forgot
thanks again everyone!
Click to expand...
Click to collapse
1. CWM will backup everything
2. adb push command? If you want to transfer a file to the sd, that is the command.
ok, thank you guys so much!
i will install my first ever ROM shortly

Bandwidth Config App

Does anyone know of an app that allows you to create custom speed profiles to limit your bandwidth? There is a way to do so on iPhones usng developer options and creating profiles. I know that I can change my network within my settings, but that would require me to reboot my phone. I need a way to swap the settings and continue to work, without rebooting the phone.
I'm testing an app for work and I need to be able to load different profiles on my phone to test loading and content delivery without rebooting.

Change Performance Profile Automatically (Tasker)

Hi,
I recently upgraded to Android 10 (Linage 17.1)
I would like to change the Device Performance (Power Save, Effieciency, Balanced, Quick, Performance) automatically in tasker but this setting doesnt seem to be stored in system, global, secure settings.
Could someone advise where it is stored or what command i can send to get it to automate between the settings
thanks

Categories

Resources