Need help - Android Software/Hacking General [Developers Only]

I have some scripts in my init.d folder, but when i check it on init.d log file.. it doesn't work. I do same as tutorial that i got here.. but it said "nonexistent directory" . Is there anyone know why?
I still confused because two of my scripts (zipalign & loopy_smoothness) are working.. but not for the other..
Here one of my tweaks :
#!system/bin/sh
echo "64" > /sys/module/lowmemorykiller/parameters/cost
echo "0,1,2,4,9,15" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /sys/module/lowmemorykiller/parameters/debug_level
The log file said " nonexistent directory "..
Thanks before.. and sorry for my bad english..
Using Hisense E-860

Related

[MOD][Updated] Improve CM9 Battery Life + Other CM9 Tweaks

Update: I removed the ds files and corrected the powersaver script...
First of all... I would like to give credits to all the owner of this tweaks... This tweaks are not mine... I just compiled them
This tweak never fixes battery drain, it can or may improve your battery life
Let me first advice you that this mod worked for me, and would not fully guarantee that it would also work for you.. I'm using CM9 Alpha 4 with xxkpu as based...
With this mod... Battery life has increased by 25%... I can use the phone for browsing (connected with WiFi) and little gaming for 12 hours of semi-continuous use, it means that I lock the phone from time to time and resume my browsing (background apps still connects to the internet when sleeping) or gaming...
This is a Sysctl tweak with optimized Conservative mod... I have also attached the same tweak but with current Gingerbread system tweaks (I am currently using this, no problems so far)
Use Conservative governor as default after flashing this mod
Downloads:
see attachments
Other Tweaks to Improve Battery Life
I've been reading a lot lately... And here's what I've found out...
Disable Surface Dithering (This just fixed my overheating problem, and games runs more smoothly now)
Always use Conservative Governor
Disabling fast dormancy may improve our battery life (untested but I'm currently using this) To disable fast dormancy, just add this to you build.prop:
ro.ril.fast.dormancy.rule=0​
Click to expand...
Click to collapse
Reloaded ICS
By the way, I also included Reloaded ICS... I tested it on our device and works very well... Reloaded ICS allows you to perform additional tweaking of the status bar and many more... Full details here
All credits goes to rob43
I've also attached the latest working version of Reloaded ICS...
To undo this Mod, Just delete this files:
/system/etc/init.d/10sysctl
/system/etc/init.d/01confpowersaver
/system/etc/init.d/95tweaks
/system/etc/sysctl.conf
Click to expand...
Click to collapse
Please post you feedbacks and suggestions
Thanks! Will try
Cheers
Sent from my GT-i9003 powered by Stable and Smooth CyanogenMod 9!
landono5 said:
First of all... I would like to give credits to all the owner of this tweaks... This tweaks are not mine... I just compiled them
This tweak never fixes battery drain, it can or may improve your battery life
Let me first advice you that this mod worked for me, and would not fully guarantee that it would also work for you.. I'm using CM9 Alpha 4 with xxkpu as based...
With this mod... Battery life has increased by 25%... I can use the phone for browsing (connected with WiFi) and little gaming for 12 hours of semi-continuous use, it means that I lock the phone from time to time and resume my browsing (background apps still connects to the internet when sleeping) or gaming...
This is a Sysctl tweak with optimized Conservative mod... I have also attached the same tweak but with current Gingerbread system tweaks (I am currently using this, no problems so far)
Use Conservative governor as default after flashing this mod
Downloads:
see attachments
Other Tweaks to Improve Battery Life
I've been reading a lot lately... And here's what I've found out...
Disable Surface Dithering (This just fixed my overheating problem, and games runs more smoothly now)
Always use Conservative Governor
Disabling fast dormancy may improve our battery life (untested but I'm currently using this) To disable fast dormancy, just add this to you build.prop:
Reloaded ICS
By the way, I also included Reloaded ICS... I tested it on our device and works very well... Reloaded ICS allows you to perform additional tweaking of the status bar and many more... Full details here
All credits goes to rob43
I've also attached the latest working version of Reloaded ICS...
Please post you feedbacks and suggestions
Click to expand...
Click to collapse
can use in MIUI???
How to get back to original settting
After all these tweaks if I had to get back to original configuration ?
How to do that.?
I just gave a quick look, nothing more.
01confpowersave has an error.
Right after
Code:
#scheduler cfq
there should be an "if". Or you add an if (I don't know what) or you remove fi; from here:
Code:
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*)
do
echo "cfq" > $i/queue/scheduler
done
[COLOR="RED"]fi;[/COLOR]
EDIT: I think 95tweaks makes the boot slow because it wipes the dalvik-cache on every boot (and weirdly it creates a database of the zipaligned files, but it doesn't use it) (and FYI some of the tweaks there are already avaible in CWM Tweaks). The last part of the script is useless (read the last part of this: http://forum.xda-developers.com/showthread.php?t=1587553)
And please Mac OS X users, don't include .DS_Store and ._.SD_Store in your zips.
loSconosciuto said:
I just gave a quick look, nothing more.
01confpowersave has an error.
Right after
Code:
#scheduler cfq
there should be an "if". Or you add an if (I don't know what) or you remove fi; from here:
Code:
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*)
do
echo "cfq" > $i/queue/scheduler
done
[COLOR="RED"]fi;[/COLOR]
I think 95tweaks makes the boot slow because it wipes the dalvik-cache on every boot (and weirdly it creates a database of the zipaligned files, but it doesn't use it) (and FYI some of the tweaks there are already avaible in CWM Tweaks). The last part of the script is useless (read the last part of this: http://forum.xda-developers.com/showthread.php?t=1587553)
And please Mac OS X users, don't include .DS_Store and ._.SD_Store in your zips.
Click to expand...
Click to collapse
Soo should I flash it?
Cheers
Sent from my GT-i9003 powered by Stable and Smooth CyanogenMod 9!
shail139 said:
After all these tweaks if I had to get back to original configuration ?
How to do that.?
Click to expand...
Click to collapse
You need to remove
Code:
/system/etc/01confpowersaver
/system/etc/95tweaks
/system/etc/init.d/10sysctl
/system/etc/sysctl.conf
while it's a little bit more problematic for "update-reloaded-1.9b4-cm9-050712.zip" because it replaces the original SystemUI.apk.
bscraze said:
Soo should I flash it?
Click to expand...
Click to collapse
Well, 'conservative' is not tweaked because of the 'if' problem, but there's no problem in flashing it, you still have all the sysctl.conf tweaks. Probably it's better to wait a flashable zip without all the Mac trash files, or manually remove them from the zip.
EDIT:
and I was wrong regarding the slow boot, I didn't read the script well enough.
I'll try to fix these... These mods aren't mine actually.. Thank you for your support...
I was wondering how the Mac files got there, I'm even using Windows...
Edit:
Got it, the mac files are from the original zips...
And the Fi; line should remain there... Well, according to the dev I've talked to, that is a needed command, I have really no idea what it does... But I'll guarantee that it works... Governors changed on boot...
The Fi is for stopping an if command...
if
<command>
else
<command>
fi
landono5 said:
And the Fi; line should remain there... Well, according to the dev I've talked to, that is a needed command, I have really no idea what it does... But I'll guarantee that it works... Governors changed on boot...
The Fi is for stopping an if command...
if
<command>
else
<command>
fi
Click to expand...
Click to collapse
Yes, I know, but, where is the if?
Code:
#!/system/bin/sh
#cpu
echo "300000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#scheduler cfq
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*)
do
echo "cfq" > $i/queue/scheduler
done
fi;
#Conservative settings for saver mode.
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
Edit:
And yes, you are right, the governor is changed. The problem is that scripts are not compiled, so errors come at runtime and the execution stops when an error is found.
The error is after the line that changes the governor. As I said, the problem is that conservative is not tweaked (the part after the fi).
Blue and not transparent status bar looks horrible, how to do it to look like before?
rascal0pl said:
Blue and not transparent status bar looks horrible, how to do it to look like before?
Click to expand...
Click to collapse
You can turn off Themes in Color Setting
loSconosciuto said:
Yes, I know, but, where is the if?
Code:
#!/system/bin/sh
#cpu
echo "300000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#scheduler cfq
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*)
do
echo "cfq" > $i/queue/scheduler
done
fi;
#Conservative settings for saver mode.
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
Edit:
And yes, you are right, the governor is changed. The problem is that scripts are not compiled, so errors come at runtime and the execution stops when an error is found.
The error is after the line that changes the governor. As I said, the problem is that conservative is not tweaked (the part after the fi).
Click to expand...
Click to collapse
I'm really confused... I know very little regarding android yet... What should I change regarding the script so that it will run smoothly...
Isn't this .zip can be flash straight away in cwm then is work just by that? I mean we don't have to adjust anything after flash it
Sent from my GT-I9003 using XDA
Just flash the zip and it'll be fine...
landono5 said:
I'm really confused... I know very little regarding android yet... What should I change regarding the script so that it will run smoothly...
Click to expand...
Click to collapse
It's Linux. Just change the file to:
Code:
#!/system/bin/sh
#cpu
echo "300000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#scheduler cfq
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*)
do
echo "cfq" > $i/queue/scheduler
done
# fi;
#Conservative settings for saver mode.
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
and you'll be done. Don't know what that fi was for, anyway, we want to reduce power drain and then the tricks have to be applied for that.
It will work on any galaxy devices ? Just a question
nooooooooooo, don't do it
he ported it for our device
Did anyone test this ?
I m using Remics rom, so can i flash this script...
Sent from my GT-I9003 using xda premium
vijaypalmanit said:
I m using Remics rom, so can i flash this script...
Sent from my GT-I9003 using xda premium
Click to expand...
Click to collapse
+1 and which Zip we have to flash? Which update? In tapatalk i can see this...

ARHD 7.x random reboots - solved?

Hello, I'm a long time user but a bit of a lurker but have been flashing custom ROMs for some time. Hence my post count is <10 and cannot post in the dev forums to contribute...
I noticed other users in the ARHD 7.x thread are having random reboot issues - http://forum.xda-developers.com/showthread.php?p=39586309#post39586309 - which I was suffering from too. I've been using ARHD since the 6.x days and it's a great ROM!
The new ARHD 7.x was a bit of a let down due to the random reboots. After trying all manner of things, it seems it might be one of two things. I've reflashed and not selected a couple of tweaks in the Aroma installer. So far i've been running for a few days with no reboots.
I've not chose to apply the memory/multitasking tweak and the build.prop tweaks. Not sure which of the two was the cause....
The build.prop tweaks apply these:
I doubt the nocheckin value has anything to do with the random reboots, I'm either suspecting the deeper sleep or bypassing of the kernel error checking? Perhaps a kernel panic is causing the sudden lockup and then reboot. Perhaps the "lock up" we perceive, is the phone doing a core dump?
Code:
#!/sbin/sh
# Extra tweaks for build.prop
echo "# EXTRA TWEAKS" >> /system/build.prop
echo "# Disable Sending Usage Data" >> /system/build.prop
echo "ro.config.nocheckin=1" >> /system/build.prop
echo "# Deeper Sleep" >> /system/build.prop
echo "pm.sleep_mode=1" >> /system/build.prop
echo "# Disable Kernel Error Checking" >> /system/build.prop
echo "ro.kernel.android.checkjni=0" >> /system/build.prop
The multi-tasking tweak applies these values....
I'm not sure if it could be these values being aggressive.
Code:
#!/system/bin/sh
# ========================================
# init.d script for Android Revolution HD
# ========================================
# Tweak minfree values for better multi-tasking
echo 1536,2048,3584,5120,8704,10240 > /sys/module/lowmemorykiller/parameters/minfree
I'll have to test these in the adb shell and see how the phone performs. Will keep you posted.

[Completed] Help create a backup script

Hello my goal is to crate a buckup/restore script that does the restore from a safe file on phone when some files are missing or damaged in some way .
So i need help to get it started
By my idea it should have already a prebuilt backup file from which it will restore missing files
So after flashing a zip or at boot it should always run and check if something is missing from specified location example system/etc/init.d
And when it finishes it should react if there are files that are missing or are damaged
For the files that miss that is simple but how to create a script that will check if the file is damaged
simple by checking it size
ok i know how this would work in theory but i dont know how to writte that kind of a script so please
help thank you i made a simple check files script here:
Code:
#!/system/bin/sh
clear
sleep 2
echo ""
echo "SPL ENGINE CORE is installed "
sleep 2
echo ""
echo "Checking for SPL ENGINE A.I. CORE ..."
sleep 1
if [ -e /system/spl_engine_1996 ]; then
echo ""
echo "SPL ENGINE CORE is installed..."
sleep 1
else
echo ""
echo "SPL ENGINE CORE binary was not found,please Re-flash SPL Transcender then try again!"
sleep 1
fi
but how to backup restore from backup folder if it is missing or damaged dont know please help me
this is an idea about a smart self repair script so dont abuse and help
Please understand that the mission of XDA Assist is.
The mission of XDA Assist is to provide basic help to those who have tried searching but can't find what they are looking for and need assistance. This is not a "helpdesk" providing technical assistance but more to point you in the correct direction with your problem. Perhaps you can't find posts on how to root your phone, install custom recovery or maybe you have questions about how to navigate and use features on the site.
Click to expand...
Click to collapse
Having said that your question really needs to be in
Android Development and Hacking > Android Software and Hacking General [Developers Only]

some of my old tweaks

Hello I want to share some of my old tweaks, credits to the author of tweaks and of the flashable zip.
Flash it in recovery then reboot, you will get more speed and more fps, so more smooth.
to restore stock settings reflash rom without wipe
What exactly this mod do? It's related to kernel? Overclock? Please, explain more details.
Pavamarea said:
What exactly this mod do? It's related to kernel? Overclock? Please, explain more details.
Click to expand...
Click to collapse
Some tweaks in build.prop
#!/sbin/sh
echo "persist.sys.dalvik.hyperthreading=true" >> /system/build.prop
echo "# System Properties" >> /system/build.prop
echo "cpu.fps=auto" >> /system/build.prop
echo "gpu.fps=auto" >> /system/build.prop
echo "# CPU & GPU Properties" >> /system/build.prop
echo "ro.sys.cpu.defaultfreq=auto" >> /system/build.prop
echo "ro.sys.gpu.defaultfreq=auto" >> /system/build.prop
Click to expand...
Click to collapse

init.d works great, after a small fix of Ryuinferno script

Hi all,
Unfortunatelly, I'm not allowed to reply to developer posts anymore.
I have to admit that I was inactive quite a while, but I hope someone can reuse my quick fix
and maybe someone could move this post to it's right place.
First of all, thanks to Ryuinferno for the init.d enable script.
[MOD][APK+SCRIPT+ZIP] Enable Init.d for Any Phones w/o Need of Custom Kernels!!!
Finally it works for me very good !!!
The problem was:
/system/bin/sysinit couldn't find run-parts,
so I added the path to the PATH export, and :good:
I modified the downloaded term-init.sh just a little bit.
Changed (line 108 & line 121, line 109 & line 122 optional)
Code:
echo "export PATH=/sbin:/system/sbin:/system/bin:/system/xbin" >> /system/bin/sysinit
echo "run-parts /system/etc/init.d" >> /system/bin/sysinit
To
Code:
echo "export PATH=/su/xbin:/sbin:/system/sbin:/system/bin:/system/xbin" >> /system/bin/sysinit
echo "logwrapper run-parts /system/etc/init.d" >> /system/bin/sysinit
Have fun...
It is better to change the script before you run it,
otherwise you have to change the file /system/bin/sysinit afterwards.
kind regards
Gerry

Categories

Resources