From 968dc442cd28df80311938fdc121c1aa42c64f6f Mon Sep 17 00:00:00 2001 From: guoling Date: Mon, 2 Dec 2024 17:32:20 +0800 Subject: [PATCH] obfuscation for OHOS looks like working #1385 --- OpenHarmony/MMKV/consumer-rules.txt | 60 ++++++++++++++++++++++++++ OpenHarmony/MMKV/obfuscation-rules.txt | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 OpenHarmony/MMKV/consumer-rules.txt diff --git a/OpenHarmony/MMKV/consumer-rules.txt b/OpenHarmony/MMKV/consumer-rules.txt new file mode 100644 index 00000000..7f036af1 --- /dev/null +++ b/OpenHarmony/MMKV/consumer-rules.txt @@ -0,0 +1,60 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-keep-global-name +MMKV +MMKVHandler +MMKVRecoverStrategic +MMKVLogLevel +NativeBuffer +getObjKeys + +-keep-property-name +*_MODE +initializeWithPath +defaultMMKV +initData +wantLogRedirect +mmkvLog +onMMKV* +wantContentChangeNotification +onContentChangedByOuterProcess +Level* +pointer +size +backedUpMMKVWithID +decodeFloat32Array +decodeFloat64Array +decodeInt16Array +decodeInt8Array +decodeUint16Array +decodeUint32Array +decodeUint64Array +decodeUint8Array +decodeUint8ClampedArray +defaultMMKV +encodeBytesPart +encodeTypedArray +importFromPreferences +mmkvWithAshmemID +rootDir + +-keep-dts +/Users/lingol/Developer/mmkv/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/ + diff --git a/OpenHarmony/MMKV/obfuscation-rules.txt b/OpenHarmony/MMKV/obfuscation-rules.txt index 985b2aeb..51021121 100644 --- a/OpenHarmony/MMKV/obfuscation-rules.txt +++ b/OpenHarmony/MMKV/obfuscation-rules.txt @@ -15,4 +15,4 @@ # Keep options: # -keep-property-name: specifies property names that you want to keep -# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file +# -keep-global-name: specifies names that you want to keep in the global scope