[Droid Eris Android Development] zach.xtr:
xtrSENSE has been built as an everyday HTC Sense ROM that is configured for performance and reliability. Version 5.x uses the March 2011 HTC/Verizon code base which is Android 2.1 made specifically for our Eris. This ROM has features such as a simple yet elegant theme to full support of cache2cache, apps2sd, built in overclocking, and built in memory management. For those that frequent the forum I keep a copy of this build in addition to xtrROM (Vanilla feel using the HTC framework) on my phone (plus a few others from other devs :D) because sometimes I just feel like the splendor of the HTC launch screen and integrated widgets. If you would like a "pure" Vanilla 2.1 AOSP experience then be sure to try VanillaASOP.

xtrSENSE Features:

Built from the March 2011 Verizon 2.41.605.6 Eris code base - Android 2.1

Stock HTC Sense with reliable performance improvements and root access superuser permissions

Overclock support – see overclock section on how to set internally!

Full

Cache2cache

support (see details below) - better use of the /data/ and /cache/ file blocks which opens up unused internal storage allowing you to install double the market apps over a stock Eris without using Apps2sd!!

Apps2sd support - see instructions below

Many reliable "hacked" tweaks such as: power management like Collin_ph battery tweak, some Flash support, new Android Market, wired tether, etc...

Smart design for a tailored user experience by including the opensource GScript app which allows you to easily turn on/off core ROM settings (CPU overclock speed, Apps2sd, Cache2sd, JIT, etc...) with one-click

Customized simple theme including wallpapers, extra keyboard, and other small touches.

Designed to be a stable everyday ROM

Access to custom themes via Metamorph

Check out the change log below to see details

Credits and General Public License (GPL):

HTC kernel source: http://member.america.htc.com/download/RomCode/Source_and_Binaries/desirec_2.6.29_8a03cb9a.tar.bz2

Zanfur OC kernel support – source: http://xdaforums.com/showthread.php?t=679102

GScripts source: http://code.google.com/p/gscript-android/source/checkout

Wired tether source: http://code.google.com/p/android-wired-tether/source/checkout

Wireless tether source: http://code.google.com/p/android-wifi-tether/source/checkout

bertoch for hosting and helping me understand Linux

dsixda for his time saving kitchen – source: http://xdaforums.com/showthread.php?t=633246

bftb0 for the HTC/Verizon March 2011 2.41.605.6 code base - source: http://xdaforums.com/showthread.php?t=984274

lotus22 for the 50% time without signal bug fix - source: http://xdaforums.com/showthread.php?p=11992494

gr0gmint on how to make jit (mostly) work with HTC ROMs – source: http://xdaforums.com/showthread.php?t=684535

ChainsDD for Superuser – source: http://xdaforums.com/showthread.php?t=682828

jonasl for the HTC_IME mod keyboard – source: http://xdaforums.com/showthread.php?t=624416

vash8806 for Flash 10 – source: http://xdaforums.com/showpost.php?p=7316925&postcount=46

synaptyc for custom boot animation - source:http://xdaforums.com/showthread.php?t=768513

rogro82 for starting GScript - source: http://xdaforums.com/showthread.php?t=486486

nfinitefx45 from the Hero CDMA forum on his companion work with cache2cache

thenestor on help with the DroidXIME keyboard

firestrife23 for helping me understand permission issues with the init.d process

Damageless and TrevE for a model on how to do apps2sd (originally based on tkirton's Darktremor A2SD work) and other boot settings

Collin_ph for the battery tweak code – source: http://xdaforums.com/showthread.php?t=737352

xda member beta testers (you ROCK)

other xda members for tips and tricks

Download xtrSENSE 5.0: http://zach.xtr.i6ix.com/xtrSENSE5.0.1.zip

MD5 checksum: 67abd6c555b726017586ad154e456041

Thanks to Canop you can flash other Kernel options from the links below:

BFS - http://xdaforums.com/showthread.php?t=772053

CFS - http://xdaforums.com/showthread.php?t=774211

Themes

Sensibility by jonathanphx1 - http://xdaforums.com/showthread.php?t=857907

OPTIONS AND CONTROLS:

Default ROM Configuration:

You do not need to run any scripts unless you would like to change the following default configuration:

dalvik.vm.heapsize: 24m

min free memory values: "balanced" (1536,2048,4096,10240,12800,38400)

CPU Overclocked: Min-245760 Max-710400

CPU Governor: Ondemand

Just In Time Compiler (JIT): Off

Cache Location: Cache2cache On

Apps2sd: Off

Userservice and battery tweak: Off

GScript

I have compiled and incorporated the opensource GScript app to load and one-click run user settings.

To setup your GScripts complete the following steps:

1. After opening GScript press the menu button and select "Add script"

2. A new window will open.

3. Press the Load file button

4. Select a script from the list (each is obviously named as to its function)

5. Ensure Needs SU? is checked

6. Now select "Save" and you have added your script

7. To run just select it from the list in the main GScript screen

8. You may be prompted to reboot the phone for the change to take effect.

This new release has

a lot of new scripts

but remember your phone has been setup great by default with this ROM and if you do not understand the function or purpose of a GScript then best to not save and run it :). One can always search this forum and ask others about all the the fun things you can now do with your phone! I will look to add a list of each GScript and its function as time allows...

Wired Tether

For wired tether to work you must make sure that your computer has the appropriate RNDIS drivers. Learn how to do this at the android-wired-tether Wiki.

Per roirraW "edor" ehT:

The wiki incorrectly states, or implies, that Windows 7 includes the RNDIS support. Or at least, they imply that Windows 7 includes the RNDIS driver necessary. I can confirm that neither Windows 7 x86 or x64 works with tethering out of the box. The instructions for XP users are correct and also work for Windows 7. Just download HTCSync for your device (Eris) and install it, and it'll install the correct driver.

Flash Support

A hacked version of Flash 10.1.123 is baked into this ROM however it has proven to be hit and miss and preforms more like a flash "lite"... Full flash sites such as Halo do not work however many others do; they may just take a while as the Eris is not a powerful phone ;)

Performance Improvements:

Free Internal Memory and Dalvik-cache heapsize

- I have update default user settings to allow a larger dalvik heapsize of 24mb (think more space for apps to play) AND optimized how memory is freed up using Androids internal task killer.

Default min memory free:”balanced” (1536, 2048, 4096, 10240, 12800, 38400)

Default dalvik vm heapsize: 24m (48m with JIT on)

To change dalvik vm heapsize or min memory free settings you can just run the appropriate GScript.

If you would like to further modify the default min memory free settings then download Autokiller or MinFreeManager, these apps will allow you to set and monitor the min memory free values. For more information on Androids “internal task killer” and min memory free values go here.

Default Overclock Settings

- the ROMs kernel supports overclocking and as part of the custom sysinit process I have added scripts that automatically set the below CPU clock settings when the phone boots:

Min: 19200

Max: 710400

I have included a few GScripts to change cpu max and min settings without using a market app ;). You can also run the report_cpu_freq script from GScript to get a printout of which frequencies and time in each you phone has been operating.

To change CPU overclock settings just run the appropriate GScript.

If you would like to further modify OC settings then download CPUBoost, SetCPU or Overclock Widget, these apps will allow you to set and monitor the CPU speed. Remember YOU CAN DAMAGE YOUR CPU IF RUN TO HOT FOR TO LONG with higher settings.

JIT

- JIT (Just In Time compiler) is a built in option for the ROM but is off by default. For a detailed overview of JIT go here. PLEASE NOTE for Android 2.1 JIT is not stable with all applications and can cause odd things on your phone.

To enable/disable JIT just run the appropriate GScript and reboot your phone.

User Services Power Management (Collin_ph Battery Tweak)

- I have built in a user services that runs at a polled interval and can set the performance settings of your phone in realtime. The first script that is available is a 2.1 HTC framework version of the Collin_ph Batter Tweak. For a detailed overview of you can view the original thread at here.

The power management battery tweak is disabled by default but there is a gscript to enable plus you can run "battconf" from terminal on the phone or adb shell to configure... The battery tweak runs a script every 60 (or less if you are on power) to poll the capacity of the battery, and as the battery goes down the cpu max freq is progressively lowered. It also changes the CPU write characteristics. You can see all the details in the /system/bin/batter_tweak file.

I take no real credit on this and just ported the concept to the HTC framework and HTC kernel (with the zanfur OC patch). This took a lot of work and I fixed a few bugs but the concept is not mine and all Collin_ph.

When you first run terminal remember to type "su" (or equivilent for your app) to run as root and select "1" then enter when first prompted after starting "battconf".

So how do I know it is working?

just run the report_log.sh GScript and you will see when it logs a change to the system settings. Also you can run the report_system_settings.sh GScript and for a display of current settings. This process will be faster if you plug into a power source and wait about 60 seconds ;)

To enable/disable the battery tweak just run the appropriate GScript (user_service_batterytweak_enable.sh or user_service_batterytweak_disable.sh).

Cache Location (Cache2cache):

By default, the dalvik-cache has been relocated from the internal /data/dalvik-cache/ directory to the internal /cache/dalvik-cache directory. The Eris comes with an internal /cache/ file block of 130mb that is not used! After reviewing a number of xda member file system usage reports (thanks xtrROM and xtrSENSE users!) the MOST reported use of this space was 5%... So by moving the dalvik-cache to this free area you now have over 150mb on internal /data/ for apps and over 75mb in internal /cache/ for dalvik-cache. This means that you can probably install close to 75 apps WITHOUT having to partition and move anything to the SD Card ext!

You can also move the dalvik-cache to your sd card ext or back to the stock internal /data/ file block.

So why does my Settings>SD card & phone storage>Internal phone storage only show 150mb or less?

This is because this number ONLY reflects the /data/ file block on your phone and does not "see" the /cache/ block that is now being used for dalvik-cache storage. You can run the GScript report_system_settings script to see amount available in /cache/.

Apps2sd and Cache2sd:

I have revamped my implementation of apps2sd to use simpler and better organized scripts. For apps2sd to work you must first complete the listed prerequisites and it is a good idea to read through the "things you may want to know about apps2sd" section. Although it can provide gobs of space for apps, Apps2sd is not for everyone as it ties the stability of your phone to your SD card... If you do not need the space I would recommend that you keep the default of DISABLED; if you want to try you can always disable it again however there is always the chance of issues.

To enable/disable apps2sd and cache2sd just run the appropriate GScript and reboot your phone.

Prerequisites

If you have not setup your SD card (for those new to Apps2sd) as per tkirton:

BACKUP YOUR SD CARD TO YOUR COMPUTER. Can't stress this enough, as partitioning will wipe the entire card.

Reboot into recovery

In Android System Recovery, select Partition sdcard

In the Partition sdcard menu, select Partition SD

Follow the instructions on the phone to partition your SD card. Most folks seem to recommend using the default values however you can go larger or smaller use values 256, 512,768,1024. You will also be asked to set a swap size; I stayed at 32mb (anticipate future ROM options to allow moving swap to sd)

Once the partition is initially created you must then convert to ext3 - In the Partition sdcard menu, select SD:ext2 to ext3. Follow the instructions on the screen.

Press the back button on the phone to go back to the main menu.

Your SD card is now ready to work with an Apps2sd supported ROM.

Things you may want to know about apps2sd

Bootloop protection is built in if your SD card is corrupted or is removed from the phone with Apps2sd enabled. Your apps will go away but your phone will boot ;).

There are 3 subsets of data associated to an app when it is installed and run on your phone.

1) /data/app/ (and /data/app-private) - actual .apk files we think of as the applications that are not system apps (i.e. installed on /system/app)

2) /data/data/ - the files produced by ALL apps (system apps and market apps) during installation that are used by the Android system to run the app

3)/data/dalvik-cache/ - app cache file and work space for ALL apps (system apps and market apps).

From root explorer (or similar) you can browse to the /data/app OR the /system/sd/app folders and you will see the same thing, both will tell you how much space you have used and have left. The way apps2sd works is by "linking" the /system/sd/app to the /data/app folder so that the Android system thinks it is accessing the /data/app it is really at /system/sd/app.

I have seen using Apps2sd cause issues with some.zip flash updates as they try to write directly to the /data/app folder which no longer "physically" exists

If you get into a bootloop issue using apps2sd boot into amon_ra recovery and try one of the follow:

1) from the Other menu option select the Fix apk uid mismatches

2) from the Wipe menu option complete a)Wipe data/factory reset b)Wipe Dalvik-cache c)Wipe SD:ext partition

Apps2sd and Cache2sd Basics

When you run the apps2sd or cache2sd script, upon reboot, it will move ALL your existing apps or cache to the sd card ext partition and ALL future apps and cache will be installed and stored on the sd card ext partition.

Running the apps2internal or cache2internal script, upon reboot, it will move ALL your existing apps or cache to the /data block of internal storage and ALL futures apps and cache will be stored in internal storage.

With HTC based ROMs it is all or nothing and you cannot move individual apps like in the CyanogenMod ROMs.

So how do I know Apps2sd is on? - You can run the GScript report_system_stats which will give you a printout of what fileblocks are used as well as a “true/false” value for Apps2sd On. You can also go to menu>Settings>Sd card and phone storage - when on space available under Available storage will go down at a VERY slow rate when new apps are installed.

TO INSTALL

YOU MUST HAVE A ROOTED PHONE

download the base xtrSENSE .zip file

complete NANDROID backup

copy the .zip file to the root of your sd card

For best results wipe data/factory reset, wipe Dalvik-cache, and wipe SD:ext partition (folks coming from previous versions may try no wipe updates but a full wipe is always "cleanest")

flash the xtrSENSE file from sd card

reboot - first boot will take a while (i.e. over 10 mins)

complete short setup and let your accounts sync

you can save and run one-click GScripts to personalize core ROM settings at any time :D

Tips:

Random FC - Lower your overclock settings or turn off JIT. Our little Eris's can only do so much and not all hardware is equal... Also remember this ROM is quite fast in stock form and higher Linpack scores DO NOT make for a better user experience ;)

Slow facebook sync? per erishasnobattery: log into your facebook account on your computer - Click Account>Application Settings>under Authorized - remove listing for HTC Sense.

Google contact sync issus? check out the following fix http://xdaforums.com/showpost.php?p=6796805&postcount=102. I think this is not uncommon coming from 2.2 Froyo ROMs as they seem to sync with Google a little differently and I do not think the folks at HTC or Google built their systems with the thought that users would be jumping back and forth between versions as much as we all do...

To turn on the DroidX or HTC_IME mod keyboard long press in any input feild - select Input Methoud option - and select the desired keyboard

To turn on vibration with keypress for the DroidX Multi-touch keyboard long hold the ?123 button in the bottom left and select Android keyboard settings>Vibrate on keypress

If you are syncing facebook then you may want to remember to check the "View contacts" for facebook from the People app Menu>View setting

Turn off notifications for Superuser from the Settings tab of the app

If you have not already done so, check out the notes and tasks widgets now available from Add HTC widget>Get more HTC widgets. Personally I find these most useful.

Known Issues:

Flash does not always "enable" as reported by users, once "enabled" works okay and you are good to go, once we have a known method to make sure it is triggered on I will post here...

verizon nfl does not work on JIT

xda dev app may have intermittent issues logging in for first time with JIT