From ddb86c8a760196ae65b1e2892541ba851f21f4b1 Mon Sep 17 00:00:00 2001 From: Ali Akbar Mohammadi Date: Sun, 28 Jul 2019 13:09:41 +0800 Subject: [PATCH] add the assets folder to the apk add the assets folder to the apk if the folder exists --- tools/android-create-apk.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/android-create-apk.py b/tools/android-create-apk.py index 6e640560..4ca07bac 100644 --- a/tools/android-create-apk.py +++ b/tools/android-create-apk.py @@ -169,6 +169,10 @@ '-F', args.path + args.name + '-unaligned.apk', 'bin' ] +# add the assets folder to the apk if the folder exists +if os.path.exists(args.path + 'assets') : + cmd.insert(6, '-A') + cmd.insert(7, 'assets') subprocess.call(cmd, cwd=apk_dir) cmd = [ AAPT, 'add', '-v', @@ -222,4 +226,4 @@ subprocess.call(cmd, cwd=apk_dir) # copy APK to the fips-deploy directory -shutil.copy(args.path+args.name+'.apk', args.deploy+args.name+'.apk') \ No newline at end of file +shutil.copy(args.path+args.name+'.apk', args.deploy+args.name+'.apk')