Tweaking the perfomance with properties - Asus Eee Pad Transformer Prime

Hi,
There exists the thread with the following title
[UPDATE FOR .28][Custom Build Prop] Increase Performance & Battery Life of PRIME
Click to expand...
Click to collapse
In this thread it is explained how to tweak your build.prop file.
While I applaud the intention, I am wondering though why it is recommending to change /system/build.prop since it might prove dangerous.
There are other, safer, alternatives like:
change /data/local.prop
write a shell script with similar lines
eg.
setprop debug.performance.tuning 1;
setprop video.accelerate.hw 1;
...
Easiest way to try if one of the settings offend your tablet is to try it out in a terminal.
Cheers

Related

[MOD] Change WiFi hostname - for custom ROMs (Sept 23)

This is useful for identifying phones on the local networks by looking at DHCP lease tables in the routers. It doesn't make your phone appear on Windows networks, since the phone needs to broadcast NetBIOS name for that. If you want your phone to show up on Windows networks (and share files) - you need Samba server, and JimmyChingala is working on one.
ROM developers can insert the option to customize hostname using the way described below in their Spare Parts options. Feel free to do so.
[SOLUTION]
The following shell command does the job of changing WiFi hostname:
echo YOURHOSTNAME > /proc/sys/kernel/hostname
Click to expand...
Click to collapse
For the change to stay, it should be executed on each boot. And here the things start being more problematic.
For custom ROMs:
Most, if not all, custom ROMs include some user init shell script that will be executed on boot, making the solution easy.
Enter the following line in the Terminal / ADB shell:
echo "echo YOURHOSTNAME > /proc/sys/kernel/hostname" >> the_path_and_name_of_userinit_script.sh
chmod 777 the_path_and_name_of_userinit_script.sh
Click to expand...
Click to collapse
Several examples of custom ROMs and their userinit scripts:
Suggested - will work for most ROMs (creates another file in directory of autoexecuted scripts): /etc/init.d/88hostnameinit
Additional possibility for Enomther's ROM: /data/local/userinit.sh
Additional possibility for CyanogenMOD: /sd-ext/userinit.sh
For stock ROMs:
There is no autorun script for stock ROMs, so they have to be added through modifying boot.img. It's a complicated procedure, and even though guides exist for it - I suggest not to mess with it only because of the hostname. The easiest solution would be to create a script file with the line above using Gscript or other scripting solutions, and execute it after each reboot. If anyone really wishes to modify boot.img - I assume that he/she knows enough about Linux/Android since it can be relatively easily done only on Linux, can find the necessary guides with some googling (like I did), and in this case the modification is easiest to do directly in init.rc - changing "hostname localhost" to "hostname name_of_your_choice".
[ORIGINAL POST]
Hi people,
I'm not much of a dev, but I can find my way around with a bit of Google search And sorry about the links that don't link, new user's permissions don't allow me to...
Anyway, after messing with my router today I've noticed that Nexus transmits "localhost" as its host name to DHCP server, causing my DD-WRT to show it as "*". I went to Google and to my surprise, discovered that there isn't such an option in any Nexus ROM yet.
Found this: LINK_www_laslow_net_?p=501
To change your hostname on Cyanogen 5.x, add the following line to the bottom of /system/etc/init.d/01sysctl -- and make sure you make a backup of 01sysctl before editing it!
echo NEWHOSTNAME > /proc/sys/kernel/hostname
Click to expand...
Click to collapse
I tested it, and it didn't work. After booting, the file still read "localhost" in it, and the hostname on DHCP server reflected it.
But, I didn't get frustrated, connected with ADB, manually executed the command:
echo MyHostName > /proc/sys/kernel/hostname
checked that the file was overwritten, disabled WiFi, deleted DHCP lease, enabled WiFi back - and voila, I have a new hostname!
Then I went to search for hostname setting, which got me to /init.rc:
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
Click to expand...
Click to collapse
Well, I guess that's the place. A tiny problem, though - it's in the boot image, which can't be easily modified. Thanks to the latest thread on update.zip creation I can probably do it myself, but I wanted to share the findings and ask for the correct way to implement.
There's a "dirty but functional" way of "disable WiFi - override /proc/sys/kernel/hostname - enable WiFi", and it's probably not a problem to stick it somewhere in the boot sequence, or even write an app that writes those changes to one of the boot scripts and allows configuration of host and domain names. But it's not the best way - DHCP might already give out a lease, and the new host name might not register.
And there's a correct (?) way of doing it, introducing it into init.rc. Since it's "on boot", I suppose that it runs after mounting the partitions - which means that the partitions are already accessible.
In this case, the best way would be executing a small shell script that would check for existence of, say, "/system/etc/settinghostdomainnames.rc" and create a default one if it's not there, then use "import /system/etc/settinghostdomainnames.rc" and set a manual trigger, like the guy is trying to do here:
LINK_groups.google.co.jp_group_android-developers_browse_thread_thread_e2f432707b735ff0
"trigger someeventtobringupnetworkinterface"
That would allow to use a custom setting for host and domain names that can be changed by SW, and adding that as another option into ROM Settings app or external app.
But the guy in question didn't succeed. What did he miss? Would it be better to do something like "on fakesystemproperty=something" and instead of manual trigger, doing "setprop fakesystemproperty something"?
I can probably test it and find out myself, but it would take loads of time compared to one of the kernel devs, and I don't even have the environment set up for modifying boot images. I was kinda hoping that one of the kernel devs would test it. I can write and post the modifications to init.rc and the custom script, they're very simple.
So, who can help me with answering the questions in the thread, and/or testing the modification?
Thanks! It's back.
Oh well, I'll keep preparing Ubuntu VM anyway
OK, first test fired - updated /init.rc in my own boot.img, checked the values. It's working, hostname is indeed modified.
Now I'll try to rewrite /init.rc in such way as to load the hostname setting from elsewhere, while not screwing the security. Will post results soon.
Setting it to the same value as the BT value would be ideal. I'm not sure how you could do that though, because the init scripts run before the frameworks load
Looking forward for a fix to this problem.
Update, but only partially on topic:
God, I hate SH scripting. Couldn't even google a normal tutorial that would explain where I went wrong. A script of 10 lines, and I can't make it work.
Let's see, I need something like this:
#!/system/bin/sh
echo "on service-exited-network_prepare" > /system/etc/net_init.rc
echo " ifup lo" >> /system/etc/net_init.rc
if [ -e "/system/etc/net_init.domain" ];
then
echo "hostname `cat /system/etc/net_init.host`" >> /system/etc/net_init.rc
else
echo "hostname localhost" >> /system/etc/net_init.rc
fi
if [ -e "/system/etc/net_init.domain" ];
then
echo "domainname `cat /system/etc/net_init.domain`" >> /system/etc/net_init.rc
else
echo "domainname localdomain" >> /system/etc/net_init.rc
fi
echo >> /system/etc/net_init.rc
Of course, this thing fails miserably with -
Syntax error: end of file unexpected (expecting "then")
What the hell am I doing wrong? Never used SH before, mostly tcsh and perl.
Thanks.
Oh well, I guess I got the problem.. Unix vs Windows file format. Sorry for bothering.
its always bothered me that you cant change the device name for wifi networks, and ive always looked for a way to change it.
kudos to you for the ambition and diligence to do it!
dont give up, if you can get it smoothed out enough im sure cyanogen will implement it in his next mod. ive always wished there was an option in wifi settings to change device name. itd be very useful for lan ip configuring and when your connected to a random hotspot lol
Ok, after fighting for a day, I still didn't manage to import another .RC file and run on service exit (I don't even see the trace of the process I'm trying to start - the first thing it does is attempting to write log, and there is no log, no matter where I put the start command), but at least for a "quick-and-dirty way" there's a very simple solution, given SD-EXT partition (I believe everyone creates it):
open terminal application, type the following command:
echo "echo YOURHOSTNAME > /proc/sys/kernel/hostname" > /sd-ext/userinit.sh
That would override the hostname of the system before boot completion.
After some reading, I believe there's nothing bad in setting the hostname twice - once default localhost in init.rc, and then overriding it using /proc/sys directory, Linux is designed to cope with that and hopefully so does Android.
So, as to pershoot's request, it's possible to write a small application to read Bluetooth device name value and write it as WiFi hostname, and include it in boot process right before 20userinit.
Now this is a task I'm not suitable for, I have no knowledge of frameworks whatsoever. Anybody up to the task?
Jack_R1 said:
After some reading, I believe there's nothing bad in setting the hostname twice - once default localhost in init.rc, and then overriding it using /proc/sys directory, Linux is designed to cope with that and hopefully so does Android.
So, as to pershoot's request, it's possible to write a small application to read Bluetooth device name value and write it as WiFi hostname, and include it in boot process right before 20userinit.
Now this is a task I'm not suitable for, I have no knowledge of frameworks whatsoever. Anybody up to the task?
Click to expand...
Click to collapse
I requested it and I'm not pershoot
Oops Sorry, my bad. Fever and lots of time in front of the computer don't do me good...
Kudos to you Jack_R1. Watching this.
Let me know if you need any help with shell scripting.
Gonna watch this and try it out later, the solution so far.
is this a stable fix?
is this confirmed to work?
Sorted out, updated with the most current info and several examples of custom ROMs.
Jack_R1 said:
Sorted out, updated with the most current info and several examples of custom ROMs.
Click to expand...
Click to collapse
I am running CM6 with a2sd and somehow the /sd-ext/userinit.rc is not executed. Even if I change permissions of the file to 777, it's not executed.
I also haven't found in init.d the script which executes userinit.rc, might be because I am running custom kernel? (wildmonks).
The only way for me to do it was to put the script in /etc/init.d/88userinit file and change it's permissions to 777
It's /scripts/userinit.sh, not userinit.rc
The execution of /sd-ext/userinit.rc used to be in /init.rc, in boot.img.
But the preferred way for most of the ROMs is to use /etc/init.d/ scripts anyway, since a lot of ROMs use them.
Changed the 1st post to reflect it.

[Q]setprop from script to change ro. properties

Just say i want to change properties of something in the build.prop... now this would normally be done by setprop...
But what if i want to disable the phone function ... i cannot call setprop on a read only property (ro.) like follows:
Code:
setprop ro.phone.function 0
Is there a way around this ... or some way that i can change the like starting with "ro.phone.function=" in a sh file?
Thanks
Kris
How to modify ro.(read only) property
Hi
I've released setpropex program, which can modify value of ro. property.
http://t.co/mMtzylU7
It uses ptrace, so you need root permission to use it.
thanks.
i00 said:
Just say i want to change properties of something in the build.prop... now this would normally be done by setprop...
But what if i want to disable the phone function ... i cannot call setprop on a read only property (ro.) like follows:
Code:
setprop ro.phone.function 0
Is there a way around this ... or some way that i can change the like starting with "ro.phone.function=" in a sh file?
Thanks
Kris
Click to expand...
Click to collapse
hi can you compile it for me I need it but I don't know compiling thanks
It still works
goroh_kun said:
Hi
I've released setpropex program, which can modify value of ro. property.
[link]
It uses ptrace, so you need root permission to use it.
thanks.
Click to expand...
Click to collapse
In KitKat algorithm has changed (androidcodesearch.com/source/bionic/libc/bionic/system_properties.c). But with some modification in your code it still works. General idea and generic code are correct. Thanks!
andr_andr said:
In KitKat algorithm has changed (androidcodesearch.com/source/bionic/libc/bionic/system_properties.c). But with some modification in your code it still works. General idea and generic code are correct. Thanks!
Click to expand...
Click to collapse
Have you published the changes somewhere? Having a working setpropex for KitKat would be great.
Does this still work on Nougat?

Collection of Tweaks | 11/08/11

Tripnraver and Fanboys that wants to start trouble follow this Link! If you want to clear up the Discussion and stop fighting write me a PM and if not stay at Modaco, i even post the link for you all
Open TripNHome
XDA Users stay here and help collecting some nice X10 Tweaks to help the whole Community, every Dev/Cooker knows other Tweaks so i would like to invite all to share there best Tweaks here. Above i post some basic Tweaks and a example File how it looks like.
build.prop Tweaks
# Network
HTML:
ro.ril.hep=1
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hsdpa.category=8
ro.ril.hsupa.category=5
ro.telephony.call_ring.delay=1000
# Product
HTML:
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
mot.proximity.delay=100
# Performance
HTML:
dalvik.vm.startheapsize=48m
dalvik.vm.heapsize=48m
dalvik.vm.execution-mode=int:jit
dalvik.vm.dexopt-flags=m=y
dalvik.vm.dexopt-data-only=1
dalvik.vm.lockprof.threshold=200
windowsmgr.max_events_per_sec=300
VM Tweaks
HTML:
echo 95 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/vfs_cache_pressure
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 1 > /proc/sys/vm/oom_kill_allocating_task
echo 60 > /proc/sys/vm/dirty_background_ratio
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
echo 2000 > /proc/sys/vm/dirty_writeback_centisecs
Minfree Tweak
HTML:
echo 1536,3072,4096,15360,17920,20480 > /sys/module/lowmemorykiller/parameters/minfree
SD Card Tweak
HTML:
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo 2048 > /sys/devices/virtual/bdi/default/read_ahead_kb
build.prop Tweaks go to system/build.prop
other Tweaks go to system/etc/install-recovery.sh
I attached 2 sample files with these Tweaks included.​
shall we edit these even if running 3.6?
bodomfan said:
shall we edit these even if running 3.6?
Click to expand...
Click to collapse
No
10 Characters
Wolfbreak said:
No
10 Characters
Click to expand...
Click to collapse
Lol ok,dumb question really.its probably all included ,iv posted a request in the rom thread
im liking v3.6 atm similar to 3.5,you got any new plan sfor releases,it would be kwl if you could get achotjans green signal bar in there as he said you have his permission and also the samsung galaxy s type gingerbread battery icon,would look sexy and very gb
You can flash the Addon yourself if you like it i dont need to include it. The ROM Style will stay same, all Theme modifications the Users can flash themself like they want it becouse everyone likes different i wont touch the Theme, everyone can flash what they want becouse i cant make a Theme everyone will like becouse thats just not possible, some like Blue, some like Carbon.....
BTW this doesnt has something to do with this Thread so please keep it clean
Wolfbreak said:
You can flash the Addon yourself if you like it i dont need to include it. The ROM Style will stay same, all Theme modifications the Users can flash themself like they want it becouse everyone likes different i wont touch the Theme, everyone can flash what they want becouse i cant make a Theme everyone will like becouse thats just not possible, some like Blue, some like Carbon.....
BTW this doesnt has something to do with this Thread so please keep it clean
Click to expand...
Click to collapse
ok thanks
10 characters
Hopefully you can create flashable zip for us.
Thanks Wolfbreak!!
You can edit buildprop w the flashtool or w rootexplorer, depending on which rom you are running, some of these tweaks may already be implimented!!
Zip file is too easy!! Explore research have fun.... just make a back up first....
Best regards,
Chris
Sent from my X10 TripNMiUI-Iris using XDA App
Already did it manually using Flashtool and Root Explorer.
But for others who need quick progress, WB should create flashable zip for them.
AND
If can, maybe WB should consolidate addon such as Bravia Engine, FPS uncap, xLoud, Audio Fix, in one flashable zip.
Hi wolfbreak
I was changing the tweaks u had given
I was changing the below tweak
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
mot.proximity.delay=100
and i found that max num of touch was 4 instead of 2 by default.... does this mean anything?
2Wolfbreak : according to this http://www.linuxinsight.com/proc_sys_vm_oom_kill_allocating_task.html I wouldn't do this "echo 1 > /proc/sys/vm/oom_kill_allocating_task". Placing 0 performs better, and prevents some unexpected FCs.
awesome man.>!!!
Thats a good initiative I was thinking of starting something like this for past two day but was wait that some actual dev to start it and i will contribute more.
ohk so here are one or two simple tricks from my side.
those who don't want to mess with install-recover.sh and prefer keeping the init.d style work
here is how you can enable init.d support.
add one line at end of your install-recovery.sh
Code:
# trying run-parted
/system/xbin/busybox run-parts /system/etc/init.d
some more tweaks which might overlap with the existing tweaks posted here...
http://forum.xda-developers.com/showthread.php?p=16441133#post16441133
Note : as usual non of the credit to me all credit to Dev's.
Request
Can someone point all guides of framework customization and howtos related to that at one place.
stuff like replacing the background image to adding a reboot option and simmilar stuff.
all links at one place would be just fine for new dev's (don't get angry if its already there and i missed it, coz there are chances of it too...)
So what do these tweaks actually do?
*improve* your phone will be the sarcastic answer, but forgive me if I won't blindly apply tweaks without having at least some idea as to what they are doing?
anantshri said:
Can someone point all guides of framework customization and howtos related to that at one place.
stuff like replacing the background image to adding a reboot option and simmilar stuff.
all links at one place would be just fine for new dev's (don't get angry if its already there and i missed it, coz there are chances of it too...)
Click to expand...
Click to collapse
If u need help PM me.
blueowl0708 said:
So what do these tweaks actually do?
*improve* your phone will be the sarcastic answer, but forgive me if I won't blindly apply tweaks without having at least some idea as to what they are doing?
Click to expand...
Click to collapse
That's actually a good question i will see what i can help you with then later on other remaining could be answered by otheres.
# Product
HTML:
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
mot.proximity.delay=100
This tweak is basically a build.prop tweak which is making system aware of a dual touch capable system.
# Performance
HTML:
dalvik.vm.startheapsize=64m
dalvik.vm.heapsize=64m
dalvik.vm.execution-mode=int:jit
dalvik.vm.dexopt-flags=m=y
dalvik.vm.dexopt-data-only=1
dalvik.vm.lockprof.threshold=150
windowsmgr.max_events_per_sec=80
These are basically VM related tweaks first making heapsize 64M i.e. larger default is smaller. also this last line makes your system more responsive i keep something higher then 250 in place of 80.
VM Tweaks
HTML:
echo 95 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/vfs_cache_pressure
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 1 > /proc/sys/vm/oom_kill_allocating_task
echo 60 > /proc/sys/vm/dirty_background_ratio
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
echo 2000 > /proc/sys/vm/dirty_writeback_centisecs
VM Tweaks basically change min free bytes and kill level's of application used internally by android for memory management.SD Card Tweak
HTML:
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo 2048 > /sys/devices/virtual/bdi/default/read_ahead_kb
This is a simple tweak which specifies the read ahead buffer which is by default 128Kb effectively making your SDCard i/o faster.
Hope these could clarify your doubts remaining ones wolf or others might give a try to explain.
a flashable zip file would be nice
ive been trying to place my own tweaks within the install-recovery.sh file however when i flash zip the file seems to have changed however nothing actually takes effect. new to this side of things so could just be a schoolboy error lol. can say if i use the simple install-recovery.sh file from Z's uncap fps or even yours from your rom and flash it.. it all works well! if i try to edit any of yours and flash again.. nothing happens! wat am i missing?

[Xperia P/U/Sola/Go] Better Internet Wi-Fi and 3G

Hello all! This is my first thread and here I'm presenting you better Internet weather you're on Wi-Fi or 3G.
Requirements:
1. Any ICS/JB ROM except CM.
2. Root.
The method is as follows:
1. Open Root Explorer.
2. Make your way to root>system>build.prop.
3. Tap and hold build.prop and tap "Open in Text Editor".
4. Add these lines to end of your build.prop:
Code:
#Better internet browsing & download speed
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.hspa=4096,87380,256960,4096,16384,256960
#3G Tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.hsupa.category=5
5. Press menu button and tap "Save and Exit".
6. Exit Root Explorer.
7. Re-boot phone.
8. Enjoy!
REMEMBER to hit THANKS better than saying!
cy56 said:
Hello all! This is my first thread and here I'm presenting you better Internet weather you're on Wi-Fi or 3G.
****ONLY FOR STOCK ICS***
This Mod is only for Stock ICS because this Mod is already present in Custom ROMs.
Requirements:
1. Stock ICS.
2. Root.
3. Unlocked Bootloader.
Click to expand...
Click to collapse
I'm sorry bro, why do we need unlocked bootloader for this?
Because I've tried this on locked bootloader and I've to flash my Stock FTF again I hadn't tried anymore due to my exams. Try if u can had this on locked bootloader.
And, sorry for late reply (if I did).
Sent from my ST25i using XDA Premium 4 mobile app
Why wouldn't it work on stock JB?
Sent from a polarized, modified, undying, amazingly talented and extremely naughty phone.
That's Work on locked Bootloader it's Works Good
Also try it on Xperia Sola Works Too
Thanks
:laugh:
Vtrendzzy said:
Why wouldn't it work on stock JB?
Sent from a polarized, modified, undying, amazingly talented and extremely naughty phone.
Click to expand...
Click to collapse
It works on JB too! I said for ICS because all JB custom ROMs already have this.
If your ROM doesn't have this, you can try this.... By the way I should change it to both ICS & JB.....
Sent from my ST25i using XDA-Developers Premium App.
REMEMBER to hit THANKS if I helped you, it's better than saying and doesn't costs nothing!
Work on kk?
Sent from my Xperia P using XDA Premium 4 mobile app
@cy56
Wouldn't it be much more simple to make a flashable zip that would reduce the how to install instructions to about 2 lines only?
Could some one make a zip of it to install with cwm?
That would help a lot lf people
Not CWM Flashable!
Potloodje said:
Could some one make a zip of it to install with cwm?
That would help a lot lf people
Click to expand...
Click to collapse
Hey! This is not CWM Flashable because if you make flashable ZIP and flash it, it'll replace your whole build.prop file and you'll get bootloop.
And, By the way, this method is so easy that anyone can do it. As I've provided whole process in step-by-step, you can do it on closed eyes! :victory: (PS: Don't try doing this closing your eyes :laugh: :laugh: )
Work on KK?
Sent from my Xperia Sola using Tapatalk
cy56 said:
Hey! This is not CWM Flashable because if you make flashable ZIP and flash it, it'll replace your whole build.prop file and you'll get bootloop.
Click to expand...
Click to collapse
Making a flashable zip that would not replace the whole build.prop is so easy that anyone can do it.
e.g. by executing this simple shell script:
Code:
#!/system/bin/sh
echo "\
line one\n\
line2\n\
lineN" >> /system/build.prop
Is that easy or what?
A bit too easy maybe as it would keep adding the lines at the bottom of build.prop every time it is executed, so something a bit more complicated is needed, like this
Code:
#!/system/bin/sh
BUSYBOX="/sbin/busybox"
SED="$BUSYBOX sed"
WC="$BUSYBOX wc"
#
COMMENT1="# YOUR COMMENT START"
COMMENT2="# YOUR COMMENT END"
MYLINES="\
$COMMENT1\n\
line1\n\
line2\n\
lineN\n\
$COMMENT2"
#
EXPECTEDLINES=`echo "$MYLINES" | $SED 's/'"$MYLINES"'/'"$MYLINES"'/' | $WC -l`
if [ "$EXPECTEDLINES" == "" ]; then exit 1 fi;
FOUNDLINES=`$SED -e '/'"$COMMENT1"'/,/'"$COMMENT2"'/!d' build.prop | $WC -l`
if [ "$FOUNDLINES" == "0" ]; then
echo "$MYLINES" >> build.prop
exit 0;
fi
exit 2;
And if you don't want to rely on CWM having busybox, add busybox to the zip and change
BUSYBOX="/sbin/busybox"
to
BUSYBOX=`dirname $0`"/busybox"
or just
BUSYBOX=`/tmp/busybox"
See? Anyone can do it
ChikeD said:
Making a flashable zip that would not replace the whole build.prop is so easy that anyone can do it.
e.g. by executing this simple shell script:
Code:
#!/system/bin/sh
echo "\
line one\n\
line2\n\
lineN" >> /system/build.prop
Is that easy or what?
A bit too easy maybe as it would keep adding the lines at the bottom of build.prop every time it is executed, so something a bit more complicated is needed, like this
Code:
#!/system/bin/sh
BUSYBOX="/sbin/busybox"
SED="$BUSYBOX sed"
WC="$BUSYBOX wc"
#
COMMENT1="# YOUR COMMENT START"
COMMENT2="# YOUR COMMENT END"
MYLINES="\
$COMMENT1\n\
line1\n\
line2\n\
lineN\n\
$COMMENT2"
#
EXPECTEDLINES=`echo "$MYLINES" | $SED 's/'"$MYLINES"'/'"$MYLINES"'/' | $WC -l`
if [ "$EXPECTEDLINES" == "" ]; then exit 1 fi;
FOUNDLINES=`$SED -e '/'"$COMMENT1"'/,/'"$COMMENT2"'/!d' build.prop | $WC -l`
if [ "$FOUNDLINES" == "0" ]; then
echo "$MYLINES" >> build.prop
exit 0;
fi
exit 2;
And if you don't want to rely on CWM having busybox, add busybox to the zip and change
BUSYBOX="/sbin/busybox"
to
BUSYBOX=`dirname $0`"/busybox"
or just
BUSYBOX=`/tmp/busybox"
See? Anyone can do it
Click to expand...
Click to collapse
Ohh man you really know a lot of programming. Can u teach me from basics? Pls
Sent from my ST27i using XDA Premium 4 mobile app
Or you can simply create a build entry
Hukanawa said:
Or you can simply create a build entry
Click to expand...
Click to collapse
Whazet?
@cy56
The net.tcp.buffersize props make absolutely no change at all as the are set by init.
The ro.ril props are not present at stock at all so at best they do no harm.
Never works for me....
ChikeD said:
Making a flashable zip that would not replace the whole build.prop is so easy that anyone can do it.
e.g. by executing this simple shell script:
Code:
#!/system/bin/sh
echo "\
line one\n\
line2\n\
lineN" >> /system/build.prop
Is that easy or what?
A bit too easy maybe as it would keep adding the lines at the bottom of build.prop every time it is executed, so something a bit more complicated is needed, like this
Code:
#!/system/bin/sh
BUSYBOX="/sbin/busybox"
SED="$BUSYBOX sed"
WC="$BUSYBOX wc"
#
COMMENT1="# YOUR COMMENT START"
COMMENT2="# YOUR COMMENT END"
MYLINES="\
$COMMENT1\n\
line1\n\
line2\n\
lineN\n\
$COMMENT2"
#
EXPECTEDLINES=`echo "$MYLINES" | $SED 's/'"$MYLINES"'/'"$MYLINES"'/' | $WC -l`
if [ "$EXPECTEDLINES" == "" ]; then exit 1 fi;
FOUNDLINES=`$SED -e '/'"$COMMENT1"'/,/'"$COMMENT2"'/!d' build.prop | $WC -l`
if [ "$FOUNDLINES" == "0" ]; then
echo "$MYLINES" >> build.prop
exit 0;
fi
exit 2;
And if you don't want to rely on CWM having busybox, add busybox to the zip and change
BUSYBOX="/sbin/busybox"
to
BUSYBOX=`dirname $0`"/busybox"
or just
BUSYBOX=`/tmp/busybox"
See? Anyone can do it
Click to expand...
Click to collapse
I tried it many times but it never works for me. But I tried a different method which doesn't required programming and that method never works for me thereby giving me "Infinite Bootloop"!
If someone wants to have flashable ZIP please contact him!​
Works for me!
ChikeD said:
Whazet?
@cy56
The net.tcp.buffersize props make absolutely no change at all as the are set by init.
The ro.ril props are not present at stock at all so at best they do no harm.
Click to expand...
Click to collapse
I don't know programming hence I don't know what each and every content does. I found this in many ROMs and they gave me better internet stability as in Stock ROM my downloads are usually halted so I shared this for those users who don't have this in their ROMs. I don't know the original creator of this so I can't thank him.
Try it!
jjssore said:
Work on KK?
Sent from my Xperia Sola using Tapatalk
Click to expand...
Click to collapse
KK Nightly's latest build already have some 3G and Wi-Fi tweaks different from this. If you don't have you can have a try!
But before trying make a backup of your current ROM from CWM.
cy56 said:
I don't know programming hence I don't know what each and every content does. I found this in many ROMs and they gave me better internet stability as in Stock ROM my downloads are usually halted so I shared this for those users who don't have this in their ROMs. I don't know the original creator of this so I can't thank him.
Click to expand...
Click to collapse
So how do you know it works, what difference does it make?
I think it is better not to post things you don't know about, unless it's a share/link to app or MOD someone did.
Maybe there are RMs it works, but ROMs have many other changes that may make it work.
cy56 said:
KK Nightly's latest build already have some 3G and Wi-Fi tweaks different from this. If you don't have you can have a try!
But before trying make a backup of your current ROM from CWM.
Click to expand...
Click to collapse
where i can find link kk nightly ? and any bugs?

[Q&A] [ROM] Gohma 2.0 - 12/15/2014 [Android Wear]

Q&A for [ROM] Gohma 2.0 - 12/15/2014 [Android Wear]
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [ROM] Gohma 2.0 - 12/15/2014 [Android Wear]. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
It appears that the vibration and other settings are not active in Gohma 2.0
From my research it seems that the /system/etc/rc.d/01tweaks file never gets to run.
I have been messing around with my watch to find a place to trigger execution of that directory but haven't found one yet.
Where did you put an initialization for it last time?
Alynna said:
It appears that the vibration and other settings are not active in Gohma 2.0
From my research it seems that the /system/etc/rc.d/01tweaks file never gets to run.
I have been messing around with my watch to find a place to trigger execution of that directory but haven't found one yet.
Where did you put an initialization for it last time?
Click to expand...
Click to collapse
I'll have a fix shortly, sorry!
Alynna said:
It appears that the vibration and other settings are not active in Gohma 2.0
From my research it seems that the /system/etc/rc.d/01tweaks file never gets to run.
I have been messing around with my watch to find a place to trigger execution of that directory but haven't found one yet.
Where did you put an initialization for it last time?
Click to expand...
Click to collapse
The init.d/rc.d directories seem to be run from the /system/etc/install-recovery.sh file. Look there and you should see the run-parts command. Which btw okibi, is ingenious, using the stock recovery script to provide init.d support in the face of a kernel that doesn't support it natively.
What software compilation are using Gohma 2.0? I´ve been testing and I have the corrosion problem with a Lg G watch (1,4 volts between pins while being out of the charger), perhaps the base isn´t a "finished-on-Y" compilation?
Nice work, 0 lag everywhere!
Bootloop
While I was running the windows installation to upgrade to 2.0, the program crashed, and the rom is stuck in a bootloop. I can boot into fastboot, and the recovery, but nothing. Any help?
tharrllz said:
While I was running the windows installation to upgrade to 2.0, the program crashed, and the rom is stuck in a bootloop. I can boot into fastboot, and the recovery, but nothing. Any help?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=54250887
Toolkit should work to get back to stock lollipop.
Still a bug
There is still a little bug in gohma 2.1, but I fixed it in the script.
SOMETHING sets the governor back to userspace/787200 about a minute into the watches' boot.
I logged in and watched it occur.
However the other parameters now stick.
I fixed it with the following:
#!/system/bin/sh
/system/xbin/sysrw
##############################
# BEGIN CUSTOM USER SETTINGS #
##############################
# increase vibration intensity
# default is 80
echo 85 > /sys/class/timed_output/vibrator/amp
# default is 20
echo 175 > /sys/class/timed_output/vibrator/driving_ms
# switch from userspace to ondemand governor
# echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# echo 787200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# Defer change until later, see enforcer below.
GOV=ondemand
FREQ=1094400
# set dpi (default is 240, smaller number means smaller text)
setprop ro.sf.lcd_density 200
##############################
# END CUSTOM USER SETTINGS #
##############################
# improve sd cache
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
fi
# improve block speed
for node in `busybox find /sys -name nr_requests | grep mmcblk`; do echo 1024 > $node; done
# gpu rendering
busybox mv /system/lib/egl/libGLES_android.so /system/lib/egl/libGLES_android.bak
busybox sed -i '/0 0 android/d' /system/lib/egl/egl.cfg
# adjust minfree
echo "0" > /sys/module/lowmemorykiller/parameters/debug_level
echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree
# improve file system mounts
busybox mount -o remount,noatime,nodiratime,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /
busybox mount -o remount,noatime,nodiratime,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /sys
busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /system
busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /data
busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /cache
# improve transitions
if [ -e /data/data/com.android.providers.settings/databases/settings.db ]; then
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 0.5 where name = 'transition_animation_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 0.5 where name = 'animator_duration_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 1 where name = 'window_animation_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 0.5 where name = 'transition_animation_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 0.5 where name = 'animator_duration_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 1 where name = 'window_animation_scale'"
fi
# enable sysctl tweaks
busybox sysctl -p /system/etc/sysctl.conf
/system/xbin/sysro
# Wait around for the system to change the governor and change it back, then exit when we're sure its set.
# This function will remain running for a minute to enforce the change, until it's sure the system won't change it back.
enforcer () {
X=0
while [ $X -lt 12 ]; do
if [ ! `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` = $GOV ]; then
echo $GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
X=0
else
X=$(($X+1))
fi
sleep 5
done
unset X
}
enforcer &
Alynna said:
There is still a little bug in gohma 2.1, but I fixed it in the script.
SOMETHING sets the governor back to userspace/787200 about a minute into the watches' boot.
I logged in and watched it occur.
However the other parameters now stick.
I fixed it with the following:
Click to expand...
Click to collapse
I reinstalled using your additional governer tweak, is there any way to check and make sure its working? Seems to have made a noticeable improvement, it reduces some random lag i was getting with Wear Mini Launcher
myke66 said:
I reinstalled using your additional governer tweak, is there any way to check and make sure its working? Seems to have made a noticeable improvement, it reduces some random lag i was getting with Wear Mini Launcher
Click to expand...
Click to collapse
I log into the phone using:
adb shell
and check that the /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor remains 'ondemand'.
I noticed when I logged in with gohma 2.0 and 2.1, that this would get switched back to 'userspace' after a little less than a minute.
I'm not sure the 01tweaks file was even executed in 2.0. Definitely is executed in 2.1, but, something else in the system was changing the scaling settings back to defaults.
if its not working, the file above will be 'userspace', if it does, it is 'ondemand'.
Also, I have set my default top speed to 1.0ghz which is why wear launcher is probably snappier. This MAY have an impact on battery life, but probably not too much because the watch remains at about 300mhz whenever idle.
You can check /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies for valid values for the FREQ variable. Lower numbers probably mean marginally better battery life.
myke66 said:
I reinstalled using your additional governer tweak, is there any way to check and make sure its working? Seems to have made a noticeable improvement, it reduces some random lag i was getting with Wear Mini Launcher
Click to expand...
Click to collapse
A handy utility that you can sideload on our watch is PerfMon by Chainfire:
http://forum.xda-developers.com/showthread.php?t=1933284
If your frequency fluctuates from 300 to 1190, then you are on ondemand governor.
---------- Post added at 12:19 PM ---------- Previous post was at 11:50 AM ----------
Alynna,
Thanks for the enforcer mod. For some reason after installing your mod, the governor was still on userspace/787200. After playing around I changed sleep from 5 to 10 and now it works great.
:good:
The standard 5.0 ROM version has a new sleep function that turns off the watch display if it hasn't moved for 30 minutes. This is driving me nuts as I always put my watch next to my monitor while I'm working so I have to keep waking it up or I miss notifications.
Is this "feature" in this ROM and if so, is there any way to turn it off or extend the timeout ?
Thanks
i'm looking at the rom and kernel.
the kernel looks like it has more option/tweaks.
i know both dont work together a bit normal cause the rom is a bit the same it are tweaks and no visual changes
i think kernel looks better. in way of functions.
just this rom has also more cpu steps? 300-1.1ghz?
cause if im right stock just is locked on 778mhz? and even with wear control app seems like i can't change it (i mean i don't realy know cant see if power save or balanced governers do any thing). need to check with a app how fast my cpu is running.
This ROM had been great! One question: Does the reset option in the watch settings properly reset and keep gohma tweaks? I tend to flash allot of ROMs on my phone and have been flashing my watch back to stock then each time as well as reflashing gohma. Stock recovery here. See no real reason for custom when everything is done using adb and computer.
Nandrew said:
This ROM had been great! One question: Does the reset option in the watch settings properly reset and keep gohma tweaks? I tend to flash allot of ROMs on my phone and have been flashing my watch back to stock then each time as well as reflashing gohma. Stock recovery here. See no real reason for custom when everything is done using adb and computer.
Click to expand...
Click to collapse
Yup. Just reset between phone ROM flashes.
Any update or thoughts on if we can find a way to make this ROM stop pumping out the 1.74 volts to our wrists via the metal contacts? Just discovered the whole issue of corrosion via the voltage emitted from the watch while being worn. I checked mine, running this ROM, and sure enough: it's live. 1.74 volts of electricity going into your wrist while you wear this thing. LG claims to have sent out a software fix a while back.
Thanks for the development & work on this ROM! Hopefully an "ah-ha" moment can be had and get this issue solved!
To think some people actually pay to have electricity run thru their body.. LG didn't consider it a feature? Lol
No corrosion here.
Gohma 2.2 - NEED DOWNLOAD
Jake's site to download the rom seems to be acting up. The download is extremely slow and keeps failing. I am in desperate need of this excellent ROM!! Does anybody have an alternate download link for Gohma 2.2? Any help is greatly appreciated.
Quick question? Installed 2.2 and everything runs fine except Perfmon only shows one core active. If I run the adb script I can turn the others on but for some reason by default one one core is up after a reboot. Any help.
kwd114kwd114 said:
Quick question? Installed 2.2 and everything runs fine except Perfmon only shows one core active. If I run the adb script I can turn the others on but for some reason by default one one core is up after a reboot. Any help.
Click to expand...
Click to collapse
The 01tweaks script on 2.3 didn't work for me either. Ondemand and frequency are correctly set, but only one core. Couple of workarounds:
1. Set the cores directly using adb commands from your PC.
2. Sideload kernel adiutor from the play store (nice kernel tuner app that works on our watch, dev is active on XDA)
3. Or modify the 01tweaks script to set the cores within the enforcer part of the script (right after $GOV and $FREQ are set)
Code:
# Wait around for the system to change the governor and change it back, then exit when we're sure its set.
# This function will remain running for a minute to enforce the change, until it's sure the system won't change it back.
enforcer () {
X=0
while [ $X -lt 12 ]; do
if [ ! `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` = $GOV ]; then
echo $GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1" > /sys/devices/system/cpu/cpu1/online
X=0
else
X=$(($X+1))
fi
sleep 5
done
unset X
}
enforcer &

Categories

Resources