Hardware and software Environment

  • Android 7.1.2
  • adb

What does build.prop do

On Android, build.prop is a file similar to the Windows registry. This file defines the initial parameter properties of the system. You can modify or add related parameters to adjust system configuration attributes.

How is build.prop generated

The process of generating a build.prop file is to collect system configuration properties and merge them into the build.prop file

  • performbuild/tools/buildinfo.sh
  • willsystem.propAdd the content to$(OUT_TARGET_DEVICE)/system/build.prop
  • willADDITIONAL_BUILD_PROPERTIESThe value of$(OUT_TARGET_DEVICE)/system/build.prop
  • In the implementationmakeLater,build.propWill regenerate, so you can’t just modify$(OUT_TARGET_DEVICE)/system/build.prop, need to find the source tree in the specific configuration position for modification, this is not the same as each manufacturer’s approach

Example build.prop file

cat /system/build.prop # begin build properties # autogenerated by buildinfo.sh ro.build.id=N2G48H Ro.build.display. id=zx2800_general-userdebug 7.1.2n2g48h eng.root.20201229.113133 dev-keys Ro. Build. Version. The incremental = eng. Root. 20201229.113133 ro. Build. Version. The SDK = 25 ro. Build. Version. Preview_sdk = 0 Ro. Build. Version. The codename = REL ro. Build. Version. All_codenames = REL ro. Build. Version. Release = 7.1.2 ro.build.version.security_patch=2017-10-05 ro.build.version.base_os= ro.build.date=Tue Dec 29 11:31:33 CST 2020 ro.build.date.utc=1609212693 ro.build.type=userdebug ro.build.user=root ro.build.host=server96 ro.build.tags=dev-keys ro.build.flavor=zx2800_general-userdebug ro.product.model=zx2100 ro.product.brand=Android ro.product.name=zx2800_general  ro.product.device=zx2800_general ro.product.board=zx2100 # ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete, # use ro.product.cpu.abilist instead. ro.product.cpu.abi=armeabi-v7a ro.product.cpu.abi2=armeabi ro.product.cpu.abilist=armeabi-v7a,armeabi ro.product.cpu.abilist32=armeabi-v7a,armeabi ro.product.cpu.abilist64= ro.product.manufacturer=ZHAOXIN ro.product.locale=zh-Hans-CN ro.wifi.channels= ro.board.platform=zx2100 # ro.build.product is obsolete; use ro.product.device ro.build.product=zx2800_general # Do not try to parse description, fingerprint, Or thumbprint ro.build.description=zx2800_general-userdebug 7.1.2n2g48h eng.root.20201229.113133 dev-keys Ro. Build. Fingerprint = Android/zx2800_general/zx2800_general: 7.1.2 / N2G48H/root12291131: userdebug/dev - keys ro.build.characteristics=tablet # end build properties S3G_MODE_HDMI=1920x1080@5000@0@2 S3G_MODE_DVI=1920x1080@5000@0@0 S3G_MODE_DP=3840x2160@3000@0@0 SCREEN_SIZE_PRIMARY=1920x1080 SCREEN_SIZE_EXTERNAL=1920x1080 DIU_COMPRESS=1 GRALLOC_COMPRESS=1 LOSSY_COMPRESS=0 hwc.hotplug_mode=0 # # ADDITIONAL_BUILD_PROPERTIES # keyguard.no_require_sim=true ro.com.android.dataroaming=true ro.config.ringtone=Ring_Synth_04.ogg ro.config.notification_sound=pixiedust.ogg ro.carrier=unknown ro.config.alarm_alert=Alarm_Classic.ogg ro.telephony.default_network=12 telephony.lteOnCdmaDevice=1 wifi.interface=wlan0 qemu.hw.mainkeys=0 ro.sf.lcd_density=240 ro.opengles.version=196609 persist.sys.timezone=Asia/Shanghai ro.logd.size=4M ro.zygote.disable_gl_preload=true ro.gfx.driver.0=zxgfx ro.lockscreen.disable.default=true dalvik.vm.heapstartsize=16m dalvik.vm.heapgrowthlimit=192m dalvik.vm.heapsize=512m . Dalvik vm. Heaptargetutilization = 0.75 dalvik. Vm.. Heapminfree = 512 k dalvik vm. Heapmaxfree = 8 m ro hwui. Texture_cache_size = 72 ro.hwui.layer_cache_size=48 ro.hwui.r_buffer_cache_size=8 ro.hwui.path_cache_size=32 ro.hwui.gradient_cache_size=1 Ro. Hwui. Drop_shadow_cache_size = 6 ro. Hwui. Texture_cache_flushrate = 0.4 ro. Hwui. Text_small_cache_width = 1024 ro.hwui.text_small_cache_height=1024 ro.hwui.text_large_cache_width=2048 ro.hwui.text_large_cache_height=1024 s3g.hwc.enable_hdr=1 ysum.enable=1 persist.demo.hdmirotates=true p2p.interface=p2p0 persist.sys.dalvik.vm.lib.2=libart.so dalvik.vm.isa.arm.variant=cortex-a7 dalvik.vm.isa.arm.features=default dalvik.vm.lockprof.threshold=500 net.bt.name=Android dalvik.vm.stack-trace-file=/data/anr/traces.txt ro.expect.recovery_id=0x189f055d095559bce7e46e38548c458922df5677000000000000000000000000Copy the code

How do I modify build.prop

Start root mode

Adb connect $Device IP address adb rootCopy the code

Mount the file system again

adb remount
Copy the code

Push the locally modified build.prop file to the Android system

adb push build.prop /system/build.prop
Copy the code

It takes effect after the system is restarted.