I already know how to modify an android ROM by modifying files, remove and add it into ROM. But I don't have knowledge to building/compiling a ROM.
I want to lock the OS so none can ever install new app to it. Well at least for they that not have a knowledge to flash the ROM with other OS.
Is there a way to prevent user from install any application to the ROM?
like removing the market app or the package installer, pros n cons?
Your idea of removing the store and package installer should work.
To do so, delete the following apks (and any .odex files of the same name) from /system/app, either in your ROM image or after obtaining root.
With those gone (and the phone unrooted), it should be impossible to install anything.
Note : I have not tested this. Making a backup before doing this would be advisable.
I think the easier way would be with a modded stock ROM. Starting with a full stock ROM, I would do the following:
/datato read only. You can do this with a init.d script that remounts the folder:
mount -o remount,ro /data
The only problem is that the user wouldn't be able to save no data. Another aproach might be to change the permisions of
/data/app folders (app-private and so) to 644 (755 for directories) and change ownership to root. That way the user won't be able to write to the apps folder, but it would be able to save information in the
/data folder (and subfolders).
If you don't need any google apps, you can use CyanogenMod or other Custom ROM that doesn't have anything from Google apps installed.