Jump to content


Photo

Quick guide to modifying build.prop with ADB

* * * * * 2 votes

  • Please log in to reply
22 replies to this topic

#1
Len Ash

Len Ash

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,009 posts
  • Gender:Male
  • Location:Isle of Tortuga
  • Devices:SGS 2, Nexus 7, Omnia 7
build.prop is a file that contains various system-vital "parameters" that are read by the system at each boot. Some values are only read on first boot and actioned, most are read at every boot. Some can be modified with little risk, some can cause havoc.

This is specifically aimed at those that wish to "experiment" with the effects of having HW acceleration on or off, and changing the Dalvik Heap size. If anyone can objectively quantify the benefits or otherwise of doing either or both of these, let everyone know...

Usual caveats regarding "Try this at your own risk" and "make a Nandroid backup first" if you are not used to file manipulation and so on...

What we are going to do:

- Connect PC and Phone via USB
- Use ADB to copy the Phone's current build.prop text file to the PC
- Modify the build.prop file on the PC
- Use ADB to overwrite the Phone's build.prop file with the one you have modified
- Reboot the Phone using ADB

Firstly, you need to ensure that your PC (I'm limiting this to Windows for now) can communicate with your Blade via USB. If you can access the SD card via Windows Explorer/File Manager, you should be OK. If not, download the ZTE USB drivers found elsewhere in the forum - http://tinyurl.com/33fhyvp

For the purposes of this, you do not want to mount the SD card, so when you plug the phone in to the PC, select "Don't mount".

Plug the phone in to your PC.

On your phone, go to Setttings>Applications>Development and turn USB debugging ON. See pic below.

Download the 3 ADB files you need if you haven't already got them (they are part of the Clockwork zip). Attached below in a zip file if not.

Extract the 3 files to the root of your Windows drive (C:\ in all probability).

Go to "Run" or "Command Prompt" (depending on which Windows version you are using) and type cmd, return.

If you don't see just "C:\" simply hit "CD.." and return repeatedly until you do.

Then type "ADB devices" and return... Ignore quotes for all ADB commands!

You should see the Daemon notices followed by "P729B device" or similar. If you don't see this, Windows is not communicating with the phone. Or you may be running Win 7 64bit...!

Assuming successful, do this:

"ADB pull /system/build.prop c:\"

This will copy build.prop to your PC drive root.

Now open the build.prop file in C:\ on your PC using Notepad or similar. You will need to use Wordwrap to view the file correctly (Format from the Menu bar)

You should see something like this (cut down):

ro.product.locale.language=en
ro.product.locale.region=GB
ro.wifi.channels=
ro.board.platform=msm7k
# ro.build.product is obsolete; use ro.product.device
ro.build.product=P729B
# Do not try to parse ro.build.description or .fingerprint
#ro.build.description=blade-user 2.1-update1 ERE27 201005 release-keys
ro.build.description=passion-user 2.1-update1 ERE27 24178 release-keys
#ro.build.fingerprint=ZTE/P729B/P729B/blade:2.1-update1/ERE27/201005:user/release-keys
ro.build.fingerprint=google/passion/passion/mahimahi:2.1-update1/ERE27/24178:user/release-keys
usb.default.pid=0x1354
# end build properties
#
# system.prop for surf
#
##########################################
#History:
#when who what, where, why
#-------- ---- ---------------------------------------------------
#2010-01-27 zhangxian new file for moonckae bord config
#2010-03-03 luwenjun modify the version number
#2010-04-01 zhaobin need setupwizard when first boot
#2010-05-25 tangjuan set the default ringtone
#2010-06-05 zhangping add default value of the timezone is Europe/London(London, Dublin)
#...
##########################################
ro.setupwizard.mode=DISABLED
ro.build.baseband_version=P729BB01
ro.build.software_version=P729BV1.0.0B01
ro.build.sw_internal_version=OUK_P729BV1.0.0B09
ro.product.board_name=blade
rild.libpath=/system/lib/libril-qc-1.so
rild.libargs=-d /dev/smd0
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
DEVICE_PROVISIONED=1
debug.sf.hw=0
dalvik.vm.heapsize=32m

ro.sf.lcd_density=240
ro.config.ringtone=FluteyPhone.ogg
ro.config.notification_sound=Tinkerbell.ogg
wifi.supplicant_scan_interval=45
wlan.default.dns1=8.8.4.4
persist.sys.timezone=Europe/London

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.com.google.gmsversion=2.1_r6
ro.sf.lcd_density=240

The lines you might wish to modify are shown in red text. To modify the hw acceleration, change debug.sf.hw= to 0 for off and 1 for on. To modify the VM heap max size, change dalvik.vm.heapsize= to anything from 12m to 48m - the standard is 24m and most folk BELIEVE that 32m is optimal....

Once you have modded these, SAVE the text file as normal, simply select "Save" from Notepad's menu. Quit Notepad.

Then, do the following

"ADB remount"

"ADB push c:\build.prop /system/"

Once done do this

"ADB reboot" or "ADB shell reboot" depending which version of ADB you have...

And that's it.

Attached Files


Edited by LanceH, 21 January 2011 - 08:32 PM.

  • 1

#2
David Horvath

David Horvath

    Diehard

  • Members
  • PipPipPipPip
  • 345 posts
  • Location:Debrecen, Hungary
  • Devices:SF
"Windows drive" - What if i use Mac OS X or Ubuntu?

I would welcome universal tutorials.

  • 0

Ubuntu Lucid Lynx + Android Eclair on SF == freedom

#3
Len Ash

Len Ash

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,009 posts
  • Gender:Male
  • Location:Isle of Tortuga
  • Devices:SGS 2, Nexus 7, Omnia 7

"Windows drive" - What if i use Mac OS X or Ubuntu?

I would welcome universal tutorials.


I could do Linux, but not Mac... given time!

I may also expand on some of the other parameters in build.prop that can be added, removed, changed to allow folk to further customise if requested... as well as how to make and "install" additional ringtones, add and remove apps via ADB and so on...

Most Custom ROM build.prop files are are bit messy and need tidying anyway - lol

Edited by LanceH, 09 January 2011 - 12:08 PM.

  • 0

#4
frequence

frequence

    Newbie

  • Members
  • Pip
  • 25 posts
  • Location:DE
  • Devices:ZTE San Francisco
Thank you for this thread.

  • 0

#5
Len Ash

Len Ash

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,009 posts
  • Gender:Male
  • Location:Isle of Tortuga
  • Devices:SGS 2, Nexus 7, Omnia 7
If you want to shrink the icon/widget sizes somewhat for an HD effect(!), you can modify this line:

ro.sf.lcd_density=240 change to 200 or 220. Note that a) some apps may render oddly (though I've never seen it myself) and b ) there may be more than one entry in the build.prop file- which is actually a Dev error - just change both (to the same value).

Edited by LanceH, 09 January 2011 - 03:08 PM.

  • 0

#6
M1kz

M1kz

    Newbie

  • Members
  • Pip
  • 42 posts
  • Devices:ZTE BLADE
  • Twitter:@-
>Once done do this
>
>"ADB reboot"
There isn't reboot option in attached adb?

  • 0

#7
leetron1

leetron1

    Diehard

  • Members
  • PipPipPipPip
  • 352 posts
  • Gender:Male
  • Location:Cumbria
  • Devices:Ascend Y300 (Orange Blade)
Forget all that command prompt malarkey, download Android Commander and install...just pull build.prop onto desktop, open with wordpad or similar, just edit the text eg.

debug.sf.hw=0
dalvik.vm.heapsize=32m

then drag n drop edited build.prop back into Android Commander....done!!

Can even reboot from within the program, no command typing or even having to mount SD card...fantastic piece of kit if you own an android handset>>

Edited by leetron1, 21 January 2011 - 09:48 AM.

  • 0

#8
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp

Forget all that command prompt malarkey, download Android Commander and install...just pull build.prop onto desktop, open with wordpad or similar, just edit the text eg.

debug.sf.hw=0
dalvik.vm.heapsize=32m

then drag n drop edited build.prop back into Android Commander....done!!

Can even reboot from within the program, no command typing or even having to mount SD card...fantastic piece of kit if you own an android handset>>

thanks for the info but it's a windows app

in linux just replace each adb command by ./adb
the first command need sudo ./adb to wake up the deamon

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#9
lixcab

lixcab

    Enthusiast

  • MoDaCo Silver
  • PipPipPip
  • 287 posts
  • Devices:ZTE Blade
Root Explorer works too (paid app) and you can do the editing straight from your phone.

I think Astro File Manager does the same and free?

Edit then Restart OSF and you're done. :lol:

  • 0

#10
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp

Root Explorer works too (paid app) and you can do the editing straight from your phone.

I think Astro File Manager does the same and free?

Edit then Restart OSF and you're done. :lol:

I use root explorer great app :)
astro manager can do the job too

but it's far more easy to edit the file in pc :)

Edited by Phoenix Silver, 21 January 2011 - 10:15 AM.

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#11
feckineejit

feckineejit

    Addict

  • Members
  • PipPipPipPipPip
  • 578 posts
  • Gender:Male
  • Location:Derry/Ireland
  • Devices:ZTE BLADE, Huawei G300

Forget all that command prompt malarkey, download Android Commander and install...just pull build.prop onto desktop, open with wordpad or similar, just edit the text eg.

Can't find Android Commander on the market or appbrain, i'm on jjrls7 2.2

  • 0
Posted Image

#12
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp

Can't find Android Commander on the market or appbrain, i'm on jjrls7 2.2

not found in androlib too

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#13
cbrpaul

cbrpaul

    Regular

  • Members
  • PipPip
  • 108 posts
  • Location:Bristol
  • Interests:Motorcycles
  • Devices:ZTE Blade
thx LanceH all good to know stuff , i use adb alot,


Tell me do you or anyone else know how to modify the blades id/type of phone the data that tells the network what phone it is,

Reason i ask , if the network , in this case o2 dont have the phones id/type on their system then they send smaller mms data at 25kb thumbnail sizes


Other android phones have been successfully done/modified by changing the phones id.type to say a Nokia 95, it seems the blade has not as yet !!!


ps i have tried the Mms.apk with adb , even withthis new file i stil get small mms


thx

  • 0
Posted Image

#14
leetron1

leetron1

    Diehard

  • Members
  • PipPipPipPip
  • 352 posts
  • Gender:Male
  • Location:Cumbria
  • Devices:Ascend Y300 (Orange Blade)

Can't find Android Commander on the market or appbrain, i'm on jjrls7 2.2


I think your name suits you!!!!! Click my link ie Android Commander!!!

Why would it be in market, its a windows exe....

BTW have not managed to alter build.prop with my Astro..doesn't let me save changes + much easier on a PC..

Edited by leetron1, 21 January 2011 - 04:38 PM.

  • 0

#15
Len Ash

Len Ash

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,009 posts
  • Gender:Male
  • Location:Isle of Tortuga
  • Devices:SGS 2, Nexus 7, Omnia 7

I think your name suits you!!!!! Click my link ie Android Commander!!!

Why would it be in market, its a windows exe....

BTW have not managed to alter build.prop with my Astro..doesn't let me save changes + much easier on a PC..


Suggest folk learn to use ADB - it's a bit of a standard and will allow you to try things for yourself.

It's not hard, and it's free.

  • 0

#16
leetron1

leetron1

    Diehard

  • Members
  • PipPipPipPip
  • 352 posts
  • Gender:Male
  • Location:Cumbria
  • Devices:Ascend Y300 (Orange Blade)

Suggest folk learn to use ADB - it's a bit of a standard and will allow you to try things for yourself.

It's not hard, and it's free.


Why bother when AC takes all the heart ache out of it...do you think v many folk are going to sit down to learn a list of commands..command prompt is just a relic of a pre-windows age...

This just makes life simpler & quicker..so many new people are trying to learn the basics of modding android..its a wonderful thing to my mind so why not take out the spade work?

  • 0

#17
Len Ash

Len Ash

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,009 posts
  • Gender:Male
  • Location:Isle of Tortuga
  • Devices:SGS 2, Nexus 7, Omnia 7

Why bother when AC takes all the heart ache out of it...do you think v many folk are going to sit down to learn a list of commands..command prompt is just a relic of a pre-windows age...

This just makes life simpler & quicker..so many new people are trying to learn the basics of modding android..its a wonderful thing to my mind so why not take out the spade work?


For people without the entire installed SDK instead of 3 smallish files, what's the point? Most only need to "learn" a couple of simple command lines to achieve 90% of what they need.

Anyway, each to their own... :lol:

  • 1

#18
ali40

ali40

    Newbie

  • Members
  • Pip
  • 11 posts
  • Devices:Orange SF

For people without the entire installed SDK instead of 3 smallish files, what's the point? Most only need to "learn" a couple of simple command lines to achieve 90% of what they need.

Anyway, each to their own... :lol:



Had backed away from ADB in the past due to issues I was having with Win 7 64-bit (and having to download full SDK etc).

However, I found an old XP machine so installed the 3 files int he zip, connected Phone to PC, set phone to USB debug mode (and don't mount drive) but ADB cannot connect (adb devices lists nothing). I can see the phone mounted as a drive on PC if I click mount so the USB drivers etc are ok.

Does phone need a custom rom or busybox client to use ADB? I am running std san francisco image & have rooted phone.

Thanks.

  • 0

#19
Len Ash

Len Ash

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,009 posts
  • Gender:Male
  • Location:Isle of Tortuga
  • Devices:SGS 2, Nexus 7, Omnia 7

Had backed away from ADB in the past due to issues I was having with Win 7 64-bit (and having to download full SDK etc).

However, I found an old XP machine so installed the 3 files int he zip, connected Phone to PC, set phone to USB debug mode (and don't mount drive) but ADB cannot connect (adb devices lists nothing). I can see the phone mounted as a drive on PC if I click mount so the USB drivers etc are ok.

Does phone need a custom rom or busybox client to use ADB? I am running std san francisco image & have rooted phone.

Thanks.


No, should work with pretty well everything!

  • 0

#20
rocky127

rocky127

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:zte blade
[quote name='Len Ash' timestamp='1294572437' post='1552349']
build.prop is a file that contains various system-vital "parameters" that are read by the system at each boot. Some values are only read on first boot and actioned, most are read at every boot. Some can be modified with little risk, some can cause havoc.

This is specifically aimed at those that wish to "experiment" with the effects of having HW acceleration on or off, and changing the Dalvik Heap size. If anyone can objectively quantify the benefits or otherwise of doing either or both of these, let everyone know...

Usual caveats regarding "Try this at your own risk" and "make a Nandroid backup first" if you are not used to file manipulation and so on...

What we are going to do:

- Connect PC and Phone via USB
- Use ADB to copy the Phone's current build.prop text file to the PC
- Modify the build.prop file on the PC
- Use ADB to overwrite the Phone's build.prop file with the one you have modified
- Reboot the Phone using ADB

Firstly, you need to ensure that your PC (I'm limiting this to Windows for now) can communicate with your Blade via USB. If you can access the SD card via Windows Explorer/File Manager, you should be OK. If not, download the ZTE USB drivers found elsewhere in the forum - http://tinyurl.com/33fhyvp

For the purposes of this, you do not want to mount the SD card, so when you plug the phone in to the PC, select "Don't mount".

Plug the phone in to your PC.

On your phone, go to Setttings>Applications>Development and turn USB debugging ON. See pic below.

Download the 3 ADB files you need if you haven't already got them (they are part of the Clockwork zip). Attached below in a zip file if not.

Extract the 3 files to the root of your Windows drive (C:\ in all probability).

Go to "Run" or "Command Prompt" (depending on which Windows version you are using) and type cmd, return.

If you don't see just "C:\" simply hit "CD.." and return repeatedly until you do.

Then type "ADB devices" and return... Ignore quotes for all ADB commands!

You should see the Daemon notices followed by "P729B device" or similar. If you don't see this, Windows is not communicating with the phone. Or you may be running Win 7 64bit...!

Assuming successful, do this:

"ADB pull /system/build.prop c:\"

This will copy build.prop to your PC drive root.

Now open the build.prop file in C:\ on your PC using Notepad or similar. You will need to use Wordwrap to view the file correctly (Format from the Menu bar)

You should see something like this (cut down):

ro.product.locale.language=en
ro.product.locale.region=GB
ro.wifi.channels=
ro.board.platform=msm7k
# ro.build.product is obsolete; use ro.product.device
ro.build.product=P729B
# Do not try to parse ro.build.description or .fingerprint
#ro.build.description=blade-user 2.1-update1 ERE27 201005 release-keys
ro.build.description=passion-user 2.1-update1 ERE27 24178 release-keys
#ro.build.fingerprint=ZTE/P729B/P729B/blade:2.1-update1/ERE27/201005:user/release-keys
ro.build.fingerprint=google/passion/passion/mahimahi:2.1-update1/ERE27/24178:user/release-keys
usb.default.pid=0x1354
# end build properties
#
# system.prop for surf
#
##########################################
#History:
#when who what, where, why
#-------- ---- ---------------------------------------------------
#2010-01-27 zhangxian new file for moonckae bord config
#2010-03-03 luwenjun modify the version number
#2010-04-01 zhaobin need setupwizard when first boot
#2010-05-25 tangjuan set the default ringtone
#2010-06-05 zhangping add default value of the timezone is Europe/London(London, Dublin)
#...
##########################################
ro.setupwizard.mode=DISABLED
ro.build.baseband_version=P729BB01
ro.build.software_version=P729BV1.0.0B01
ro.build.sw_internal_version=OUK_P729BV1.0.0B09
ro.product.board_name=blade
rild.libpath=/system/lib/libril-qc-1.so
rild.libargs=-d /dev/smd0
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
DEVICE_PROVISIONED=1
debug.sf.hw=0
dalvik.vm.heapsize=32m

ro.sf.lcd_density=240
ro.config.ringtone=FluteyPhone.ogg
ro.config.notification_sound=Tinkerbell.ogg
wifi.supplicant_scan_interval=45
wlan.default.dns1=8.8.4.4
persist.sys.timezone=Europe/London

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.com.google.gmsversion=2.1_r6
ro.sf.lcd_density=240

The lines you might wish to modify are shown in red text. To modify the hw acceleration, change debug.sf.hw= to 0 for off and 1 for on. To modify the VM heap max size, change dalvik.vm.heapsize= to anything from 12m to 48m - the standard is 24m and most folk BELIEVE that 32m is optimal....

Once you have modded these, SAVE the text file as normal, simply select "Save" from Notepad's menu. Quit Notepad.

Then, do the following

"ADB remount"

"ADB push c:\build.prop /system/"

Once done do this

"ADB reboot" or "ADB shell reboot" depending which version of ADB you have...

And that's it.


hey....when i m trying to adb remount via cmd......it is saying dat permissions denied....wht to do?

Edited by rocky127, 12 December 2011 - 09:21 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users