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?
-
can you please mention the .xml file name ?Mushahid Gillani– Mushahid Gillani2018-07-05 10:35:37 +00:00Commented Jul 5, 2018 at 10:35
-
These are camera configuration files.fraiser– fraiser2018-07-05 13:16:51 +00:00Commented Jul 5, 2018 at 13:16
2 Answers
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.
3 Comments
$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.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.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.