Android lcd resolution.

I got the android jb installed on beagleboard with a 7 inch cape. Unfortunately the resolution is not correct and the display is truncated. I tried to echo 1 mirror through adb shell but it does not work. I also modified the ads7846.c. None solve the problem. Anyone can give me some details regarding the procedure to modify resolution, mirror, etc.?