| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- function trace(tag) {
- Log.e((tag || '') + Java.use('android.util.Log').getStackTraceString(Java.use('java.lang.Throwable').$new()))
- }
- class Log {
- static TAG = '[GMS]'
- static Debug = false
- static format(...msg) {
- let m = []
- for (let i = 0; i < msg.length; i++) {
- if (typeof msg[i] === 'object') {
- m.push(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`)
- }
- }
- Java.perform(function () {
- setImmediate(() => {
- const bvqg = Java.use('bvqg')
- bvqg.h.overload('int').implementation = function (i) {
- const res = this.h(3)
- Log.i('bvqg.h(3) =', res)
- return res
- }
- })
- })
|