[Q] Setting kernel parameters on startup (without using any app)? - Samsung Galaxy Nexus

I'm using LeanKernel 4.5 and i'd like to change governor, scheduler and some other minor parameters using sysfs. My linux understanding is quite basic.
I can easly check current values using adb (a list of sysfs options is here):
Code:
adb shell
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
I get "interactivex". However, why I can't change it using adb (first question)? This it's not working:
Code:
adb shell
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
And the governor remains "interactivex".
Second question is, how can I make them permanent? Should I modify init.rc script?

You need to be root to change those values. 'su' after 'adb shell'.
Second, your rom needs to support /system/etc/init.d/ scripts.
Sent from my i9250

bk201doesntexist said:
You need to be root to change those values. 'su' after 'adb shell'.
Second, your rom needs to support /system/etc/init.d/ scripts.
Sent from my i9250
Click to expand...
Click to collapse
Thank you for your help. I did :angel: but it doesn't work:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Also, I'm using the stock factory images. So you're saying that I will not able to set this values at boot? If yes, how the app SetCPU can?

Gremo said:
Thank you for your help. I did :angel: but it doesn't work:
Also, I'm using the stock factory images. So you're saying that I will not able to set this values at boot? If yes, how the app SetCPU can?
Click to expand...
Click to collapse
Add a file at /system/etc/init.d/<filename.extension>. Chmod it to 755 and add the contents below into it(the steps can be done via adb or file manager, its easier via file manager for newbies)
Code:
#!/system/bin/sh
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
After that, reboot your phone and check whether the changes has been done or not
To enable init.d, at minimum you need to be rooted though and busybox needs to be installed
Here's a link on how to enable it(you can try whether it works or not first, if it doesn't then only try this one): http://forum.xda-developers.com/showthread.php?t=1933849

Related

OpenRUU v1 for Linux & Mac - A Script to Update Your ROM [W/ OR W/O ROOT!]

OpenRUU - RUU Shell Script For Linux (See the post below for mac support)
This is a shell script to flash an official RUU from HTC.
I tested this on my device and it ran fine, it uses exactly the same commands as the RUU app.
You do not need root.
The script will:
Get your current ROM version
Get Your Current HBOOT Version
Get Your Battery %
Reboot into RUU Mode
Flash the ROM using fastboot
Reboot your phone
Enjoy!
DOWNLOADS:
2.73.405.5 Generic WWE (The one you need to root with flashrec)
TO INSTALL:
GUI Method:
Extract the zip > right click on the script > properties > permissions tab > Select 'Enable execution as a program' > OK > Double Click > Run in terminal
Terminal method:
Code:
Extract the zip
cd /path/to/files
chmod 755 OpenRUU-Hero-WWE-2.73.405.5.sh
./OpenRUU-Hero-WWE-2.73.405.5.sh
If you want me to add a ROM then please PM me with the rom.zip, see here for how to extract a rom.zip from an RUU.
If you can, please donate so I can afford better hosting, I also have some cool features to implement when I get proper hosting too. (If you can host a rom.zip, please PM me.)
- GBP
- Euro
- Dollars
Post here with any bugs/comments so my turkeys can get to work!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Mac Support
For Mac:
Download this,
Delete 'adb' & 'fastboot' from the folder you extracted the files too,
Rename 'fastboot-mac' to 'fastboot',
Copy it to the script folder,
Run the Script.
If you get errors then please put in a codebox the terminal output.
That's a nice idea. Something the community has been lacking for a while too
Hope it goes well
Reserved #2 - ^^ DOH! This 30secs thing really annoys me

[Q] Why cmd show # instead of $ after I typed "adb shell" then "su"

[Q] Why cmd show # instead of $ after I typed "adb shell" then "su"
Hi, I am not good at command writing, but recently I would like to use "androidscreencast.jnlp" which I need to use cmd in desktop windows to configure for keyboard and mouse control over the android phone.
When I type adb shell, it doesn't show "$", it shows "[email protected]:/ #".
What does that mean??
I probably need the "$" sign to do the configuration...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Can anyone help??
Thank you very much!!
# is the symbol for you having root access.
Indeed.
Sent from my Galaxy Nexus using xda app-developers app
Op, use google
Sent from my i9250
Zepius said:
# is the symbol for you having root access.
Click to expand...
Click to collapse
Thanks Zepius,
but I have been trying the following codes in cmd for several times in order to allow using desktop keyboard and mouse to control my nexus through AndroidScreenCast.jnlp. It seems unsuccessful. It's supposed that the code is fine. Just wondering does that "[email protected]:/ #" the obstacle ...
{
su
chmod 777 /data/dalvik-cache
cd /data/dalvik-cache
exit
exit
}
francis1212 said:
Thanks Zepius,
but I have been trying the following codes in cmd for several times in order to allow using desktop keyboard and mouse to control my nexus through AndroidScreenCast.jnlp. It seems unsuccessful. It's supposed that the code is fine. Just wondering does that "[email protected]:/ #" the obstacle ...
{
su
chmod 777 /data/dalvik-cache
cd /data/dalvik-cache
exit
exit
}
Click to expand...
Click to collapse
Not sure what those commands have to do with getting a keyboard to work, but you certainly would no be able to execute them without the # prompt...
Sent from my Galaxy Nexus using Tapatalk 2
francis1212 said:
Thanks Zepius,
but I have been trying the following codes in cmd for several times in order to allow using desktop keyboard and mouse to control my nexus through AndroidScreenCast.jnlp. It seems unsuccessful. It's supposed that the code is fine. Just wondering does that "[email protected]:/ #" the obstacle ...
{
su
chmod 777 /data/dalvik-cache
cd /data/dalvik-cache
exit
exit
}
Click to expand...
Click to collapse
What does the cache have to do with the keyboard?
Beamed from my Maguro.

Enable init.d support on any rom [Stock] without any app

One thing that i like very much about android is init.d support which enable user to run script during the device boot up so by putting Boost script in the init.d folder which is present in /system/etc/init.d can significantly improve device performance..
So without say much here is the method :
Requirement:
1 Rooted Phone obviously
2 File Explorer like Esfile Explorer with root access option enable
3 BusyBox Latest 1.22.1
4 A Good Luck
Process:
1 Open ESFiles Explorer and navigate to /system/etc and look for init.d folder if there is no folder name [init.d] then create one by click on +new button on ESFiles Explorer, or if init.d folder present than Goto step 2
2 Navigate to /system/etc folder and look for file name "install-recovery.sh" if present then Goto step 3
3 In /system/etc folder Create one file name "init.post_boot.sh"
4 Now open both "install-recovery.sh" & "init.post_boot.sh" one by one and write down following command at the beginning of the both file
Command:
#!system/bin/sh
run-parts /system/etc/init.d/*
{Above Lines are case sensitive}
5) Download the test.init.d.zip file from the below attachment link
6) put the 0test file in /system/etc/init.d folder and set permission rwx-rwx-rwx
7) Reboot device :fingers-crossed:
NOTE after Reboot open ESFiles Explorer and navigate to /data and there you will see Test.log file meaning init.d support working perfectly
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
HIT Thanks if you like the post
Nice Turotial. But there is already an app called "Universal Init.d Support" that does all the job easily with just one click.
Here is the apk.
Credit for the app goes to its respective owner.
Yeah thats true But being a geek I like to do things by myself also uni-init v does the same thing as what I said it. uni-init enable works the same way and did the same tweak to enable init.d support
nice information,,thanks for a great script

No Kernel Wakelock stats in BBS

I have no stats for Kernel Wakelocks in BetterBatteryStats. I've installed the latest version, installed the system app, but still get nothing. Everything else shows and works fine. Anyone else having this issue?
Yes, I face the same issue. Its a known issue and dev does not have cycles right now.
Cycles?
I think it also took a special fix for the LG g5 to show them...
Haldi4803 said:
Cycles?
Click to expand...
Click to collapse
lol...that's dev-speak for time for development work.
Ok, thanks for the heads up. It's not a huge deal, was just wondering if it was me, or something else.
I could be wrong but I get this.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Custom Rom? Custom Kernel?
Installed as System App?
This is the leedroid rom, but it worked on the US ruu one too. I don't think I installed it as system.
Sent from my HTC 10 using XDA-Developers mobile app
V2.2B6?

			
				
devsk said:
HTC init scripts are not mounting the debugfs. That's the reason for missing kernel wakelocks in HTC 10. Do the following from a root shell:
Code:
mntP=$(grep /sys/kernel/debug /proc/mounts | awk '{print $2}')
if [[ "${mntP}" != "/sys/kernel/debug" ]]
then
mount -t debugfs none /sys/kernel/debug
fi
Relaunch BBS and it should show the kernel wakelocks now.
Click to expand...
Click to collapse
Don't forget su, and you need to kill the App after the command
Haldi4803 said:
Don't forget su, and you need to kill the App after the command
Click to expand...
Click to collapse
Is this something that needs to be run on every boot, or once run it should stay? If it needs to be re-run on boot I suppose I'll just make Tasker run the script.
duowing said:
Is this something that needs to be run on every boot, or once run it should stay? If it needs to be re-run on boot I suppose I'll just make Tasker run the script.
Click to expand...
Click to collapse
This needs to be done every boot and as root.

[GUIDE] Use TWRP through ADB Shell

Dear user, we hereby say that any damage or brick created by following this guide shall not give any fault on us. The requirements for this procedure are clarified and we take no responsibility for bad usage of this.
Click to expand...
Click to collapse
Dear XDA community,
Straight from the efforts of user @LastStandingDroid, here's a way to flash a zip file or some other operation in TWRP if you cant access some part of the touch screen due to it being broken and not detecting touch, for example.
Requirements:
A toaster wich can run Windows, MacOS or Linux. (joking on toaster part)
ADB Drivers (if needed, you can find something here) - this link is only for windows users.
TWRP installed (follow this guide for installation)
Minimal command knowledge
We will use as example, a flash of a zip file to get root on a Umidigi Z Pro:
Open command prompt;
From here, change directory to ADB Directory (cd path/to/adb)
Now type "adb shell twrp install path/to/zip", being the part path/to/zip the actuall path to the zip file you want to flash;
At this point, you should get a screen where every step of the flashing process will be shown, just like when flashing through TWRP. And that's it.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Credits:
All of them goes to @LastStandingDroid and @gersp for his tutorial thread.
Now lets heat up things...​
atarii said:
Atarii:
that handy to know
Click to expand...
Click to collapse
And I certainly agree with his statement (telegram) while there was almost no info about how to flash zip trough adb and the echo update command did seem to fail. Or maybe I did wrong I don't know. I find this great if the echo command fails
This made my root come back when something broke it
Sent from my GT-I9505 using Tapatalk
I have access to a super primitive recovery mode, in which twrp doesn't seems to boot.
When I use
# twrp anycommand
I get:
TWRP does not appear to be running. Waiting for TWRP to start . . .
Press CTRL + C to quit.
Is there a way to "start" twrp from adb shell ?
It's worked on my PH-1,thank u so much

Categories

Resources