Skip to content

Commit

Permalink
Force output encodings to UTF-8 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpan committed Oct 16, 2024
1 parent 87a4d83 commit 13381a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: demo.apk
name: demoapk
path: demo_apk/app/build/outputs/apk/debug/app-debug.apk
test:
name: Test JNI extraction
Expand All @@ -34,11 +34,12 @@ jobs:
- name: Download APK from build
uses: actions/download-artifact@v4
with:
pattern: demo.apk
name: demoapk
path: demo.apk
- name: preinstall
run: pip3 install -r requirements.txt
- name: test
run: ./extract_jni.py jni_helper/demo.apk
run: ./extract_jni.py demo.apk

release:
name: release APK
Expand All @@ -49,7 +50,8 @@ jobs:
- name: Download APK from build
uses: actions/download-artifact@v4
with:
pattern: demo.apk
name: demoapk
path: demo.apk
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -65,6 +67,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: demoapk/app-debug.apk
asset_name: DemoJNI-debug.apk
asset_path: demo.apk
asset_name: demo.apk
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion extract_jni.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def parse_apk(apkfile, workers, fn_match=None, outfile=None):
if not outfile:
console.print_json(data=output)
else:
with open(outfile, "w") as f:
with open(outfile, "w", encoding="utf-8") as f:
json.dump(output, f, indent=2, ensure_ascii=False)


Expand Down

0 comments on commit 13381a5

Please sign in to comment.