Editing “build.prop”

Today, I was busy trying to edit build.prop. As I am dummy on Android world or even in Linux, I was sweated. My head is spinning in google search. After several search and reading and failing, I success!!! :D
Now I noted about it, just in case I need to ref these again. ( I am a man of forgetting) :D

I am using adb from android sdk and of course my phone is rooted.
Command Lines that is not successful (but for later ref, i will keep in record):
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system
busybox mv /sdcard/build.prop /system/build.prop

One thing to remember is : when you type “su” in adb you need to give (allow) permission for superuser on your phone!!!
3rd line mount system into read/write
only problem is my /sdcard or /mnt/sdcard folder is emtpy! (although I plug my sdcard in my phone which connected to PC via USB ~~ adb will not work without present of my device.)
(If you want to check whether your phone is rooted or not, use “id” in adb shell. if id = 0 , it’s root)

So! another method.
I pull build.prop from /system folder. (actually I already got that file long ago in my sdcard)
adb pull /system/build.prop
Edit file using notepad or notepad++ in my PC
go into adb shell again, su it and change permission of /system/build.prop file with this code:
chmod 777 /system/build.prop
exit from adb (type exit twice)
Push build.prop into /system folder.
adb push build.prop /system
And, it’s done! :)
reboot your device is your final step.

At first, I cannot push (replace) because of file permission.
I spent long enough to figure out how to change permission. Stupid of me!
Actually I had learnt that in school but I had forgot these immediately. :P
Permission code are as followed:

    0 = no permission
    1 = Execute Only
    2 = Write Only
    3 = Write and Execute
    4 = Read Only
    5 = Read and Execute
    6 = Read and Write
    7 = Read, Write and Execute

And one file or folder has 3 type of user group
First one is Owner
Second is group
Third is other
So 3 levels of user and 8 mode of permission.

“chmod 760 myfile” means change myfile permission to “read,write and execute” for owner, “read/write” for group user and “no permission” for other.
User sequence is not interchangeable.

That’s all. It took me about almost two and half hours. :D
Thanks god I didn’t brick my phone. :)

Also read...

Leave a Reply