[Hero CDMA Android Development] TrevE:
I decided to start a new thread for sanity purposes, the last one is already getting too big to scroll through. Here is the first release of my GUI + updated script that easily configs rom options. I tried to write this as generic as possible so we have the most room for upgrade in the future. Right now its pretty ugly but alot works. I need testers to play around with this, theres no way i can test every possible rom and every possible switch.

This should work with any kernel that runs app2sd, just needs a slight tweak to the init.rc to make sure apps2sd directorys are setup before launching the rom. This takes alittle bit more time to do it properly. Ill be posting a few different flavors for various roms out there. If you have a bug, please adb logcat _really_ helps. Also rom version you are on, and a copy of your /data/data/com.treve.dconfig/dc.conf & dcbannedapp.conf, i also have started to implement logging, /data/dcboot.log will help. sorry for files all around next version will fix alot. This requires toolbox (needs getprop/setprop) everything else should be included.

pretty much flash the right version over your rom, set your options, save, reboot & enjoy. shouldnt be much more to it. if you get forcecloses upgrading or after restoring apps wipe your /data/app-private/* some apps dont play nice. first boot will take _forevor_

Defaults are apps2sd with apps & app-private moved, dalvik on phone, swap to SD, JIT off. **it does not read back options saved so use other methods to tell if its working till next build **

Contact me if you want to put this in your rom or help me out!

Downloads:

v1.2 -

-Adds in dalvik VM heapsize settings

-fixes permissions a bit

-backend work for audio move underway

v1.2 downloads-

Damage/Fresh2.0d/Sushi/Aloysis kernel - http://www.4shared.com/file/d2UVEYLJ/treveDConfigDCKERNELv12.html

v1.1 -

Adds in restoring of configs capability. Need to manually hit the button to restore for now.

sets by default to "safe" settings. Should increase compatibility. Users of previous versions once you save your settings once they should stick on upgrades until you wipe the device :)

V1.1 Download (tested flashing ontop of damagecontrol & pancake 0.1)

Damage/Fresh2.0d/Aloysis (2.6.29-d30020a8) - http://www.4shared.com/file/vFIOghLT/treveDConfigDCKERNELv11.html

v1.5 gumbo (2.6.27GK-0.32) - http://www.4shared.com/file/4KolEQTJ/treveDConfiggumbo15ckernelv11.html

v1- first release

-newer a2sd then previous release

-set config options in gui

-initial configs write to /system/etc/ for now my GUI writes to /data/data/com.treve.dconfig/ a2sd will prefer the ones in data/data/ if they exist. this should allow for rom cookers to put in there recommended settings, but if your flashing over a existing rom without a wipe it will keep all your preferences. This is nice because we get stuff like auto remove of apps we dont use without romcookers putting out over 9000 roms.

-GUI DOES NOT READ BACK CONFIGS YET. This will come next version. For now once you exit form it will revert to defaults so you will not beable to see what you have set once you exit. (main settings & banned apps are on 2 different configs, you do not need to save both pages when making changes.)

-No icon or package name. Deal with it - you get functional or pretty. Ill clean stuff up later.

v1 downloads-

Damage kernel(2.6.29-d30020a8) - http://www.4shared.com/file/P_IlAvUs/treveDConfigDCKERNEL.html

Fresh kernel from 2.0d (untested by me) http://www.4shared.com/file/FQYFsuJa/treveDConfigfresh20dkernel.html

Gumbo 1.5c (realllly untested) http://www.4shared.com/file/hK9k7g-Q/treveDConfiggumbo15ckernel.html

Here is the backend settings that are possible. This stuff might be jibberish to most but with gui now it shouldnt matter to more than rom cookers or people who like to tinker.

**NOTE COMMENTS STILL HAVE 0 AND 1 NEW VERSION USES TRUE/FALSE**

/system/etc/dc.conf is the heart of this mod now. Dont try to delete variables or the conf file, scripts not smart enuf to check for that yet.

#DC Config file
#Hacked up by TrevE @ xda for damagedrom
#
#dc.a2sd.active - disables all a2sd
#dc.a2sd.apps.active - 0 moves all files to /data/ - 1 moves to /sdcard/data/ can be controlled seperate from a2sd.active
#dc.a2sd.dalvikcache.active - 0 keeps files on /data/ - 1 moves to /sdcard/dalvik-cache/
#
#dc.swap.active - 1 auto mounts sd card partition mmcblk0p3 for swapping. 0 keeeps it at mtdblock4
#dc.swap.swappiness - Range: 0 - 100, larger number = more likely to swap
#dc.jit.active - 1 to enable JIT next boot (make sure to switch to lancher as a defalt home first) 0 to disable.
#dc.bannedapp.active - 1 enables ban list (renames .apks to .dcbanned) defaults are set to programs that interfere with JIT
#dc.firstboot.active - check for firsboot script in /data/ on boot
#dc.zipalign.active - zipalign anything that needs it in /data/ on boot
#
# scaling_governor has 2 settings with HTC Perflock "ondemand" or "performance"
# lowmemkiller default rom settings - 1536,2048,4096,5120,5632,6144
# lowmemkiller less agressive settings - 1536,2048,4096,5120,15360,23040
# lowmemkiller more agressive setting - 1536,3072,4096,21000,23000,25000

#A2SD specific stuff script
setprop dc.a2sd.active true;
setprop dc.a2sd.apps.active true;
setprop dc.a2sd.dalvikcache.active true;

#Other system parms
setprop dc.swap.active false;
setprop dc.swap.swappiness 30;
setprop dc.jit.active false;
setprop dc.bannedapp.active false;
setprop dc.firstboot.active true;
setprop dc.zipalign.active true;

#Former gumbo.sh settings
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree

==================="Basic" Options===================

Apps2SD

-Default is dalvik & apps are moved to sd. (Does not hurt to leave enabled if you are not using it.)

-if you have a slower SD card it might be better moving dalvik back to internal memory.

You can enable/disable dalvik & app move separately. To move dalvik back to SD:

-New users any time just format ext(2 or 3) in recovery to enable. Next boot it will automatically move your apps. If you get any FC after a new enable of a2sd try Fix apk UUID option in recovery

AutoZipalign

-On by default.

anything written with newer dev kits should do this automatically, but there are still a buncha market apps that arent. This just goes through /data/app/ on boot and checks that everythings aligned and fixes what it needs to. Fixes some of the rosie lag loading the icons.

more here http://developer.android.com/guide/developing/tools/zipalign.html

scaling_governor

-Set to ondemand by default

Just change word in quotes. With HTCs 2.6.29 kernel we have two options (until someone gets us source)

-performance

-ondemand

lowmemkiller

-Set to more aggressive by default.

To change just edit numbers in double quotes on the lowmemkiller line in dc.conf.

Common values: (included at top of conf but here again for reference)

# lowmemkiller default rom settings - 1536,2048,4096,5120,5632,6144
# lowmemkiller less agressive settings - 1536,2048,4096,5120,15360,23040
# lowmemkiller more agressive setting - 1536,3072,4096,21000,23000,25000

DCBannedapp.conf

-default is off

*If this "banned app" flag is set it will rename any file in /system/etc/dcbannedapp.conf to .banned. When its set back to 0 it will "re-enable" them. Right now dcbannedapp.conf cannot have anything but a full filename (/system/app/Rosie.apk), one per line.

*if the delete banned app flag is on anything in this list will be deleted instead of renamed. No going back.

This is useful in a few ways-

-if you enable JIT we can put a list of banned apps (htc stuff) to increase stability. If you want to disable JIT just flip to flags and you have sense again.

-rom cookers can just post config files to have several different versions of a rom from one download (for ex: sense/no sense version)

Here is an example of dcbannedapp.conf I have been playing with. This strips sense out & gets you down pretty bare bones. (Yes there is more we can remove, i trimmed this list up a bit when we were having issues. now that things seem stable its time to cut out more )

/system/app/com.htc.MusicWidget.apk
/system/app/com.htc.TwitterWidget.apk
/system/app/com.htc.StockWidget.apk
/system/app/com.htc.WeatherWidget.apk
/system/app/DCSStock.apk
/system/app/Facebook.apk
/system/app/Flickr.apk
/system/app/HtcAddProgramWidget.apk
/system/app/htccalendarwidgets.apk
/system/app/htccontactwidgets.apk
/system/app/HtcClockWidget.apk
/system/app/HtcLockScreen.apk
/system/app/htcmailwidgets.apk
/system/app/htcmsgwidgets.apk
/system/app/HtcNaviPanel.apk
/system/app/HtcRingtoneTrimmer.apk
/system/app/htcsearchwiddgets.apk
/system/app/HtcSoundRecorder.apk
/system/app/HtcTwitter.apk
/system/app/IM.apk
/system/app/IQRD.apk
/system/app/OMADM.apk
/system/app/Rosie.apk
/system/app/SDSA.apk
/system/app/Sprint_Core.apk
/system/app/Sprint_NFL.apk
/system/app/Sprint_Nscar.apk
/system/app/Sprint_TV.apk
/system/app/Sprint_TVWidget.apk
/system/app/Stock.apk
/system/app/VoiceSearch.apk
/system/app/WidgetDownloadManager.apk
/system/app/WorldClock.apk

firstboot

-default is on

script in /data/firstboot.sh will run automatically on nextboot if it exists. Auto deletes when done right now (new flag soon)

===================Advanced Options===================

Handle with care

Swapping

-Swap is disabled by default.

-If you have a fast card you can turn it on by pulling /system/etc/dc.conf and changing

setprop dc.swap.active false;

to

setprop dc.swap.active true;

More about swapping here (in same article as compcahe, not the same) http://wiki.cyanogenmod.com/index.php/Compcache

If you look at benchmarks below my guess is the lower swap is better with quick burst reads but when you swap moree and more out the card (or the bus) hits a limit a starts to choke. Went back down to 30 an result were right around 4.6 for copy mb again.

JIT

**JIT does not play nice with rosie or HTC lockscreen**

Enable bannedapp flag & put any conflicting files in /system/etc/dcbannedapp.conf This will let you switch between JIT compatible stuff/ non JIT on the fly.

To enable JIT:

-first use homeswitcher to switch to anything becides rosie and make it default (included lancher.apk in update).

-Now you must adb shell rm /system/app/HtcLockScreen.apk

-Now pull /etc/dc.conf and change

setprop dc.jit.active false;

to

setprop dc.jit.active true;

reboot & enjoy