I'm working on adding files to an apk file using the aapt tool. So far, i'm able to add files to apk using the following command on CMD from java class:
aapt add -v apk_file_name "dir structure of files to be added"
I want to add files to the assets folder in apk. However, i can add files this way only if they are present in the assets folder inside the tool directory(e.g., D:/AAPT/assets/files). Otherwise it will create the dir structure of the file path i give(e.g, if i give D:/newfolder/test.xml....it will create newfolder/test.xml inside apk which i don't want).
I want to add files from any location on the system to the assets folder in apk. By this i mean that the command i'm using so far is:
aapt add -v example.apk "assets/test.xml"
It will create a dir structure assets/test.xml inside apk
Now, i want something like: aapt add -v example.apk "assets/test.xml" "absolute path of the test.xml on system" it takes the file from the system and creates a dir structure assets/test.xml
So that i don't need to copy the files inside the tools directory everytime thus allowing more flexibility for giving file path.
Does anyone know how to write the command for such a case?
I came to know of -A -S options, but i don't know the right way to use them. Did some hit and trial but not able to add files properly.
PS- running the CMD command from my java class