[Android] Packaging tool fail to run with python3.*.

1. Change the print statement to print function.
2. Add encoding when handling the file with python.