[Gen8 General] arpruss:
I assume you're wanting to change the size of the buttons at the bottom (portrait) or right (landscape) of the screen? This is pretty easy by just editing the right /system/board_properties/virtualkeys.* file. No need to fool around with changing the framework.

I don't have everything figured out in the file, but I have enough figured out for modifying the size of the simple button bar. For instance, the first line of the virtualkeys.A43 file on my A43 is:

0x12:158:0:800:480:54:0:0:.25:1:0x12:229:0:800:480:54:.25:0:.5:1:0x12:102:0:800:480:54:.5:0:.75:1:0x12:217:0:800:480:54:.75:0:1:1

Each key is described by a set of nine decimal numbers preceded by 0x12. For instance, the back key is the first in the list

158:0:800:480:54:0:0:.25:1

The 158 is the Android key code for back (you can find some key codes in /system/usr/keylayout). You can change that to some other function if you like, but I've checked and the framework only contains images for the keys that the device comes with, so if you change the 158 to a different number, it'll work, but you'll have a blank key cap.

The next four numbers, 0:800:480:54, describe the position of the whole button bar (yes, each key has a description of the position of the whole button bar), in portrait coordinates: the button bar begins at (0,800) (zero pixels from left, 800 pixels from top), has width 480 and height 54. If you want it to be 40 pixels wide instead, just change it to 0:814:480:40, and then do the same for each of the other three keys.

The next four numbers, 0:0:.25:1 describe the position of the back button within the button bar, in decimal. Thus, the back button starts at the top left of the button bar (it's all laid out in portrait mode), hence 0:0. It ends 1/4 of the way to the right (0.25), and is full height (1).

If you just want to resize the buttons, you can do that with a simple search and replace from a root commandline, assuming you have one of the rw root systems. Here is an example of how to change my A43's buttons to height 40:

su
cd /system/board_properties
cp virtualkeys.A43 virtualkeys.A43.backup
sed -i s/:0:800:480:54:/:0:814:480:40:/g virtualkeys.A43
killall zygote

The sed line replaces every occurrence of :0:800:480:54: with :0:814:480:40: .

The killall zygote line is a fast reboot of the dalvik layer.

If you want to change to some other dimensions, you'll have to change both sets of numbers in the sed line (you can't replace :0:800:480:54: any more since you don't have those dimensions) or restore the backed up version:

cp virtualkeys.A43.backup virtualkeys.A43

(Assuming you're in the /system/board_properties directory.)

I just did the above, and I am attaching the result.

Of course, on other devices, you'll have to edit a different file, and use other dimensions. You'll also have to find the right file to edit for your device. For instance, there are four A70 files: .A70H, .A70H2, .A70S, .A70S2. The .A70H and .A70S files are identical. The .A70H2 and .A70S2 files are identical. (But you still need to change the correct one, though you can change both for good measure.) The difference between the H/S and H2/S2 versions is that the H2/S2 versions apparently have higher resolutions.

So, if you're on the H2/S2 version, with 600x1024 resolution, your sed line might be:

sed -i/:980:0:44:600:/:990:0:34:600:/g virtualkeys.A70H2

or

sed -i/:980:0:44:600:/:990:0:34:600:/g virtualkeys.A70S2

This makes buttons that are 34 pixels high instead of the default 44. I don't have an A70, so I can't test this.

I recommend doing this from an adb shell--easier to avoid typos than in an on-device shell. Moreover, you stay in the shell after the dalvik reboot, so you can keep on trying new things.

Of course, all this is at your own risk.