Related
How would i disable compcache on modaco custom rom 3.1 without using the kitchen?
Edit your /system/init.d/ramzswap.sh and comment out the following lines (by putting a "#" sign in front of them.)
Once your file is edited, it should look like this:
Code:
/system/xbin/insmod /system/lib/modules/tun.ko
#/system/xbin/insmod /system/lib/modules/lzo_decompress.ko
#/system/xbin/insmod /system/lib/modules/lzo_compress.ko
#/system/xbin/insmod /system/lib/modules/xvmalloc.ko
#/system/xbin/insmod /system/lib/modules/ramzswap.ko disksize_kb=131072
#/system/xbin/swapon /dev/block/ramzswap0
#echo "10" > /proc/sys/vm/swappiness
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Once you've saved the file, reboot your phone and you're good.
I tried doing the same thing. I commented out those exact lines and when I reboot it shows I still have a swap file, just half the size it was before. Huh?
SOLVED: The file had Windows EOL formatting. *nix no likely that.
In the init script there are several instances of if statements like this:
Code:
testvar=1
if [ "$testvar" = "1" ] ; then
echo "Testvar is equal to one"
fi
Yet, when I put if statements exactly like this into a shell script and execute them in an adb shell (or connectbox shell), I get the following error:
line 4: syntax error: unexpected "fi" (expecting "then")
I've also taken if statements directly from init and they throw the same error.
Any busybox gurus here know what's up with this?
toadlife said:
In the init script there are several instances of if statements like this:
Code:
testvar=1
if [ "$testvar" = "1" ] ; then
echo "Testvar is equal to one"
fi
Yet, when I put if statements exactly like this into a shell script and execute them in an adb shell (or connectbox shell), I get the following error:
line 4: syntax error: unexpected "fi" (expecting "then")
I've also taken if statements directly from init and they throw the same error.
Any busybox gurus here know what's up with this?
Click to expand...
Click to collapse
Remove the ; and enter the then
Code:
testvar=1
if [ "$testvar" = "1" ]
then
echo "Testvar is equal to one"
fi
Nope. Still throws the same error.
This is driving me nuts. What I'm doing is editing the /init script. The loops work just fine when executed at bootup in / init, but remounting the filesystem, editing /init and rebooting just the test a change takes forever.
For now I've got my changes to init working, but it would be nice to be able to test before editing /init
I just realized that I forgot to put `#!/bin/sh` at the top of my script. But doing so doesn't seem to help. Instead I get not found error.
Weird!
toadlife said:
Nope. Still throws the same error.
This is driving me nuts. What I'm doing is editing the /init script. The loops work just fine when executed at bootup in / init, but remounting the filesystem, editing /init and rebooting just the test a change takes forever.
For now I've got my changes to init working, but it would be nice to be able to test before editing /init
Click to expand...
Click to collapse
Code:
testvar=1
if [ $testvar = `1` ] (`=~ key)
then
echo "Testvar is equal to one"
fi
[/QUOTE]
It gives the echo, but also 1: not found.
Here is the actual code I put into my init:
(this works)
Code:
#Super cool battery thingy
RUNSCBS=`/bin/grep -o "run.scbs=.*" /proc/cmdline | /bin/sed -e "s/.*run.scbs=//g" -e "s/ .*//g"`
if [ "$RUNSCBS" = "1" ] ; then
dev=$(cat /sys/class/scbs/0/dev | sed -e "s/:/ /g")
mknod /dev/scbs0 c $dev
scbs -d -co /sdcard/scbs.conf
fi
# Debug logs
TAKELOGS=`/bin/grep -o "take.logs=.*" /proc/cmdline | /bin/sed -e "s/.*take.logs=//g" -e "s/ .*//g"`
if [ "$TAKELOGS" = "1" ] ; then
logfiledate=`expr substr \`date -Iseconds|tr -d :|tr -d \+|tr -d \-|tr -d T\` 1 14`
tar -cz -f "$card"/debuglogs_"$logfiledate".tar.gz "$card"/debuglogs_*.txt
cat /proc/kmsg>"$card"/debuglogs_kmsg_"$logfiledate".txt &
logcat -v time >"$card"/debuglogs_logcat_time_"$logfiledate".txt &
logcat -v time -b radio>"$card"/debuglogs_logcat_time_radio_"$logfiledate".txt &
fi
Ooooo I really like the idea of having logging running from init. Does that work well? Do the logs ever 'loop' and you end up missing things, or do they just keep on churnin?
arrrghhh said:
Ooooo I really like the idea of having logging running from init. Does that work well? Do the logs ever 'loop' and you end up missing things, or do they just keep on churnin?
Click to expand...
Click to collapse
AFAIK, they go forever. I started doing it last night by just putting the static command in the /init and the logging was still going when I got up this morning.
This morning wanted to see if I could make logging and scbs triggerable by an option in the command line.
Both are working for me now.
Know if where talking about scripts, i have a question too.
This is my RIL logs script:
Code:
#! /system/bin/sh
i="0"
while [ $i -lt 2 ]
do
date=`date +%Y%m%d%H%M`
if [ -d /sdcard/logs/ril/$date/ ]
then
echo "/sdcard/logs/ril/$date/ exists!"
else
mkdir /sdcard/logs/ril/$date/
echo " Made direction /sdcard/logs/ril/$date!"
fi
logcat -v time > /sdcard/logs/ril/$date/logcat-time.txt &
logcat -v time -b radio > /sdcard/logs/ril/$date/logcat-time.txt &
sleep 18000 && kill -0 $! && kill $!
cd /sdcard/logs/ril/
tar -czf ril$date.tar.gz $date
rm -r $date
cd /
done
The thing, i believe, is that only the logcat -v time -b radio is killed and when it's sleeping it's not doing that in the background.
Sleeping for 18000 seconds (5h), because if it's running for a day the logcat log will be more than 10 mb or so.
lol.
Your date string...
Code:
date +%Y%m%d%H%M
...is a bit simpler than mine...
Code:
expr substr `date -Iseconds|tr -d :|tr -d \+|tr -d \-|tr -d T` 1 14
(I couldn't figure out the `date` syntax)
Christiaan91 said:
Know if where talking about scripts, i have a question too.
This is my RIL logs script:
Code:
#! /system/bin/sh
i="0"
while [ $i -lt 2 ]
do
date=`date +%Y%m%d%H%M`
if [ -d /sdcard/logs/ril/$date/ ]
then
echo "/sdcard/logs/ril/$date/ exists!"
else
mkdir /sdcard/logs/ril/$date/
echo " Made direction /sdcard/logs/ril/$date!"
fi
logcat -v time > /sdcard/logs/ril/$date/logcat-time.txt &
logcat -v time -b radio > /sdcard/logs/ril/$date/logcat-time.txt &
sleep 18000 && kill -0 $! && kill $!
cd /sdcard/logs/ril/
tar -czf ril$date.tar.gz $date
rm -r $date
cd /
done
The thing, i believe, is that only the logcat -v time -b radio is killed and when it's sleeping it's not doing that in the background.
Sleeping for 18000 seconds (5h), because if it's running for a day the logcat log will be more than 10 mb or so.
Click to expand...
Click to collapse
Hmm. I haven't set up gscript myself yet, but you might need to nohup the logcats to get them to stay once gscript shuts down.
arrrghhh said:
Ooooo I really like the idea of having logging running from init. Does that work well? Do the logs ever 'loop' and you end up missing things, or do they just keep on churnin?
Click to expand...
Click to collapse
I have found one issue. It's seems that whenever scbs runs, locat fails to open the log devices. I just disabled scbs and logcat worked. I'm going to try swapping the code around so scbs runs after the logging starts.
It seems scbs blows up logcat, even when it is triggered after logging starts. Ughhh.
Entropy512 said:
Hmm. I haven't set up gscript myself yet, but you might need to nohup the logcats to get them to stay once gscript shuts down.
Click to expand...
Click to collapse
logcat will be going, even when you close the terminal, but when you deleted the files they stop. So that's not a problem, cuz i won't delete.
BTW: is it possible to silently run scripts? Like this one?
./pathtoscript1 & ./pathtoscript2 & ./pathtoscript3
Christiaan91 said:
logcat will be going, even when you close the terminal, but when you deleted the files they stop. So that's not a problem, cuz i won't delete.
BTW: is it possible to silently run scripts? Like this one?
./pathtoscript1 & ./pathtoscript2 & ./pathtoscript3
Click to expand...
Click to collapse
What do you mean "silently run" - do you mean disable any printing to stdout?
./pathtoscript1 &>/dev/null & ; ./pathtoscript2 &>/dev/null &
should do the trick The &>/dev/null routes all output to /dev/null
Man, you guys go way overboard on this stuff. This is my gscript logging script.
Code:
cd /sdcard
mv logg.txt logg.0.txt
mv logr.txt logr.0.txt
nohup logcat -v time > logg.txt &
nohup logcat -v time -b radio > logr.txt &
nohup klogd > klog.txt
highlandsun said:
Man, you guys go way overboard on this stuff. This is my gscript logging script.
Code:
cd /sdcard
mv logg.txt logg.0.txt
mv logr.txt logr.0.txt
nohup logcat -v time > logg.txt &
nohup logcat -v time -b radio > logr.txt &
nohup klogd > klog.txt
Click to expand...
Click to collapse
Yeah, well we don't all have kung-fu coding ablities like you, so we go overboard with what we can overboard with.
Besides, I think it might be beneficial to put something like the code I wrote into the official init, so noobs can more easily provide debug logs.
One thing to keep in mind, busybox = /bin/sh, statically compiled sh is /system/bin/sh. I got tired of not having arrow key support whenever I su'ed (since /bin/su spawns a root /system/bin/sh regardless of what's in /etc/passwd) so I bind mounted /bin/sh (which is a symlink to busybox) over the one in /system in my user.conf. I haven't come across any ill effect, but if you feel that the shell difference may be causing issues, you could try that route, since it's very easy to undo.
-- Starfox
Starfox said:
One thing to keep in mind, busybox = /bin/sh, statically compiled sh is /system/bin/sh. I got tired of not having arrow key support whenever I su'ed (since /bin/su spawns a root /system/bin/sh regardless of what's in /etc/passwd) so I bind mounted /bin/sh (which is a symlink to busybox) over the one in /system in my user.conf. I haven't come across any ill effect, but if you feel that the shell difference may be causing issues, you could try that route, since it's very easy to undo.
-- Starfox
Click to expand...
Click to collapse
Thanks for the tip. I'll give that a shot.
LOL. I'm an idiot
Figured out what the problem was. The file had Windows EOL formatting.
That's what I get for using Windows to edit shell scripts.
To the mods, I apologize I seem to have lost my older thread on this matter.. so I will be starting a new thread, with a huge re-write of what I've learned so far on these tweaks.
To anyone who feels the need to raise an objection about of any of the tweaks, I've done a fair amount of research, and if these are placebo I have no idea why they help pamper my device. Please PM me if you have questions, or would like something further explained. That being said, if you've used a ROM released by me and had no problems, and liked it, well these play a role, and it's what I use in ROMs that I use now.
Build.prop tweaks (should be universal but function for devices with high RAM such our S3)
# Performance Tweaks
persist.sys.use_dithering=0 (does not allow device RAM to be freed, we have too much, this isn't needed)
# Calling Tweaks (speeds up ringing to the dialed number)
ro.telephony.call_ring.delay=0
ring.delay=0
# Hardware Tweaks (hardware identification)
com.qc.hardware=true
# Camera Tweaks (tweaks to increase resolution of camera)
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=12000000
ro.media.enc.hprof.vid.bps=12000000
# Battery Tweaks (allows proper sleep mode of the device, dirtyratio specifies how long data is good for before it is overwritten)
ro.ril.disable.power.collapse=1
pm.sleep_mode=1
ro.vold.umsdirtyratio=20
power.saving.mode=1
# Rendering Tweaks (deals with scrolling, screen gestures, redraws, etc)
ro.HOME_APP_ADJ=1
ro.HOME_APP_MEM 2048;
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
ro.min_pointer_dur=8
persist.sys.scrollingcache=4
persist.sys.smoothscrollbar=true
windowsmgr.max_events_per_sec=150
# Dalvik Tweaks (tweaks to make dalvik and application loading faster)
dalvik.vm.dexopt-flags=v=n,o=v,u=n,m=y
# Data Tweaks (forces DNS to be Google's Primary and Secondary DNS server, specifies packet size for connections)
net.dns1=8.8.8.8
net.dns2=8.8.4.4
net.tcp.buffersize.default=6144,87380,110208,6144,16384,110208
net.tcp.buffersize.wifi=62144,524288,1048576,262144,524288,1048576
net.tcp.buffersize.lte=262144,524288,3145728,262144,524288,3145728
net.tcp.buffersize.hsdpa=6144,262144,1048576,6144,262144,1048576
net.tcp.buffersize.umts=6144,87380,110208,6144,16384,110208
net.tcp.buffersize.hspa=6144,87380,262144,6144,16384,262144
net.tcp.buffersize.gprs=6144,8760,11680,6144,8760,11680
net.tcp.buffersize.edge=6144,26280,35040,6144,16384,35040
# Disable Logging (disables google error reporting, and data reporting (waste of data, waste of battery) )
ro.config.nocheckin=1
profile.force_disable_ulog=1
profiler.force_disable_err_rpt=1
# Call Tweaks (uses higher call quality band)
persist.cust.tel.eons=1
ro.ril.enable.amr.wideband=1
# Misc Tweaks (enables ADB service)
persist.service.adb.enable=1
# Battery Saving Tweaks (increased wifi scanning time for battery saving, handles battery better after disconnections, allows fast dormancy for better battery)
wifi.supplicant_scan_interval=300
ro.mot.eri.losalert.delay=1000
ro.config.hw_fast_dormancy=1
power_supply.wakeup=enable
ro.config.hw_power_saving=1
power.saving.mode=1
# Disable Logcat (disables logcat reports, this is Touchwiz, you shouldn't experience any lockups unless on a custom undervolted kernel)
logcat.live=disable
# Dalvik & Kernel Tweaks (parameters for kernel error checking, and kernel)
debug.performance.tuning=1
ro.kernel.android.checkjni=0
ro.kernel.checkjni=0
dalvik.vm.verify-bytecode=false
dalvik.vm.jmiopts=forcecopy
dalvik.vm.lockprof.threshold=500
# Heapsize Tweaks (heapsize tweaks that specify amount of RAM or memory heapsize is allowed to grow to)
dalvik.vm.heapstartsize=16m
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
sysctl.conf tweaks : [requires init.d support, init.d must call sysctl.conf]
#sysctl.conf file
############################
# Battery life tweaks # (decides when the device considers data "dirty" and discards it with newly written information)
############################
sysctl -w vm.dirty_writeback_centisecs=3000;
sysctl -w vm.dirty_expire_centisecs=500;
############################
# kernel tweaks # (handles device scheduler partially, sleeping, and how the kernel handles panics)
############################
sysctl -w kernel.random.read_wakeup_threshold=128
sysctl -w kernel.random.write_wakeup_threshold=256
sysctl -w kernel.threads-max=525810
sysctl -w kernel.sched_compat_yield=1
sysctl -w kernel.panic_on_oops=1
sysctl -w kernel.panic=5
sysctl -w kernel.sched_features=15834233;
sysctl -w kernel.msgmni=2048;
sysctl -w kernel.msgmax=64000;
sysctl -w kernel.shmmax=268435456;
sysctl -w kernel.shmall=2097152;
sysctl -w kernel.sem="500 512000 100 2048";
sysctl -w kernel.hung_task_timeout_secs=0;
sysctl -w kernel.sched_latency_ns=18000000;
sysctl -w kernel.sched_compat_yield=1;
sysctl -w kernel.sched_shares_ratelimit=256000;
sysctl -w kernel.sched_child_runs_first=0;
sysctl -w kernel.threads-max=10000;
sysctl -w kernel.panic=30;
sysctl -w kernel.panic_on_oops=1;
sysctl -w kernel.sched_features=24189;
sysctl -w kernel.sched_min_granularity_ns=1500000;
sysctl -w kernel.sched_wakeup_granularity_ns=3000000;
############################
# CPU tweaks # (adjusts cache queue of CPU)
############################
# Queue size modifications
sysctl -w net.core.optmem_max=20480;
sysctl -w net.unix.max_dgram_qlen=50;
# Net Core Settings
# Location: /proc/sys/net/core
sysctl -w net.core.wmem_max=524288;
sysctl -w net.core.rmem_max=524288;
sysctl -w net.core.rmem_default=256960;
sysctl -w net.core.wmem_default=256960;
############################
# VM & Filesystem tweaks # (specifies amount of virtual RAM, if it should kill a task or not, how often to refer to cache)
############################
sysctl -w fs.lease-break-time=10;
sysctl -w fs.file-max=65536;
sysctl -w fs.inotify.max_queued_events=32000
sysctl -w fs.inotify.max_user_instances=256
sysctl -w fs.inotify.max_user_watches=10240
sysctl -w vm.overcommit_memory=1;
sysctl -w vm.min_free_order_shift=4;
sysctl -w vm.block_dump=0;
sysctl -w vm.oom_dump_tasks=1;
sysctl -w vm.page-cluster=3;
sysctl -w vm.swappiness=0;
sysctl -w vm.dirty_ratio=90;
sysctl -w vm.dirty_background_ratio=80
sysctl -w vm.oom_kill_allocating_task=0
sysctl -w vm.overcommit_memory=1
sysctl -w vm.page-cluster=3
sysctl -w vm.min_free_kbytes=4096
sysctl -w vm.panic_on_oom=0
sysctl -w vm.vfs_cache_pressure=10
sysctl -w vm.min_free_order_shift=4
sysctl -w vm.laptop_mode=0
sysctl -w vm.block_dump=0
############################
# Net Speed tweaks # (hardens you from DDoS and SYN attacks, security orientated may help speed by avoiding unnesscessary data -- unconfirmed)
############################
# UnderUtilized Networking Tweaks below as recommended by avgjoemomma (from XDA)
sysctl -w net.ipv4.tcp_congestion_control=cubic;
# Hardening the TCP/IP stack to SYN attacks
sysctl -w net.ipv4.tcp_syncookies=1;
sysctl -w net.ipv4.conf.all.rp_filter=1;
sysctl -w net.ipv4.conf.default.rp_filter=1;
sysctl -w net.ipv4.tcp_synack_retries=2;
sysctl -w net.ipv4.tcp_syn_retries=2;
sysctl -w net.ipv4.tcp_max_syn_backlog=1024;
sysctl -w net.ipv4.tcp_max_tw_buckets=16384;
sysctl -w net.ipv4.icmp_echo_ignore_all=1;
sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1;
sysctl -w net.ipv4.tcp_no_metrics_save=1;
sysctl -w net.ipv4.tcp_fin_timeout=15;
sysctl -w net.ipv4.tcp_keepalive_time=1800;
sysctl -w net.ipv4.ip_forward=0;
sysctl -w net.ipv4.tcp_moderate_rcvbuf=1;
sysctl -w net.ipv4.route.flush=1;
sysctl -w net.ipv4.udp_rmem_min=6144;
sysctl -w net.ipv4.udp_wmem_min=6144;
sysctl -w net.ipv4.tcp_rfc1337=1;
sysctl -w net.ipv4.ip_no_pmtu_disc=0;
sysctl -w net.ipv4.tcp_ecn=0;
sysctl -w net.ipv4.tcp_sack=1;
sysctl -w net.ipv4.tcp_fack=1;
# Don't accept source routing
sysctl -w net.ipv4.conf.default.accept_source_route=0 ;
sysctl -w net.ipv4.conf.all.accept_source_route=0;
# Don't accept redirects
sysctl -w net.ipv4.conf.all.accept_redirects=0;
sysctl -w net.ipv4.conf.default.accept_redirects=0;
sysctl -w net.ipv4.conf.all.secure_redirects=0;
sysctl -w net.ipv4.conf.default.secure_redirects=0;
Enabling Sysctl.conf loading from init.d : (copy into file and name whatever you'd like with no extension, place file in init.d folder)
#!/system/bin/sh
# grep sysctl /etc/init.d/*
# Load /sys/etc/sysctl.conf
sysctl -p
To quote our beloved mod @Woody on some tips for testing / backing up your build.prop :
I wouldn't do them all at once. What if something breaks or you see some anomaly? How on earth would you be able to troubleshoot it? Try a few to start and let it run for a few days. Then try some more. Rinse, Repeat.
If you are using Root Explorer, it will automatically make a backup of your pre-altered build.prop just in case something happens and you want to go back. I'm sure other RootBrowsers do this as well, but I use RE.
Also make sure you have 1 empty/blank line at the very bottom of your build.prop.
And if anyone is a bit too skittish, you can always test some things out in either default.prop or /data/local/your.test.prop.goes.here.
Click to expand...
Click to collapse
Also, @DocHoliday77 gives some advice, if you do not wish to have all tweaks active, or figure out that one isn't doing you justice, but you're just not quite sure yet, add a # in front of that line, it will stop it from activating. "#" in programming terms means comment out, it's usually used to explain something a function, instead of running a command, or a command you want to leave at leisure for your users to run.
Mine
First?! And dude, niceee.
I'll try sysctl tweaks!
Great work
Sent from my SGH-T999 using xda app-developers app
copy and paste this in the end on my Build.prop right?
Mervingio said:
copy and paste this in the end on my Build.prop right?
Click to expand...
Click to collapse
Correct, just be careful not copy and paste and erase the original build.prop, just tact the tweaks to the end of the file. Also, be sure to make a backup because while these tweaks usually work well for me on most ROMs, you may conflict with settings in a different ROM and you won't get the desired effect. Best of luck.
I wouldn't do them all at once. What if something breaks or you see some anomaly? How on earth would you be able to troubleshoot it? Try a few to start and let it run for a few days. Then try some more. Rinse, Repeat.
If you are using Root Explorer, it will automatically make a backup of your pre-altered build.prop just in case something happens and you want to go back. I'm sure other RootBrowsers do this as well, but I use RE.
Also make sure you have 1 empty/blank line at the very bottom of your build.prop.
And if anyone is a bit too skittish, you can always test some things out in either default.prop or /data/local/your.test.prop.goes.here.
Google will show you how to do that.
Edit:
TheLastSidekick said:
To the mods, I apologize I seem to have lost my older thread on this matter.. so I will be starting a new thread, with a huge re-write of what I've learned so far on these tweaks.
Click to expand...
Click to collapse
@TheLastSidekick Here is your other thread if you want/need to pull some things from it. It was buried with a last post of 4 Jan 2013.
Woody said:
I wouldn't do them all at once. What if something breaks or you see some anomaly? How on earth would you be able to troubleshoot it? Try a few to start and let it run for a few days. Then try some more. Rinse, Repeat.
If you are using Root Explorer, it will automatically make a backup of your pre-altered build.prop just in case something happens and you want to go back. I'm sure other RootBrowsers do this as well, but I use RE.
Also make sure you have 1 empty/blank line at the very bottom of your build.prop.
And if anyone is a bit too skittish, you can always test some things out in either default.prop or /data/local/your.test.prop.goes.here.
Google will show you how to do that.
Edit:
@TheLastSidekick Here is your other thread if you want/need to pull some things from it. It was buried with a last post of 4 Jan 2013.
Click to expand...
Click to collapse
Thanks for finding my olddddd thread and that tidbit of information, it'll surely help others! I'll add that as a note to the OP, (I always bake these in, never really add them haha if my test fails, I clean wipe the ROM! )
Haha. No problem man. I have been doing Build.Prop tweaks for a long time.
Woody said:
I wouldn't do them all at once. What if something breaks or you see some anomaly? How on earth would you be able to troubleshoot it? Try a few to start and let it run for a few days. Then try some more. Rinse, Repeat.
If you are using Root Explorer, it will automatically make a backup of your pre-altered build.prop just in case something happens and you want to go back. I'm sure other RootBrowsers do this as well, but I use RE.
Also make sure you have 1 empty/blank line at the very bottom of your build.prop.
And if anyone is a bit too skittish, you can always test some things out in either default.prop or /data/local/your.test.prop.goes.here.
Google will show you how to do that.
Edit:
@TheLastSidekick Here is your other thread if you want/need to pull some things from it. It was buried with a last post of 4 Jan 2013.
Click to expand...
Click to collapse
Thanks for pointing out the blank line at the end! Such an important little thing, yet seems to get overlooked and/or forgotten all too often!
Another tip for testing new values, is using the # symbol. Put this at the beginning of any line to comment it out, or to make notes for yourself or others. This way, for example, you can add 10 new lines, comment 8 and just test 2 at a time. Then when ready all you have to do is change the 2 that are commented out and continue testing.
Helps for keeping track of values already tested and you don't have to keep revisiting a post/thread each time.
Sent from my SGH-T999 using Tapatalk
does it work on CM10.2???
Nice work
Sent from my SGH-T999L using XDA Premium 4 mobile app
Two comments ago asked if it works on CM 10.2 . Yes you CAN do tweaks in this manner on CM! I use JRummys Rom Toolbox Pro or you could write the script yourself [as the OP did]
As to how effective, well it probably varies based on how you use your phone, what you have installed [and thus runnin] etc. I'll be tinkering with some of the settings and if I run in to issues Ill post em
Thanks for the great guide! [I love to tweak my phone]
~j
ubuntujason said:
Two comments ago asked if it works on CM 10.2 . Yes you CAN do tweaks in this manner on CM! I use JRummys Rom Toolbox Pro or you could write the script yourself [as the OP did]
As to how effective, well it probably varies based on how you use your phone, what you have installed [and thus runnin] etc. I'll be tinkering with some of the settings and if I run in to issues Ill post em
Thanks for the great guide! [I love to tweak my phone]
~j
Click to expand...
Click to collapse
That's correct. These build.prop tweaks will generally work on all ROMs and devices. Though the current settings are only optimized for the Galaxy S3 variants. The only tweaks that won't work and won't take effect are the dalvik tweaks if you're using ART as your runtime or if and when you guys get L AOSP, since it uses ART by default.
Seeing a stupid comment on Google Play about an app you love and marking it as "spam". You've done it too.
Nice, i've tried it in s4 active, even though it isn't for my phone, can notice the smooth difference... Thumbs UP!
Nice !
As the title states this is a stock boot.img with init.d support.
Download >>> https://mega.nz/#!Nwx0BD5T!TZB0ngp3spi3myFAFw7gtx0z8zu7O2BRLv2UC2HTJ4M
XDA:DevDB Information
[BOOT IMAGE] Stock boot with su.d & init.d support, Kernel for the Elephone P9000
Contributors
Jonny
Kernel Special Features:
Version Information
Status: Stable
Stable Release Date: 2016-05-20
Created 2016-05-18
Last Updated 2016-05-20
this cant work . sry
skeleton1911 said:
this cant work . sry
Click to expand...
Click to collapse
Should do, same way I used to fire init.d on other devices (M9). Of course with SuperSU installed init.d is kind of deprecated as su.d is a better solution.
Jonny said:
Should do, same way I used to fire init.d on other devices (M9). Of course with SuperSU installed init.d is kind of deprecated as su.d is a better solution.
Click to expand...
Click to collapse
no sorry i dont work.
look:
in init.rc you wrote that
Code:
service sysinit /system/xbin/busybox run-parts /system/etc/init.d
class main
oneshot
user root
group root
that is going to sysinit . but sysinit service is not present in in system, check it yourself
if you would use this . it would work at boot
Code:
service[COLOR="Red"] userinit[/COLOR] /system/xbin/busybox run-parts /system/etc/init.d
oneshot
class late_start
user root
group root
and users have to install busybox and add the init.d folder into system/etc manual
set permissions to 755 or 777 for the init,d folder and the scripts they want to use
Ah cheers, I forgot to add the sysinit binary. Tbh though I think I'm going to look more into su.d as it seems more reliable in where in the boot process it executes the script :good:
Link updated. New zip flashes and installs busybox and creates the su.d and init.d folders with correct permissions. This one now supports both init.d and su.d (recommended).
Jonny said:
Link updated. New zip flashes and installs busybox and creates the su.d and init.d folders with correct permissions. This one now supports both init.d and su.d (recommended).
Click to expand...
Click to collapse
now it works . great job
Jonny said:
As the title states this is a stock boot.img with init.d support.
Click to expand...
Click to collapse
What tools did you use to repack the kernel and ramdisk ? I've used nearly ten tools with a non working boot image after modifying default.prop only.
Please advise about any tricks to do that.
Thanks.
nmset said:
What tools did you use to repack the kernel and ramdisk ? I've used nearly ten tools with a non working boot image after modifying default.prop only.
Please advise about any tricks to do that.
Thanks.
Click to expand...
Click to collapse
What did you edit in the boot image?
Sent from my Elephone P9000 using XDA Labs
Jonny said:
What did you edit in the boot image?
Click to expand...
Click to collapse
I unpacked the boot image, then the ramdisk, edited default .prop changing ro.adb.secure from 1 to 0.
Repacked the ramdisk with
find . | cpio --owner root:root -ov -H newc | gzip -9 > ../ramdisk.cpio.gz
After repacking the boot image with many tools, no way to get a working one.
nmset said:
I unpacked the boot image, then the ramdisk, edited default .prop changing ro.adb.secure from 1 to 0.
Repacked the ramdisk with
find . | cpio --owner root:root -ov -H newc | gzip -9 > ../ramdisk.cpio.gz
After repacking the boot image with many tools, no way to get a working one.
Click to expand...
Click to collapse
It's editing that line, I've tried it previously myself and it just ends up with a boot image that doesn't work.
Sent from my Elephone P9000 using XDA Labs
Jonny said:
It's editing that line, I've tried it previously myself and it just ends up with a boot image that doesn't work.
Click to expand...
Click to collapse
If I just unpack the original boot image and the ramdisk, and repack everything without any modifications, the resulting boot image is not functional.
If I unpack the original boot image, and do not unpack the ramdisk, then repack the kernel and ramdisk, the resulting boot image works perfectly.
It seems related with the ramdisk format, or its header, or addresses and offsets, or whatever, I wish you could share how you got a working boot image.
Thanks.
nmset said:
If I just unpack the original boot image and the ramdisk, and repack everything without any modifications, the resulting boot image is not functional.
If I unpack the original boot image, and do not unpack the ramdisk, then repack the kernel and ramdisk, the resulting boot image works perfectly.
It seems related with the ramdisk format, or its header, or addresses and offsets, or whatever, I wish you could share how you got a working boot image.
Thanks.
Click to expand...
Click to collapse
I use Android Image Kitchen, but I've still had the same results as you when editing that line
Jonny said:
I use Android Image Kitchen, but I've still had the same results as you when editing that line
Click to expand...
Click to collapse
Code:
find . | cpio -o -a --reproducible -R 0:0 -H newc | gzip -9 > ../ramdisk.cpio.gz
That did the trick.
(As a sidenote, I did not have the expected result, i.e, a root shell with 'adb shell', after 'adb root', one more paranoid regression from Google.)
:crying:
nmset said:
Code:
find . | cpio -o -a --reproducible -R 0:0 -H newc | gzip -9 > ../ramdisk.cpio.gz
That did the trick.
(As a sidenote, I did not have the expected result, i.e, a root shell with 'adb shell', after 'adb root', one more paranoid regression from Google.)
:crying:
Click to expand...
Click to collapse
For a root shell type 'adb shell' the just type 'su' and accept the superuser prompt on your device.
Adb root is needed for doing the adb remount command to push and pull certain files to /system
Hi there,
I'm having some difficulties in running some commands in userinit.sh due to SELinux.
system/etc/init.d/90userinit is invoking userinit.sh in /data/local/.
First they were blocked by SELinux. After running
Code:
chcon u:object_r:userinit_exec:s0 /system/etc/init.d/90userinit
chcon u:object_r:userinit_data_exec:s0 /data/local/userinit.sh
in Terminal, userinit.sh with the following content e.g.
Code:
#!/system/bin/sh
log -p i -t userinit "userinit start";
sysctl -w net.ipv6.conf.default.use_tempaddr=2
sysctl -w net.ipv6.conf.all.use_tempaddr=2
log -p i -t userinit "userinit end";
was executed, but sysctl -call within userinit.sh is blocked.
logcat:
Code:
avc: denied { net_admin } for pid=229 comm="sysctl" capability=12 scontext=u:r:sysinit:s0 tcontext=u:r:sysinit:s0 tclass=capability permissive=0
...
Q1: How do i properly set permissinons for sysctl now?
Q2: Is there a way to set proper permissions for all commands given in userinit.sh in generall?