Skip to content

Commit

Permalink
obfuscation for OHOS looks like working #1385
Browse files Browse the repository at this point in the history
  • Loading branch information
lingol committed Jan 2, 2025
1 parent 410e893 commit 968dc44
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
60 changes: 60 additions & 0 deletions OpenHarmony/MMKV/consumer-rules.txt
Original file line number Diff line number Diff line change
@@ -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/

2 changes: 1 addition & 1 deletion OpenHarmony/MMKV/obfuscation-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
# -keep-global-name: specifies names that you want to keep in the global scope

0 comments on commit 968dc44

Please sign in to comment.