Is there any way of modding cpuinfo_max_freq without custom kernel? - Galaxy S I9000 Q&A, Help & Troubleshooting

Is there any possibility of modding /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq without modding the kernel?
Just in case you don't know, cpuinfo_max_freq is the file that limits the maximum processor speed to 1000mhz.
cpuinfo_min_freq is the one that limits the minimum processor speed to 100mhz (i've no interest in modding that file).
I know i can acquire this with a custom kernel or by modding one myself, but i'd like to know if there's any way of doing this other than with a custom kernel.
Tried using root explorer and change permissions to write too apart from read and then modding, without success.
Tried changing permissions using root explorer and then using an init.d script
Tried a few more things, but so far none have worked.
Thanks

You did everything correct but one thing more open root explorer.
# Go to desire file (make sure you have it on rw)
# Now press and hold the file
# a menu will popup
# go to open in text editor and you can edit it
Enjoy

i have just tried it.. normally when i change any system file with text editor, i click on "save&exit" and it says it is saved and the original file is named as xxxxxxx.bak..
but this time there is no .bak file and the original file is not changing.. i write 1200000 but when i try to open it again it turns back into 1000000 ...

kkube said:
You did everything correct but one thing more open root explorer.
# Go to desire file (make sure you have it on rw)
# Now press and hold the file
# a menu will popup
# go to open in text editor and you can edit it
Enjoy
Click to expand...
Click to collapse
Tried that too. Root explorer says it's modded it but if you open it again, no change has been applied
Apparently, it's read only even after changing permissions.

or that file is modified by something else all the time.. obviously we have to change something else before that..

_delice_doluca_ said:
or that file is modified by something else all the time.. obviously we have to change something else before that..
Click to expand...
Click to collapse
The kernel. Just wanted to find out if there was another way, it'd be much simpler than modding a kernel. It seems there isn't

Just a trial idea, copy that file to as card, then edit it. See if it saved then, then rename old one as xxxx.bak and paste the edited file there.
I can't do it as I am on a custom kernal and i am able to change it as I said.
Check it out and tell if that's any help
Sent from my GT-I9000 using XDA Premium App

coldflid said:
Is there any possibility of modding /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq without modding the kernel?
Just in case you don't know, cpuinfo_max_freq is the file that limits the maximum processor speed to 1000mhz.
cpuinfo_min_freq is the one that limits the minimum processor speed to 100mhz (i've no interest in modding that file).
I know i can acquire this with a custom kernel or by modding one myself, but i'd like to know if there's any way of doing this other than with a custom kernel.
Tried using root explorer and change permissions to write too apart from read and then modding, without success.
Tried changing permissions using root explorer and then using an init.d script
Tried a few more things, but so far none have worked.
Thanks
Click to expand...
Click to collapse
Its impossible, i tried this command on terminal: echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq it says permission denied (i was su)

Use Tegrak Overclock

Edit System Files
I have the same problem

think you have to edit the init.rc file

Related

[PATCH] Soundless HTC Tattoo Bootscreen

I have made a little file for the people who want a silent bootscreen on a stock rom
Updated the installer for more ease
http://peecee.dk/upload/view/251459
How to apply?
Interested! And how to apply your hack/patch to device? Please explain, coz i'm using device for only a couple of days.
there is an easier method, just in case...
u need root and then to extract bootloader file. open it with an text editor. then find the lines where u see "use audio 1", change 1 with 0 and then push back the file to replace the old one...
myzhLAN said:
Interested! And how to apply your hack/patch to device? Please explain, coz i'm using device for only a couple of days.
Click to expand...
Click to collapse
just use the "root 1 click "http://forum.xda-developers.com/showthread.php?t=644279
program first to get root and then do as it says in readme
Bikers said:
there is an easier method, just in case...
u need root and then to extract bootloader file. open it with an text editor. then find the lines where u see "use audio 1", change 1 with 0 and then push back the file to replace the old one...
Click to expand...
Click to collapse
this is for people that aren´t so familiar with extracting and pushing files
Silent boot
if u have rooted tattoo
just install root explorer goto system/media/bootscreen/ & delete boot.mp3
u just done
don't forget backup your file

[Q] Permanently change system file

i want to change the file "sys/devices/i2c-0/0-0066/leds/jogball-backlight/period" to "2"
to do this i have to edit the permissions for it to work, but every time i reboot it reverts back to the original file
does anyone know how i can change this file permanently?
when i change it, it says file backed up as "period.bak" but i cant find where this is backed up to
This is not a real file. This is a virtual file - interface to device driver parameters. To change it permanently, you need either to see where the initial value comes from and change it there somehow, or to overwrite the driver interface file each boot.
Don't suppose you know where the original file is?
Sent from my Nexus One using XDA App
I don't know if this will work as it is piecing together multiple responses in multiple threads, but I believe if you add a script into the /etc/init.d folder, it will run it.
I believe it needs to be called something that has numbers at the front. Something like 99setpulserate
Code:
#!/system/bin/sh
if [ -e /sys/devices/i2c-0/0-0066/leds/jogball-backlight/period ]
then
/system/xbin/echo "2" > /sys/devices/i2c-0/0-0066/leds/jogball-backlight/period;
fi;
Again, save it something like 99setpulserate and give it 777 permissions
Code:
chmod 777 /etc/init.d/99setpulserate
Hope this works. Let me know.
bassmadrigal said:
I don't know if this will work as it is piecing together multiple responses in multiple threads, but I believe if you add a script into the /etc/init.d folder, it will run it.
I believe it needs to be called something that has numbers at the front. Something like 99setpulserate
Code:
#!/system/bin/sh
if [ -e /sys/devices/i2c-0/0-0066/leds/jogball-backlight/period ]
then
/system/xbin/echo "2" > /sys/devices/i2c-0/0-0066/leds/jogball-backlight/period;
fi;
Again, save it something like 99setpulserate and give it 777 permissions
Code:
chmod 777 /etc/init.d/99setpulserate
Hope this works. Let me know.
Click to expand...
Click to collapse
sorry, 777 permissions? as in tick all of em? never mind
maxib123 said:
Don't suppose you know where the original file is?
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Most probably it's hard-coded somewhere in the system, which would require recompiling. Overwriting the value each boot, for example with init.d scripts as suggested above, would be much simpler. Just make sure that the value is initialized by the time you're executing your script, and that the ROM is configured to run them.
Jack_R1 said:
Most probably it's hard-coded somewhere in the system, which would require recompiling. Overwriting the value each boot, for example with init.d scripts as suggested above, would be much simpler. Just make sure that the value is initialized by the time you're executing your script, and that the ROM is configured to run them.
Click to expand...
Click to collapse
how would i do that?
bassmadrigal said:
I don't know if this will work as it is piecing together multiple responses in multiple threads, but I believe if you add a script into the /etc/init.d folder, it will run it.
I believe it needs to be called something that has numbers at the front. Something like 99setpulserate
Code:
#!/system/bin/sh
if [ -e /sys/devices/i2c-0/0-0066/leds/jogball-backlight/period ]
then
/system/xbin/echo "2" > /sys/devices/i2c-0/0-0066/leds/jogball-backlight/period;
fi;
Again, save it something like 99setpulserate and give it 777 permissions
Code:
chmod 777 /etc/init.d/99setpulserate
Hope this works. Let me know.
Click to expand...
Click to collapse
just checking, does the "99setpulserate" file just need to be a new file, or do i copy it over and rename it?
I'm not exactly sure what you mean. It needs to be a new file, but you can copy the text and past it in (if you use adb, or the browser on the phone).
The numbers at the beginning are the order in which things should be run (if I remember correctly from my old linux classes, Slackware uses the RC files which is slightly different). So technically, you can pick any number, but it is best to leave user scripts at 99 so that everything that needs to get loaded beforehand can get loaded.
bassmadrigal said:
I'm not exactly sure what you mean. It needs to be a new file, but you can copy the text and past it in (if you use adb, or the browser on the phone).
The numbers at the beginning are the order in which things should be run (if I remember correctly from my old linux classes, Slackware uses the RC files which is slightly different). So technically, you can pick any number, but it is best to leave user scripts at 99 so that everything that needs to get loaded beforehand can get loaded.
Click to expand...
Click to collapse
yeh... its doesnt work :L
maxib123 said:
yeh... its doesnt work :L
Click to expand...
Click to collapse
What if you manually run the file?
Code:
sh 99setpulserate
See if it is a screwup in the script or my understanding of the init system of Android (I am leaning towards the second one, because I double checked the script and it seems fine).
bassmadrigal said:
What if you manually run the file?
Code:
sh 99setpulserate
See if it is a screwup in the script or my understanding of the init system of Android (I am leaning towards the second one, because I double checked the script and it seems fine).
Click to expand...
Click to collapse
2: not found
tried on adb and emulator
Include the full path to the script when you run it from shell.
I don't know why it wouldn't be working, but I suppose worst case, you could always just add the contents of the script (except for the first line) to the 20userinit file at the bottom.
maxib123 said:
Don't suppose you know where the original file is?
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
i can show you exactly where the source code is for this file. its the microp.c file in arch/arm/mach-msm folder of the source code kernel.
EDIT: here is the actual file source code.
https://github.com/CyanogenMod/cm-k....37/arch/arm/mach-msm/board-mahimahi-microp.c
you could possibly have someone compile a kernel with changes to this that would set it to your value so you wouldnt have to mess with it each boot up. but i havent look at the code yet to know, so i'll take a look and see.
EDIT: so it looks like when powered up this driver defines the particular data in question from this register address:
Code:
#define MICROP_I2C_WCMD_JOGBALL_LED_PERIOD_SET 0x5D
so you could easily just add some code to set it to your value of 2 upon initialization. i want to say that you can permanently set that register address to a different value. but it seems like its getting cleared upon each reboot, so your best option is to just have the code set it manually.
probably easier than compiling your own kernel would be to just create some simple BASH script that does this upon boot up. though the more fun proper way is change the code.
Jack_R1 said:
Include the full path to the script when you run it from shell.
Click to expand...
Click to collapse
Yeh I did
Sent from my Nexus One using XDA App
How about creating a pre-modified version of the period file, and have the init overwrite the current one at each boot, rather than trying to edit it in the fly...?
danger-rat said:
How about creating a pre-modified version of the period file, and have the init overwrite the current one at each boot, rather than trying to edit it in the fly...?
Click to expand...
Click to collapse
what do i need to do to do that?
If you look at that code, its not an actual file but just a virtual register read from the hardware. So your only option is to create a startup init script to write your desired value to that register (file) on boot up.
why has it changed? it used to be how i want it on the older versions of cyanogen, isnt there some files i could just take from those files and take it over?? seems like a much simpler option :L

[Q] overclocking Rachts cm7 roms

I've been wanting to overclock my phone for a while but i haven't found any answers for my question. i wanted to know whether i need to just push x8oc.ko or if i would have to do the whole thing? and would doing the whole thing mess up the dual touch module?
Just push it and ismod, then set OC in CM Settings under Performance thats for cm7 for cm 6 use set cpu.Done.
Look for the x8oc.ko/x10minioc.ko (that´s how it´s named in miniCM6, but it works on X8!) file in system/lib/modules.
If it´s not there, paste it there with Root Explorer/ES File Explorer (the newest one has a root mode)/ADB shell.
Then, write the required line (look for it in the OC-thread) on the beginning of the hw_config.sh file.
Rebbot.
After that, you can set the frequency with SetCPU or another similar app.
Or, if th efile is there, look for Overclocking in Settings-Cyanogenmod

[MOD] Enable init.d scripts support on stock kernel

Hello!
This is a small mod, inspired by non other than our great DoomLord (so if it helped you, thank him/donate to him/worship him ) and his thread in the X10 section.
I am trying a lot of things on my phone, so I often switch back and forth from stock kernel to DoomKernel.
However, I use lots of init.d scripts (my favorite one being SuperCharger)
and I just don't want to lose this feature when I'm on stock.
So, without further ado, here are the steps that are needed to make init.d scripts run automatically at boot on stock kernel.
Requirements:
1. Stock Kernel
2. Root
3. Busybox
4. CMW Recovery for Stock Kernel by nAa.
5. Root Explorer or any other similar app.
Instructions:
1. Download the attached zip and place it in a folder in your SD card.
2. With Root Explorer, go to /system/etc. Press the Mount RW button on top right corner.
a. If the file install-recovery.sh is not there, then press Menu and create a New File.
Name it install-recovery.sh and then long-press on it and select Open in Text Editor.
Paste this text in it:
Code:
#!/system/bin/sh
# init.d support
busybox run-parts /system/etc/init.d/
Save it and delete any .bak file that Root Explorer might have created. Set the permissions as in the attached screenshot.
OR
b. If the file install-recovery.sh is already there, long-press on it and select Open in Text Editor. Paste this text in the end:
Code:
# init.d support
busybox run-parts /system/etc/init.d/
In both scenarios, don't forget to leave one empty line at the end of install-recovery.sh file. ***
3. Reboot into Recovery and flash the init.d-autorunner-stock.zip.
4. Reboot your phone and with Root Explorer go to /data/local/tmp.
There should be a txt file there named "init.d_log_test.txt" and once you open it, you should see the word "done".
5. Now you can use your favorite init.d scripts on stock kernel!
If you want to check if the scripts you want to use actually work, please refer to one of my older threads about how to test them.
*** I am not including an install-recovery.sh because this is the file that Link2SD depends on, so it's better if you modify it yourself, rather than use mine.
Let me know if it worked for you!
iridaki said:
Hello!
This is a small mod, inspired by non other than our great DoomLord (so if it helped you, thank him/donate to him/worship him ) and his thread in the X10 section.
I am trying a lot of things on my phone, so I often switch back and forth from stock kernel to DoomKernel.
However, I use lots of init.d scripts (my favorite one being SuperCharger)
and I just don't want to lose this feature when I'm on stock.
So, without further ado, here are the steps that are needed to make init.d scripts run automatically at boot on stock kernel.
Requirements:
1. Stock Kernel
2. Root
3. Busybox
4. CMW Recovery for Stock Kernel by nAa.
5. Root Explorer or any other similar app.
Instructions:
1. Download the attached zip and place it in a folder in your SD card.
2. With Root Explorer, go to /system/etc. Press the Mount RW button on top right corner.
a. If the file install-recovery.sh is not there, then press Menu and create a New File.
Name it install-recovery.sh and then long-press on it and select Open in Text Editor.
Paste this text in it:
Code:
#!/system/bin/sh
# init.d support
busybox run-parts /system/etc/init.d/
Save it and delete any .bak file that Root Explorer might have created. Set the permissions as in the attached screenshot.
OR
b. If the file install-recovery.sh is already there, long-press on it and select Open in Text Editor. Paste this text in the end:
Code:
# init.d support
busybox run-parts /system/etc/init.d/
In both scenarios, don't forget to leave one empty line at the end of install-recovery.sh file. ***
3. Reboot into Recovery and flash the init.d-autorunner-stock.zip.
4. Reboot your phone and with Root Explorer go to /data/local/tmp.
There should be a txt file there named "init.d_log_test.txt" and once you open it, you should see the word "done".
5. Now you can use your favorite init.d scripts on stock kernel!
If you want to check if the scripts you want to use actually work, please refer to one of my older threads about how to test them.
*** I am not including an install-recovery.sh because this is the file that Link2SD depends on, so it's better if you modify it yourself, rather than use mine.
Let me know if it worked for you!
Click to expand...
Click to collapse
Was looking for this...!!! Thanks...!!!
Sent from my LT15i using xda premium
thank you. but what is this script for? Can you explain it 2 me?
mercury_beta said:
thank you. but what is this script for? Can you explain it 2 me?
Click to expand...
Click to collapse
This is a setup in order for scripts placed in /system/etc/init.d to be executed automatically at boot. Such scripts can do lots of things, like RAM optimisation, CPU scaling, mount options, etc etc etc.
Can the script be added to hw_config.sh? Will it be execute on boot? Inteks' swap2cache script can be added to hw_config.sh too.
Sent from my digital typewriter..
emannxperia said:
Can the script be added to hw_config.sh? Will it be execute on boot? Inteks' swap2cache script can be added to hw_config.sh too.
Sent from my digital typewriter..
Click to expand...
Click to collapse
Sorry, I don't know for sure. But probably yes.
Great post mate, thanks. (already give you thanks button)
Seeing if this works on ray
I get this file in the init.d folder after.flashing the file
#!/system/bin/sh
touch /data/local/tmp/init.d_log_test.txt
echo "done" >> /data/local/tmp/init.d_log_test.txt
Not in data/ local
I have ran supercharger script and files are appearing in inlit.d folder think it's working
Edit : tested it as per the thread further up it would seem its all working!
Sweet
Hope it is ok I have shared this on the Ray thread? (I have linked back to your thread)
sent from my gorgeus Xperia Ray
Hi iridaki thanks for your little mod here! I just want to give a hint of what might been a little issue but might make your whole mod is not running. You do mention about changing permission on install-recovery.sh, but you gave it as a picture. The Problem is XDA on web these days is not arranging the image as inline, but as an attachment. So i and chiefy009 did the same mistake, not changing the permission because it is just a one line and not clear enough. Please add additional step like:
3. Make sure install-recovery.sh have permissions of rwxr-xr-x
Click to expand...
Click to collapse
Thanks
Worked for me. I'm using Sony Ericsson Xperia Pro MK16i with stock rom (root + cwm including).
Hello
doesn't worked for me ;(
Sony Xperia Arc S (LT18i) build ver. 4.1.B.0.587
nAa's CWM 5.0.2.7
rooted
there is no this test log file in /data/local/tmp afret applying the zip
so what i have after "apply zip file" in recovery meny and rebooting:
in /system/xbin new binary file run-parts
in /system/etc new folder init.d with test99 script in it
in /sysrem/etc file install-recovery.sh which was made by us previously
it looks like would work...but it does not
So, what can i do myself?
Thank you in any way

problem with replacing gps.conf

Hi,
I hope this is the write location for my post.
I have a HTC ONE rooted, android 4.3
I have a problem with my GPS: it doesn't lock any satellite. Reading on forum, I found that the problem may be the setting of gps.conf file in /system/etc.
In fact, checking it, I found that the NTP_SERVER set was for north.america, while I'm in Europe.
I would like to modify or replace it, but I'm experiencing some problem. Using Root Browser it seems to be able to modify it, but after rebooting the device it is exactly the same before the editing. I tried using other editors as ES File Explorer, but when I try to modify the file, it says "read only file system".
It makes me thing that also the other editor is not able to modify the file, since after reboot it is actually un-edited.
What do you think? how can I actually write in file system and actually modify gps.conf?
Thank you in advance
Let me add another detail: I tried to create a new empty file in the same folder with Root Browser. It seems to be able to create it, but after rebooting the device it desappears..so I guess I actually can't modify/write in the file system..
aerosmike said:
Hi,
I hope this is the write location for my post.
I have a HTC ONE rooted, android 4.3
I have a problem with my GPS: it doesn't lock any satellite. Reading on forum, I found that the problem may be the setting of gps.conf file in /system/etc.
In fact, checking it, I found that the NTP_SERVER set was for north.america, while I'm in Europe.
I would like to modify or replace it, but I'm experiencing some problem. Using Root Browser it seems to be able to modify it, but after rebooting the device it is exactly the same before the editing. I tried using other editors as ES File Explorer, but when I try to modify the file, it says "read only file system".
It makes me thing that also the other editor is not able to modify the file, since after reboot it is actually un-edited.
What do you think? how can I actually write in file system and actually modify gps.conf?
Thank you in advance
Let me add another detail: I tried to create a new empty file in the same folder with Root Browser. It seems to be able to create it, but after rebooting the device it desappears..so I guess I actually can't modify/write in the file system..
Click to expand...
Click to collapse
You need an unsecured kernel (/system writable) to write to /system partition of the htc one, not only root.. Otherwise, all changes will be reverted at reboot like you are experiencing.
Kernels for htc one here
And note that modifying/deleting files in /system will probably prevent you to install future ota unless you revert the change you have made. There is a md5 checksum of many files in /system before the ota installs. If the md5 cheksum doesn't match then the ota will not install. This might not apply to the .conf file you want to edit but just in case, make a backup of that file before. So if the next ota fail, you'll know why.
alray said:
You need an unsecured kernel (/system writable) to write to /system partition of the htc one, not only root.. Otherwise, all changes will be reverted at reboot like you are experiencing.
Kernels for htc one here
And note that modifying/deleting files in /system will probably prevent you to install future ota unless you revert the change you have made. There is a md5 checksum of many files in /system before the ota installs. If the md5 cheksum doesn't match then the ota will not install. This might not apply to the .conf file you want to edit but just in case, make a backup of that file before. So if the next ota fail, you'll know why.
Click to expand...
Click to collapse
Thank you very much

Categories

Resources