// 043001RC00 class Log { static TAG = '[SMS]' static Debug = true static format(...msg) { let m = [] for (let i = 0; i < msg.length; i++) { if (typeof msg[i] === 'object') { m.push(JSON.stringify(msg[i])) } else { m.push(msg[i]) } } m = m.join(' ') return m } static i(...msg) { if (!this.Debug) return console.log(`\x1b[30m${this.TAG} ${this.format(...msg)}\x1b[0m`) } static w(...msg) { console.log(`\x1b[33m${this.TAG} ${this.format(...msg)}\x1b[0m`) } static e(...msg) { console.log(`\x1b[31m${this.TAG} ${this.format(...msg)}\x1b[0m`) } static s(...msg) { console.log(`\x1b[32m${this.TAG} ${this.format(...msg)}\x1b[0m`) } } function trace(tag) { Log.e((tag || '') + Java.use('android.util.Log').getStackTraceString(Java.use('java.lang.Throwable').$new())) } setImmediate(() => { Java.perform(function () { const contentResolver = Java.use('android.content.ContentResolver') contentResolver.update.overload( 'android.net.Uri', 'android.content.ContentValues', 'java.lang.String', '[Ljava.lang.String;' ).implementation = function (uri, values, selection, selectionArgs) { Log.s( `contentResolver.update(uri=${uri}, values=${values}, selection=${selection}, selectionArgs=${selectionArgs})` ) const res = this.update(uri, values, selection, selectionArgs) Log.s(res) return res } }) }, 0)