[Galaxy S 4 i9505 Android Development] petrus764:
http://xdaforums.com/showthread.php?t=2791635

This mod will switch menu with recent and force 3 dot menu in all apps. But it wont enable long press to menu, haven't found out how to do that yet.

I haven't tried the zip for lollipop as I'm not sure if Dan has made any changes to framework-res in his ROM, so I'm gonna decompile the one from his ROM and do the changes manually instead. If anyone flashes the zip, please backup framework-res first, and report back.

EDIT: Saw people in the thread reporting that one should NOT flash the stock modded 5.0 framework-res to dans rom. Mod it yourselves!

EDIT2: Doing it manually just results in neverending boot here, not sure why that is. For now I'm back at square one.

EDIT 3: Tried again, and now it's working great. I now have 3 dot menu in chrome stable (chrome beta has this) and I have a menu button at the top right in titanium backup. The physical menu button only works as a recents menu though, so the only thing missing is long press menu to bring up menu.

Modding the framework-res.apk was really easy, just download http://xdaforums.com/showthread.php?t=2326604 and exctract the zip. Now use root explorer or something and get your framework-res.apk file from your phone (its in system/framework), save it on your computer (make a backup!!!!). Put it in the Files folder inside the AndroidMultitool folder and run the app.

First go to decompile and choose the framework-res file inside Files folder and click decompile. It'll take a minute. Then go inside the Decompiled_apk folder and edit the changes noted in http://xdaforums.com/showthread.php?t=2791635 I used notepad ++ to edit, but you can use wordpad etc. Make sure to save the changes!

Now it's time to recompile, just open AndroidMultitool again, go to compiling and select the framework-res folder inside Decompiled_apk. Now here the app never gave me any indications that the recompiling was complete, so I just waited 3 minutes for good measure and quit the app even with the animated indicator running.

Once that's done, put the new framework-res.apk back on your phone, I put it back in my download folder.

Now reboot to recovery (I use the latest twrp). First select mount and enable system mount. Go back to main menu and choose advanced - file manager. Navigate to sdcard/downloads, select the new frameworks file and choose copy file. Then navigate back to /system/framework and copy the file there (the framework folder will appear almost empty when copying files as you only see folders). Once the file has been copied, youll be back in the downloads folder. Once again navigate to system/framework and select the new framework-res.apk, choose chmod and set it to 0644. DONE, now reboot and everything should be good to go.

I had been messing around with my build.prop earlier so I had to set qemu.hw.mainkeys=0 in that aswell for this to work. If it's not working for you too, try to add that line at the bottom of your build.prop file if the line isn't in the file already.

I won't be sharing my framework-res file, as I'm not sure if I did everything right and don't want to be responsible for everyone having to reflash at some point. I did use just under an hour to learn how to do this and do it, so with a small tutorial like this, it should be REALLY EASY to do this yourselves, and if it works for everyone I'm sure someone will share their framework-res at some point.

Once Dan's updated his ROM, in case of changes in framework-res I would do this again on the new build instead of using an old framework-res from this build. Once you know how, it takes 10 minutes, tops.