frida-java-bridge icon indicating copy to clipboard operation
frida-java-bridge copied to clipboard

Error: can't decode byte 0xc0 in position 18

Open Dev-Bobbie opened this issue 5 years ago • 4 comments

var toString = StringBuilder.toString;
  toString.implementation = function () {
    var result = toString.call(this);
    console.log('StringBuilder.toString(); => ' + result);
    return result;
  };

when i use frida hook toString, Error: can't decode byte 0xc0 in position 18,guess ◈ ❂ in string,how to fix?

Dev-Bobbie avatar Apr 05 '20 13:04 Dev-Bobbie

A test-case in frida-java-bridge would be amazing.

But before that I'd recommend doing some exploratory testing by setting up a local playground like this.

oleavr avatar Apr 06 '20 03:04 oleavr

I have the same issue. Guess the UTF-16 to UTF-8 conversion is not working here. Here is a backtrace with line numbers using Frida Server 12.8.20 on Android arm64.

Error: can't decode byte 0xc0 in position 19
    at frida/runtime/core.js:144
    at frida/node_modules/frida-java-bridge/lib/env.js:588
    at frida/node_modules/frida-java-bridge/lib/types.js:243
    at frida/node_modules/frida-java-bridge/lib/class-factory.js:1556
    at /myscript.js:270
    at we (frida/node_modules/frida-java-bridge/lib/class-factory.js:1626)
    at frida/node_modules/frida-java-bridge/lib/class-factory.js:1581

Alexeyan avatar Apr 24 '20 11:04 Alexeyan

I have the same issue. Guess the UTF-16 to UTF-8 conversion is not working here. Here is a backtrace with line numbers using Frida Server 12.8.20 on Android arm64.

Error: can't decode byte 0xc0 in position 19
    at frida/runtime/core.js:144
    at frida/node_modules/frida-java-bridge/lib/env.js:588
    at frida/node_modules/frida-java-bridge/lib/types.js:243
    at frida/node_modules/frida-java-bridge/lib/class-factory.js:1556
    at /myscript.js:270
    at we (frida/node_modules/frida-java-bridge/lib/class-factory.js:1626)
    at frida/node_modules/frida-java-bridge/lib/class-factory.js:1581

Have you solved?

Ash-hs avatar May 05 '20 07:05 Ash-hs

Is this issue resolved as I am also facing a similar issue as Error: can't decode byte 0xcd in position 0?

vivekgoel5 avatar Mar 30 '21 17:03 vivekgoel5