1

If I change a .mk or a .xml file in the android source code, how do I send this updated file to the device? Do I first rebuild the source tree? Or is building not necessary? After building/not-building, do I use adb push or adb sync or do I have to reflash the device?

2
  • can you please mention the .xml file name ? Commented Jul 5, 2018 at 10:35
  • These are camera configuration files. Commented Jul 5, 2018 at 13:16

2 Answers 2

1

No you can't just push the these files as these files are merged in the img file like boot.img ,system.img etc. so you need to find out that in which img file these .xml files are added. Then you just need to make that img file like

make bootimage -j4

and flash the image to the device

In case you did't figure out then you need to rebuild the source tree.

Sign up to request clarification or add additional context in comments.

3 Comments

Would you know which img file to make in case of camera configuration files?
It would lie in $TOP/device/. For instance, if I'm a vendor called camera-company, that manufactures cameras, it could be something like $TOP/device/camera-company/setup_camera.mk or if I were implementing my own HAL, it would be $TOP/device/camera-company/hal/camerahal.xml and $TOP/device/camera-company/hal/camerahal.mk.
The command make bootimage typically only builds the image for the boot partition which contains just the kernel and ramdisk with things like init rc files. This is unlikely to actually be what the asker wants.
0

Yes building is absolutely necessary. See https://source.android.com/setup/build/building for more complete information but here are some quick notes:

If using mm or related commands you can usually follow it up with adb remount (needed just once per boot) and then: adb sync, adb shell stop, adb shell start.

If you built the entire tree via a command such as lunch aosp_xyzdevice-eng then you should probably use fastboot or other raw flashing tool provided by your SOC to flash the entire system image (and possibly boot or other images) to the device.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.