New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
TrevE
Old
(Last edited by TrevE; 27th April 2010 at 08:00 AM.)
#1  
Recognized Developer - OP
Thanks Meter 3577
Posts: 2,032
Join Date: Apr 2007

 
DONATE TO ME
Exclamation 4/27-DConfig 1.2-NEED TESTERS! GUI for custom Apps2SD,New Dalvik Tweaks,JIT,Swap,more

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...KERNELv12.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...KERNELv11.html
v1.5 gumbo (2.6.27GK-0.32) - http://www.4shared.com/file/4KolEQTJ...kernelv11.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...gDCKERNEL.html
Fresh kernel from 2.0d (untested by me) http://www.4shared.com/file/FQYFsuJa...20dkernel.html
Gumbo 1.5c (realllly untested) http://www.4shared.com/file/hK9k7g-Q...15ckernel.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.
Code:
#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:
Quote:
Changing any options are easy. For example - To turn just dalvik sd cache off:

start -> run -> cmd
defaults are in:
adb pull /system/etc/dc.conf .

if you used dc tool use the one in data data:
adb pull /data/data/com.treve.dconfig/dc.conf .

open up dc.conf in notepad. Change the one line
setprop dc.a2sd.dalvikcache.active false;
to
setprop dc.a2sd.dalvikcache.active true;

push it back to phone
adb remount
adb push dc.conf /system/etc/
-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/d.../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)
Code:
# 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 )
Code:
/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
DONATE TO THE EFF Let them know XDA-Developers sent you or you support the cause (https://www.eff.org/deeplinks/2011/1...s-legal-threat)
 
TrevE
Old
(Last edited by TrevE; 26th April 2010 at 02:02 AM.)
#2  
Recognized Developer - OP
Thanks Meter 3577
Posts: 2,032
Join Date: Apr 2007

 
DONATE TO ME
===================Fixes===================
-Avaulaunches modded AudioRC fix to work with this. Flash the latest mod above then this ontop of it right after.
http://www.4shared.com/file/9mEpJR-0...rTrevEMod.html


-If you get bootloops upgrading try whacking private apps
Code:
adb remount
adb shell rm /data/app-private/*
adb shell reboot
-If you want to stick with JIT & have no use to ever enable the banned apps again you can delete em
Code:
adb remount
adb shell rm /system/app/*.dcbanned

===================Benchmarks===================
linkpack/membench seem relevant here, neocore doesnt really fluxuate in fps doesnt seem worth it.
(post yours & any tweaks you make!)

Here is with a2sd app & dalvik moved
Swap off, Swap @30, Swap @ 60(in order left-> right, yes 60 is worst.)


A2sd app/Dalvik/Swap@30/JIT on


JIT off /on:
DONATE TO THE EFF Let them know XDA-Developers sent you or you support the cause (https://www.eff.org/deeplinks/2011/1...s-legal-threat)
 
fallentimm
Old
#3  
Senior Member
Thanks Meter 4
Posts: 390
Join Date: Apr 2010
finally a aps2sd I understand! This us amazing. Testing....
 
fallentimm
Old
#4  
Senior Member
Thanks Meter 4
Posts: 390
Join Date: Apr 2010
apps2sd working great on aloysis! You rock
 
redram38
Old
#5  
Senior Member
Thanks Meter 27
Posts: 505
Join Date: Nov 2009
Do I flash this over my Rom now. I am using Regaw.
 
TrevE
Old
#6  
Recognized Developer - OP
Thanks Meter 3577
Posts: 2,032
Join Date: Apr 2007

 
DONATE TO ME
Quote:
Originally Posted by redram38 View Post
Do I flash this over my Rom now. I am using Regaw.
the damage control should flash over regaw fine. once you flash go into the app & tweak things how you want, then save & reboot for it to take effect. If you have a fast SD card the most common mods are moving dalvik to SD and swapping. JIT adds a nice speed boost as you can see by the benchmarks but isn't quite working in sense yet so make sure to disable sense in banned apps.

Going without sense is a bit weird at first but theres a buncha nice apps out there. check out helix launcher, beautiful widgets and bookmarks2. That with the android power widget & genie weather widget im pretty happy.

DONATE TO THE EFF Let them know XDA-Developers sent you or you support the cause (https://www.eff.org/deeplinks/2011/1...s-legal-threat)
 
nebenezer
Old
#7  
nebenezer's Avatar
Senior Member
Thanks Meter 130
Posts: 3,102
Join Date: Dec 2009
Quote:
Originally Posted by redram38 View Post
Do I flash this over my Rom now. I am using Regaw.
That's what I'm about to do

I'm pretty sure he built this to run with "any" sprint based release



THANKS TrevE!!!

This is amazing. It's been awesome watching this come together, I can't believe you built this into an app. You sir are officially THE MAN
this is my signature
 
fallentimm
Old
#8  
Senior Member
Thanks Meter 4
Posts: 390
Join Date: Apr 2010
been playing around tweaking my settings. cant wait for it to save settings its wierd without it.

I appreaciate the work and all but it really needs an icon lawlz


thanx
 
TrevE
Old
#9  
Recognized Developer - OP
Thanks Meter 3577
Posts: 2,032
Join Date: Apr 2007

 
DONATE TO ME
sorry for the app being a bit crude still i wanted features to work rather than look good. Itll get better in time remember this is only a few days work i got alot more planned

Hopefully later on well have some kinda icon. Im close to being done with restoring states from a config now, probably wont see something till later tongiht though. Unless anyone finds bugs with the actual script itself it will ust be a new APK to push. Keep the reports coming in of successes or any issues!
DONATE TO THE EFF Let them know XDA-Developers sent you or you support the cause (https://www.eff.org/deeplinks/2011/1...s-legal-threat)
 
aiwetir
Old
#10  
aiwetir's Avatar
Senior Member
Thanks Meter 109
Posts: 1,095
Join Date: Jan 2010
Location: Oregon
Quote:
Originally Posted by TrevE View Post
Going without sense is a bit weird at first
Do you know of any mobile data toggle widgets that actually work as a toggle and don't just take you to the mobile data settings when launched? I spent a few hours last night trying to find one.


XDA PORTAL POSTS

Expand Your Choice of Icons with Icon Themer

Icons are some of the most commonly themed elements of the Android UI, and there is certainly no … more

MicrowaveTimePicker Brings 4.2 TimePicker to 2.1+ Devices

It’s frustrating to see slick new features that you can’t use when … more

What’s Possible with CASUAL & How to Make Your Own CASUAL – XDA Developer TV

XDA Elite Recognized Developer AdamOutler is known … more

Pearl Chen to Talk NFC Development at XDA:DevCon 2013

From HTML to LEDs or Android to Arduino, Hardware Hacking is a pastime of many people … more