Question

I think this task is easier for Android emulator. We just create new images and reboot emulator. Though it takes a long cycle to boot emulator, it is safe. But I am wondering, can we just upload several .so files on device and test the HAL driver? If so, it would be great to test the driver since on emulator we do not have enough hardware to play with.

Thanks!

Was it helpful?

OTHER TIPS

Not sure if this works in all cases but definitely works for us while developing camera HAL.

Yes, you can upload so files. Device must be rooted.

  1. Use

    adb push <source on host> <destination on target> 
    

I suggest to backup original files. This way when device reboots due to your changes and does not come up you may have a chance to adb to it, replace the files with originals and bring device back to life. You can also backup the files on your host pc and push them back in case of trouble but I did not use this option.

  1. Restart the service which uses this HAL. In case of camera it is media

    adb shell stop media 
    adb shell start media
    

Regards

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top