Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frida 12.5.2 GOT JAVA ERROR #877

Open
intcua opened this issue May 11, 2019 · 37 comments
Open

Frida 12.5.2 GOT JAVA ERROR #877

intcua opened this issue May 11, 2019 · 37 comments

Comments

@intcua
Copy link

intcua commented May 11, 2019

{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n at assertJavaApiIsAvailable (frida/node_modules/frida-java/index.js:85:1)\n at Runtime.perform (frida/node_modules/frida-java/index.js:277:1)\n at /internal-agent.js:241:6","fileName":"frida/node_modules/frida-java/index.js","lineNumber":85,"columnNumber":1}

#https://i.imgur.com/zegJ1Up.png

@cryptax
Copy link

cryptax commented Jun 3, 2019

Same case for me, with Frida 12.6.4.

Environment:

How to reproduce:

$ adb push frida-server-12.6.4-android-arm64 /data/local/tmp/frida-server
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell
hero2lte:/ $ cd /data/local/tmp/
hero2lte:/data/local/tmp $ su
hero2lte:/data/local/tmp # ./frida-server                                                                                    
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n    at assertJavaApiIsAvailable (frida/node_modules/frida-java/index.js:85:1)\n    at Runtime.perform (frida/node_modules/frida-java/index.js:277:1)\n    at /internal-agent.js:241:6","fileName":"frida/node_modules/frida-java/index.js","lineNumber":85,"columnNumber":1}

Note that frida-ps -U will succeed. But it won't be possible to spawn any app, or attach to them. So this is quite a show stopper :(
Failed to spawn: unable to access zygote64 while preparing for app launch; try disabling Magisk Hide in case it is active
Failed to attach: remote_write PTRACE_POKEDATA head failed: 3
Failed to attach: unable to inject library into process without libc

@oleavr
Copy link
Member

oleavr commented Jun 3, 2019

@cryptax Which version of Android is that running?

@cryptax
Copy link

cryptax commented Jun 4, 2019

@cryptax Which version of Android is that running?

Hi @oleavr , this is a Android 8.0.0

@oleavr
Copy link
Member

oleavr commented Jun 4, 2019

Ok. Could you check logcat for audit error messages ending in permissive=0? Anything in adb logcat -b crash?

@cryptax
Copy link

cryptax commented Jun 4, 2019

Ok. Could you check logcat for audit error messages ending in permissive=0? Anything in adb logcat -b >crash?

Unfortunately, there's nothing in both cases. Let me know if I can test anything else.

@cryptax
Copy link

cryptax commented Jun 10, 2019

The issue is still there on frida-server-12.6.6-android-arm64

# ./frida-server -v                                                                                 
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n    at assertJavaApiIsAvailable (frida/node_modules/frida-java/index.js:85:1)\n    at Runtime.perform (frida/node_modules/frida-java/index.js:277:1)\n    at /internal-agent.js:241:6","fileName":"frida/node_modules/frida-java/index.js","lineNumber":85,"columnNumber":1}
Unable to preload: Java API not available

Indeed, there is assertJavaApiIsAvailable at index.js, and so this.available is obviously False.
To my understanding, this.available is initialized by tryInitialize() -> getApi() -> _getApi() in https://github.com/frida/frida-java/blob/master/lib/android.js.

@ksg97031
Copy link

@cryptax @oleavr I formatted my device and rooting again, it's working well now!!

In my case, I have installed "suhide" application in my device.
I think this is associating "Xposed framework".

@cryptax
Copy link

cryptax commented Jun 18, 2019

@ksg97031 you probably had an issue with rooting. This is not my case.

@oleavr, the bug is still there.
I am root on my device:

hero2lte:/data/local/tmp # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:supersu:s0

and when I launch frida-server:

hero2lte:/data/local/tmp # ./frida-server                                                                                         
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n    at assertJavaApiIsAvailable (frida/node_modules/frida-java/index.js:85:1)\n    at Runtime.perform (frida/node_modules/frida-java/index.js:277:1)\n    at /internal-agent.js:241:6","fileName":"frida/node_modules/frida-java/index.js","lineNumber":85,"columnNumber":1}

I used to have eu.chainfire.suhide on the device, so I uninstalled it. Rebooted. Still same problem.
Also, I tried with setenforce=0. Still same problem.

This is with Frida Server 12.6.6 ARM64 on Android 8.0.0, on a Samsung Galaxy S7 Edge

@cryptax
Copy link

cryptax commented Jul 11, 2019

Same on Frida Server 12.6.10 ARM64.

@oleavr
Copy link
Member

oleavr commented Jul 11, 2019

@cryptax This is a ROM-specific issue, so unfortunately I can't fix it without access to a matching device. My only test devices are Pixel 3, Nexus 5X, and Samsung Galaxy S5 Edge. Frida works great on all of them.

@oleavr
Copy link
Member

oleavr commented Jul 11, 2019

Would encourage you to dig into frida-java to figure out why this fails on your particular device. Use this playground recipe to add temporary logging to frida-java:
https://gist.github.com/oleavr/cae76c895eb7d227216ed3ffe9dbbeb3
(Use the REPL to load it into system_server, which should reproduce the exact same scenario.)

@cryptax
Copy link

cryptax commented Jul 11, 2019

@oleavr Could you provide me a debug version of the frida-server, for example with all traces enabled, so that I can run it on mine and provide you with a nice trace?

@oleavr
Copy link
Member

oleavr commented Jul 11, 2019

@cryptax There isn't any logging/tracing to enable, so the only way to investigate this is to use the playground approach, which allows you to use a local copy of frida-java where you can add logging to better understand what's failing. This issue is probably isolated to getApi() in lib/android.js.

@cryptax
Copy link

cryptax commented Jul 15, 2019

Am I meant to run frida-java on Android instead of frida-server?

@enovella
Copy link

@ksg97031 you probably had an issue with rooting. This is not my case.

@oleavr, the bug is still there.
I am root on my device:

hero2lte:/data/local/tmp # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:supersu:s0

and when I launch frida-server:

hero2lte:/data/local/tmp # ./frida-server                                                                                         
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n    at assertJavaApiIsAvailable (frida/node_modules/frida-java/index.js:85:1)\n    at Runtime.perform (frida/node_modules/frida-java/index.js:277:1)\n    at /internal-agent.js:241:6","fileName":"frida/node_modules/frida-java/index.js","lineNumber":85,"columnNumber":1}

I used to have eu.chainfire.suhide on the device, so I uninstalled it. Rebooted. Still same problem.
Also, I tried with setenforce=0. Still same problem.

This is with Frida Server 12.6.6 ARM64 on Android 8.0.0, on a Samsung Galaxy S7 Edge

Similar issue on another Samsung device. Can you try to run frida-server from another path? I assume the answer will be the same issue.

@cryptax
Copy link

cryptax commented Jul 16, 2019

Similar issue on another Samsung device. Can you try to run frida-server from another path? I assume the answer will be the same issue.

I tried from /sbin and, as expected, the issue is the same.
As @oleavr said, to debug this, I'd need to run my own frida-java. He gave a link (above) but I'm unsure what's meant to run on Android, and what's meant to run on another host.

@JelmerDeHen
Copy link

Running zeroflte (Samsung Galaxy S6) and ran in-to similar challenges.
Was able to query applications and hook a few things but not Zygote-related.

$ curl -LO https://github.com/frida/frida/releases/download/12.7.5/frida-server-12.7.5-android-arm64.xz
$ unxz frida-server-12.7.5-android-arm64.xz
$ adb push frida-server-12.7.5-android-arm64 /data/local/tmp/frida-server
frida-server-12.7.5-android-arm64: 1 file pushed. 18.0 MB/s (38414672 bytes in 2.039s)
zeroflte:/ $ cd /data/local/tmp
zeroflte:/data/local/tmp $ chmod 755 frida-server
zeroflte:/data/local/tmp $ su
zeroflte:/data/local/tmp # chown root:root frida-server
zeroflte:/data/local/tmp # ./frida-server -v
Unable to preload: Unable to access zygote while preparing for app launch; try disabling Magisk Hide in case it is active

The following hints on a SELinux denial:

zeroflte:/data/local/tmp # grep -r frida /data
/data/misc/audit/audit.old:type=1400 audit(1569395181.179:383): avc:  denied  { read_policy } for  pid=15892 comm="frida" scontext=u:r:shell:s0 tcontext=u:object_r:kernel:s0 tclass=security permissive=0 SEPF_SECMOBILE_7.0_0010

Within SELinux securable objects have a context inherited from parent directory. Here I try to mimic the context of the file /system/bin/cmd.

zeroflte:/data/local/tmp # ls -Z /system/bin/cmd                                                                                                                                                                                              
u:object_r:system_file:s0 /system/bin/cmd
zeroflte:/data/local/tmp # chcon -Rv u:object_r:system_file:s0 ./frida-server ./re.frida.server
chcon 'frida-server' to u:object_r:system_file:s0
chcon 're.frida.server' to u:object_r:system_file:s0
chcon 're.frida.server/frida-helper-32' to u:object_r:system_file:s0
chcon 're.frida.server/pipe-ed5e76cdfd00e4333a3d2ad79e17c887' to u:object_r:system_file:s0
chcon 're.frida.server/frida-agent-32.so' to u:object_r:system_file:s0
chcon 're.frida.server/frida-agent-64.so' to u:object_r:system_file:s0
chcon 're.frida.server/linjector-2' to u:object_r:system_file:s0
chcon 're.frida.server/pipe-0e6fd4c2195e009c3dfc962bbb08992e' to u:object_r:system_file:s0
chcon 're.frida.server/linjector-1' to u:object_r:system_file:s0
chcon 're.frida.server/pipe-98d64d8f71c44666916a3c7d56f956e7' to u:object_r:system_file:s0
chcon 're.frida.server/linjector-4' to u:object_r:system_file:s0
chcon 're.frida.server/pipe-ec4956713b853fe5fc5c73bf25cd063a' to u:object_r:system_file:s0
chcon 're.frida.server/linjector-6' to u:object_r:system_file:s0
chcon 're.frida.server/pipe-4575be4dfde8690d7ef82bbf5d414c54' to u:object_r:system_file:s0
chcon 're.frida.server/linjector-3' to u:object_r:system_file:s0
chcon 're.frida.server/pipe-75659ac350740f28576aa97342f5ed5a' to u:object_r:system_file:s0
chcon 're.frida.server/linjector-21' to u:object_r:system_file:s0

This did not work.

zeroflte:/data/local/tmp # ./frida-server -v                                                                                                                                                                                                  
Unable to preload: Unable to access zygote while preparing for app launch; try disabling Magisk Hide in case it is active

I then simply remounted /system rw and copied frida-server to /system/bin:

zeroflte:/data/local/tmp # mount -o rw,remount /system
zeroflte:/data/local/tmp # cp ./frida-server /system/bin
zeroflte:/data/local/tmp # ls -Z /system/bin/frida-server
u:object_r:system_file:s0 /system/bin/frida-server

I then ran /system/bin/frida-server to verify it works, rebooted phone and now I can launch apps and attach to things.

If this does not work you may be able to use 'magiskpolicy' to change the live policies.

@Manouchehri
Copy link
Contributor

I'm running into this as well, it's a known issue with some Samsung kernels. https://stackoverflow.com/questions/36674727/permission-denied-on-exec-from-a-binary-running-as-root

You can see the error in dmesg:

[18674.669095]  [7:   frida-server: 5280] Restricted making process. PID = 5280(frida-server) PPID = 5219(frida-server)

On kernels 3.17 and newer, we can use memfd_create (like I did in frida/frida-core#273), but that still doesn't help for all the devices running 3.10.

@Manouchehri
Copy link
Contributor

Workaround:

mount -o bind /data/local/tmp/frida-server /system/bin/pppd
# Then run /system/bin/pppd instead of /data/local/tmp/frida-server

@Summersummer3
Copy link

I have met the same question with almost identical log in huawei P30:

Unable to save SELinux policy to the kernel: Out of memory
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n    at assertJavaApiIsAvailable (frida/node_modules/frida-java-bridge/index.js:83:1)\n    at Runtime.perform (frida/node_modules/frida-java-bridge/index.js:275:1)\n    at /internal-agent.js:268:6","fileName":"frida/node_modules/frida-java-bridge/index.js","lineNumber":83,"columnNumber":1}
Unable to preload: Java API not available

Any idea>,<

@foxundermoon
Copy link

s8 android 9 same issue

Unable to preload: Unable to access zygote while preparing for app launch; try disabling Magisk Hide in case it is active

If this does not work you may be able to use 'magiskpolicy' to change the live policies.

how to use the 'magiskpolicy' ?

@kripthor
Copy link

I also have this issue on a rooted Samsung S8, Android 8.0, frida-server-12.8.6-android-arm64. No workarounds above worked :(

@Manouchehri
Copy link
Contributor

@kripthor Can you share the output from dmesg?

@kripthor
Copy link

kripthor commented Jan 30, 2020

@Manouchehri I see nothing relevant or remotely related in dmesg.
As a clarification, despite I have this message when I start the frida-server:

127|dreamlte:/data/local/tmp # ./frida-server-12.8.9-android-arm64
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n at assertJavaApiIsAvailable (frida/node_modules/frida-java-bridge/index.js:83:1)\n at Runtime.perform (frida/node_modules/frida-java-bridge/index.js:275:1)\n at /internal-agent.js:268:6","fileName":"frida/node_modules/frida-java-bridge/index.js","lineNumber":83,"columnNumber":1}

I can still attach to processes from the client side. I just can't spawn a process.

This WORKS:
frida -U -l .\frida-hooks.js -n com.xxx.xxxx

This DOESN'T WORK:
frida -U -l .\frida-hooks.js -f com.xxx.xxxx
...
Failed to spawn: unable to access zygote64 while preparing for app launch; try disabling Magisk Hide in case it is active

Device is rooted but there is no Magisk Hide. On a side note, I cannot do "setenforce 0":
dreamlte:/ $ su
dreamlte:/ # getenforce
Enforcing
dreamlte:/ # setenforce 0
dreamlte:/ # getenforce
Enforcing
dreamlte:/ # setenforce Permissive
dreamlte:/ # getenforce
Enforcing

This might be probably related with what you mentioned about some Samsung kernels. The question remains, by solving the SELinux issue, does the frida one gets solved. Or they should be addressed separately?

Although I can still attach to process, achieving early instrumentation is impossible with the ability to spawn. :(

@Manouchehri
Copy link
Contributor

@kripthor dmesg still likely has the error message, could you share it anyway?

Also, could you try #877 (comment)?

@flankerhqd
Copy link

Workaround:

mount -o bind /data/local/tmp/frida-server /system/bin/pppd
# Then run /system/bin/pppd instead of /data/local/tmp/frida-server

Solved some issues on samsung devices

@needsomesl33p
Copy link

needsomesl33p commented Apr 3, 2020

This worked for me:

  1. Open Magisk Manager
  2. Go Settings
  3. In the "Magisk" Section turn "Magisk Hide" off
  4. Turn "Magisk Core Only Mode" on
  5. Reboot

@waruqi
Copy link

waruqi commented Apr 20, 2020

same issue

Unable to save SELinux policy to the kernel: Out of memory
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n at m._checkAvailable (frida/node_modules/frida-java-bridge/index.js:238:1)\n at m.perform (frida/node_modules/frida-java-bridge/index.js:154:1)\n at /internal-agent.js:268:6","fileName":"frida/node_modules/frida-java-bridge/index.js","lineNumber":238,"columnNumber":1}

I have done setenforce = 0 and frida-ps/frida-trace works. But there is still these error messages for frida-server

Workaround:

mount -o bind /data/local/tmp/frida-server /system/bin/pppd
# Then run /system/bin/pppd instead of /data/local/tmp/frida-server

not work

frida-server --version. --> 12.8.20

android device: HUAWEI P30 ELE-AL00 Android 10

uname -a
Linux localhost 4.14.116 #1 SMP PREEMPT Thu Dec 26 15:30:45 CST 2019 aarch64

id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:su:s0

@Manouchehri
Copy link
Contributor

@waruqi Could you post the output of dmesg after attempting to run Frida?

@waruqi
Copy link

waruqi commented Apr 27, 2020

@waruqi Could you post the output of dmesg after attempting to run Frida?

Although frida-server will still prompt the api not available, but it seems that frida can connect and work normally. I can't reproduce the previous connection problem.

@waruqi
Copy link

waruqi commented Jun 28, 2020

@waruqi Could you post the output of dmesg after attempting to run Frida?

And I cannot trace java methods.

[21171.923309] [pid:4426,cpu3,kworker/3:2][loadmonitor]:[update_dpm_data] end.
[21171.923675] [pid:12030,cpu4,frida-server]------------[ cut here ]------------
[21171.923706] [pid:12030,cpu4,frida-server]WARNING: CPU: 4 PID: 12030 at ../../../../../../vendor/hisi/ap/kernel/mm/pmalloc.c:240 pmalloc+0x1ac/0x1b4
[21171.923706] [pid:12030,cpu4,frida-server]Modules linked in: balong_modem
[21171.923706] [pid:12030,cpu4,frida-server]CPU: 4 PID: 12030 Comm: frida-server VIP: 00 Tainted: G        W       4.14.116 #1
[21171.923736] [pid:12030,cpu4,frida-server]TGID: 12030 Comm: frida-server
[21171.923736] [pid:12030,cpu4,frida-server]Hardware name: kirin980 (DT)
[21171.923736] [pid:12030,cpu4,frida-server]task: fffffff45ec20000 task.stack: fffffff29d010000
[21171.923736] [pid:12030,cpu4,frida-server]PC is at pmalloc+0x1ac/0x1b4
[21171.923736] [pid:12030,cpu4,frida-server]LR is at pmalloc+0x30/0x1b4
[21171.923736] [pid:12030,cpu4,frida-server]pc : [<ffffff8216fbbfe4>] lr : [<ffffff8216fbbe68>] pstate: 00400145
[21171.923736] [pid:12030,cpu4,frida-server]sp : fffffff29d013a50
[21171.923767] [pid:12030,cpu4,frida-server]x29: fffffff29d013aa0 x28: fffffff45ec20000 
[21171.923767] [pid:12030,cpu4,frida-server]x27: fffffff45ec20000 x26: 0000000000000010 
[21171.923767] [pid:12030,cpu4,frida-server]x25: 0000000000000124 x24: fffffff45ec20000 
[21171.923767] [pid:12030,cpu4,frida-server]x23: 0000000000000000 x22: fffffff2abe1bd80 
[21171.923767] [pid:12030,cpu4,frida-server]x21: ffffff8217332338 x20: 00000000014080c0 
[21171.923767] [pid:12030,cpu4,frida-server]x19: 0000000000000020 x18: 0000000000000032 
[21171.923797] [pid:12030,cpu4,frida-server]x17: fffffff67fcbe252 x16: 0000000000000000 
[21171.923797] [pid:12030,cpu4,frida-server]x15: 0000000000000032 x14: 0000094000000000 
[21171.923797] [pid:12030,cpu4,frida-server]x13: 8000001000000000 x12: 0000000000000000 
[21171.923797] [pid:12030,cpu4,frida-server]x11: fffffff67fcbd050 x10: ffffffffffffffff 
[21171.923797] [pid:12030,cpu4,frida-server]x9 : 0000000000000017 x8 : 0000000000000001 
[21171.923828] [pid:12030,cpu4,frida-server]x7 : 0000000000000000 x6 : 000000000000003f 
[21171.923828] [pid:12030,cpu4,frida-server]x5 : 0000000000000040 x4 : ffffffffffffffd0 
[21171.923828] [pid:12030,cpu4,frida-server]x3 : fffffff2abe1d6c0 x2 : ffffff8218da9218 
[21171.923828] [pid:12030,cpu4,frida-server]x1 : ffffff8217332334 x0 : ffffff8216fbbe64 
[21171.923828] [pid:12030,cpu4,frida-server]\x0aSP: 0xfffffff29d0139d0:
[21171.923828] [pid:12030,cpu4,frida-server]39d0  5ec20000 fffffff4 00000124 00000000 00000010 00000000 5ec20000 fffffff4
[21171.923858] [pid:12030,cpu4,frida-server]39f0  5ec20000 fffffff4 9d013aa0 fffffff2 16fbbe68 ffffff82 9d013a50 fffffff2
[21171.923858] [pid:12030,cpu4,frida-server]3a10  16fbbfe4 ffffff82 00400145 00000000 1a074018 ffffff82 ffffffff ffffffff
[21171.923889] [pid:12030,cpu4,frida-server]3a30  ffffffff 0000007f 00000001 00000000 9d013aa0 fffffff2 16fbbfe4 ffffff82
[21171.923889] [pid:12030,cpu4,frida-server]3a50  1a873180 ffffff82 00000140 00000000 014000c0 00000000 00000124 00000000
[21171.923889] [pid:12030,cpu4,frida-server]3a70  5ec20000 fffffff4 1aa29000 ffffff82 18dae910 ffffff82 18dae91c ffffff82
[21171.923919] [pid:12030,cpu4,frida-server]3a90  00000002 00000000 983b29e8 fffffff2 9d013ae0 fffffff2 17332338 ffffff82
[21171.923919] [pid:12030,cpu4,frida-server]3ab0  19422000 ffffff82 16dadd24 ffffff82 000dddc8 00000000 8c6e8600 00000077
[21171.923919] [pid:12030,cpu4,frida-server]\x0aX3: 0xfffffff2abe1d640:
[21171.923950] [pid:12030,cpu4,frida-server]d640  00000000 00001290 00001e60 000001b0 00001b00 00001878 00000af8 00000f30
[21171.923950] [pid:12030,cpu4,frida-server]d660  00001bd8 000000d8 00000d80 000016c8 00000360 00000bd0 00000870 000006c0
[21171.923950] [pid:12030,cpu4,frida-server]d680  00001008 000005e8 00001d88 00000a20 00000798 00000000 00000000 00000000
[21171.923980] [pid:12030,cpu4,frida-server]d6a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.923980] [pid:12030,cpu4,frida-server]d6c0  abe1bd80 fffffff2 00000001 00000000 19c0564c ffffff82 00000124 00000000
[21171.924011] [pid:12030,cpu4,frida-server]d6e0  18dcf114 ffffff82 00000000 00000000 19a0628c ffffff82 00000124 00000000
[21171.924041] [pid:12030,cpu4,frida-server]d700  18dcf118 ffffff82 00000000 00000000 19a1854d ffffff82 00000124 00000000
[21171.924133] [pid:12030,cpu4,frida-server]d720  18dcf11c ffffff82 00000000 00000000 19a139eb ffffff82 00000124 00000000
[21171.924224] [pid:12030,cpu4,frida-server]\x0aX11: 0xfffffff67fcbcfd0:
[21171.924224] [pid:12030,cpu4,frida-server]cfd0  412c1a80 fffffff3 00456ea4 00000000 cd04b040 ffffffbf d0e1b0c0 ffffffbf
[21171.924285] [pid:12030,cpu4,frida-server]cff0  eef13cc0 fffffff2 00640fa4 00000000 cbbbc4c0 ffffffbf d1ae8280 ffffffbf
[21171.924285] [pid:12030,cpu4,frida-server]d010  9f8dfc00 fffffff3 0026bb64 00000000 ce7e3780 ffffffbf ce22f380 ffffffbf
[21171.924316] [pid:12030,cpu4,frida-server]d030  3bd48800 fffffff4 001e8a5c 00000000 d0ef5200 ffffffbf cff5a000 ffffffbf
[21171.924316] [pid:12030,cpu4,frida-server]d050  983b1c00 fffffff2 004432bc 00000000 ca60ec00 ffffffbf ce796600 ffffffbf
[21171.924316] [pid:12030,cpu4,frida-server]d070  46d44000 fffffff4 0000ffb4 00000000 d11b5000 ffffffbf ccdf8200 ffffffbf
[21171.924346] [pid:12030,cpu4,frida-server]d090  9998f000 fffffff3 0120d3fc 00000000 ce666200 ffffffbf d1b0c400 ffffffbf
[21171.924346] [pid:12030,cpu4,frida-server]d0b0  9bfea000 fffffff2 00020d1c 00000000 ca6ffa00 ffffffbf cc78f600 ffffffbf
[21171.924346] [pid:12030,cpu4,frida-server]\x0aX17: 0xfffffff67fcbe1d2:
[21171.924377] [pid:12030,cpu4,frida-server]e1d0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
[21171.924377] [pid:12030,cpu4,frida-server]e1f0  000000c3 000000ba 0000001f 00000000 cf7ddca0 ffffffbf d9bfb4e0 ffffffbf
[21171.924377] [pid:12030,cpu4,frida-server]e210  ce6ccf20 ffffffbf cc9bbee0 ffffffbf 7fcbe220 fffffff6 7fcbe220 fffffff6
[21171.924407] [pid:12030,cpu4,frida-server]e230  7fcbe230 fffffff6 7fcbe230 fffffff6 f5000038 00000000 00000600 00000000
[21171.924407] [pid:12030,cpu4,frida-server]e250  00330000 00000000 00000000 00000000 00000000 00000000 0029588c 00000000
[21171.924407] [pid:12030,cpu4,frida-server]e270  d0a1f800 ffffffbf ca2adbc0 ffffffbf c6229bc0 fffffff3 005a144c 00000000
[21171.924438] [pid:12030,cpu4,frida-server]e290  cf188a40 ffffffbf ca1a56c0 ffffffbf 8ab6ea80 fffffff2 0127b0cc 00000000
[21171.924438] [pid:12030,cpu4,frida-server]e2b0  ca2adb80 ffffffbf ca2cec00 ffffffbf 734630c0 fffffff6 00017c64 00000000
[21171.924468] [pid:12030,cpu4,frida-server]e2d0  d9cd1800 ffffffbf 00000000 00000000 00000000 00000000 000029e4 00000000
[21171.924468] [pid:12030,cpu4,frida-server]\x0aX22: 0xfffffff2abe1bd00:
[21171.924468] [pid:12030,cpu4,frida-server]bd00  08341000 ffffff80 08343000 ffffff80 00000004 00000000 abe1b599 fffffff2
[21171.924468] [pid:12030,cpu4,frida-server]bd20  00000000 00000000 00000000 00000000 abe1b5b0 fffffff2 abe1beb0 fffffff2
[21171.924499] [pid:12030,cpu4,frida-server]bd40  00000000 5f6b6c63 abe1cec0 fffffff2 0000306b 00000000 00000000 00000000
[21171.924499] [pid:12030,cpu4,frida-server]bd60  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924530] [pid:12030,cpu4,frida-server]bd80  00010001 dead4ead ffffffff ffffffff ffffffff ffffffff 95f50000 fffffff2
[21171.924530] [pid:12030,cpu4,frida-server]bda0  95f50000 fffffff2 00000004 ffffffff 18db0a8c ffffff82 abe1d6c0 fffffff2
[21171.924530] [pid:12030,cpu4,frida-server]bdc0  abe1e340 fffffff2 ffffffff ffffffff ffffffff fffff7ff ffffffff ff7fffff
[21171.924560] [pid:12030,cpu4,frida-server]bde0  ffffffff ffffffff fffffbff fffffff7 ffffffff ffffffff ffffffff ffffffff
[21171.924560] [pid:12030,cpu4,frida-server]\x0aX24: 0xfffffff45ec1ff80:
[21171.924560] [pid:12030,cpu4,frida-server]ff80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924591] [pid:12030,cpu4,frida-server]ffa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924591] [pid:12030,cpu4,frida-server]ffc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924591] [pid:12030,cpu4,frida-server]ffe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924621] [pid:12030,cpu4,frida-server]0000  00000020 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[21171.924621] [pid:12030,cpu4,frida-server]0020  9d010000 fffffff2 00000002 00404100 00000000 00000000 00000000 00000000
[21171.924652] [pid:12030,cpu4,frida-server]0040  5ec20040 fffffff4 5ec20040 fffffff4 00000000 00000000 21f06ecb 00001336
[21171.924652] [pid:12030,cpu4,frida-server]0060  00000000 00000000 d4bd1480 fffffff3 00000001 00000000 00000000 00000000
[21171.924652] [pid:12030,cpu4,frida-server]\x0aX27: 0xfffffff45ec1ff80:
[21171.924652] [pid:12030,cpu4,frida-server]ff80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924682] [pid:12030,cpu4,frida-server]ffa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924682] [pid:12030,cpu4,frida-server]ffc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924713] [pid:12030,cpu4,frida-server]ffe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924713] [pid:12030,cpu4,frida-server]0000  00000020 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[21171.924713] [pid:12030,cpu4,frida-server]0020  9d010000 fffffff2 00000002 00404100 00000000 00000000 00000000 00000000
[21171.924743] [pid:12030,cpu4,frida-server]0040  5ec20040 fffffff4 5ec20040 fffffff4 00000000 00000000 21f06ecb 00001336
[21171.924743] [pid:12030,cpu4,frida-server]0060  00000000 00000000 d4bd1480 fffffff3 00000001 00000000 00000000 00000000
[21171.924743] [pid:12030,cpu4,frida-server]\x0aX28: 0xfffffff45ec1ff80:
[21171.924774] [pid:12030,cpu4,frida-server]ff80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924774] [pid:12030,cpu4,frida-server]ffa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924774] [pid:12030,cpu4,frida-server]ffc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924804] [pid:12030,cpu4,frida-server]ffe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.924804] [pid:12030,cpu4,frida-server]0000  00000020 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[21171.924804] [pid:12030,cpu4,frida-server]0020  9d010000 fffffff2 00000002 00404100 00000000 00000000 00000000 00000000
[21171.924835] [pid:12030,cpu4,frida-server]0040  5ec20040 fffffff4 5ec20040 fffffff4 00000000 00000000 21f06ecb 00001336
[21171.924835] [pid:12030,cpu4,frida-server]0060  00000000 00000000 d4bd1480 fffffff3 00000001 00000000 00000000 00000000
[21171.924865] [pid:12030,cpu4,frida-server]\x0aX29: 0xfffffff29d013a20:
[21171.924865] [pid:12030,cpu4,frida-server]3a20  1a074018 ffffff82 ffffffff ffffffff ffffffff 0000007f 00000001 00000000
[21171.924865] [pid:12030,cpu4,frida-server]3a40  9d013aa0 fffffff2 16fbbfe4 ffffff82 1a873180 ffffff82 00000140 00000000
[21171.924865] [pid:12030,cpu4,frida-server]3a60  014000c0 00000000 00000124 00000000 5ec20000 fffffff4 1aa29000 ffffff82
[21171.924896] [pid:12030,cpu4,frida-server]3a80  18dae910 ffffff82 18dae91c ffffff82 00000002 00000000 983b29e8 fffffff2
[21171.924896] [pid:12030,cpu4,frida-server]3aa0  9d013ae0 fffffff2 17332338 ffffff82 19422000 ffffff82 16dadd24 ffffff82
[21171.924896] [pid:12030,cpu4,frida-server]3ac0  000dddc8 00000000 8c6e8600 00000077 9d013b90 fffffff2 983b29e8 fffffff2
[21171.924926] [pid:12030,cpu4,frida-server]3ae0  9d013b80 fffffff2 173376b8 ffffff82 9d013b40 fffffff2 16dada90 ffffff82
[21171.924926] [pid:12030,cpu4,frida-server]3b00  17341134 ffffff82 00000000 00000000 9d013b80 fffffff2 16f960f8 ffffff82
[21171.924957] [pid:12030,cpu4,frida-server]
[21171.924957] [pid:12030,cpu4,frida-server]Call trace:
[21171.924957] [pid:12030,cpu4,frida-server]Exception stack(0xfffffff29d013910 to 0xfffffff29d013a50)
[21171.924957] [pid:12030,cpu4,frida-server]3900:                                   ffffff8216fbbe64 ffffff8217332334
[21171.924957] [pid:12030,cpu4,frida-server]3920: ffffff8218da9218 fffffff2abe1d6c0 ffffffffffffffd0 0000000000000040
[21171.924957] [pid:12030,cpu4,frida-server]3940: 000000000000003f 0000000000000000 0000000000000001 0000000000000017
[21171.924987] [pid:12030,cpu4,frida-server]3960: ffffffffffffffff fffffff67fcbd050 0000000000000000 8000001000000000
[21171.924987] [pid:12030,cpu4,frida-server]3980: 0000094000000000 0000000000000032 0000000000000000 fffffff67fcbe252
[21171.924987] [pid:12030,cpu4,frida-server]39a0: 0000000000000032 0000000000000020 00000000014080c0 ffffff8217332338
[21171.924987] [pid:12030,cpu4,frida-server]39c0: fffffff2abe1bd80 0000000000000000 fffffff45ec20000 0000000000000124
[21171.924987] [pid:12030,cpu4,frida-server]39e0: 0000000000000010 fffffff45ec20000 fffffff45ec20000 fffffff29d013aa0
[21171.924987] [pid:12030,cpu4,frida-server]3a00: ffffff8216fbbe68 fffffff29d013a50 ffffff8216fbbfe4 0000000000400145
[21171.924987] [pid:12030,cpu4,frida-server]3a20: ffffff821a074018 ffffffffffffffff 0000007fffffffff 0000000000000001
[21171.925018] [pid:12030,cpu4,frida-server]3a40: fffffff29d013aa0 ffffff8216fbbfe4
[21171.925018] [pid:12030,cpu4,frida-server][<ffffff8216fbbfe4>] pmalloc+0x1ac/0x1b4
[21171.925018] [pid:12030,cpu4,frida-server][<ffffff8217332338>] hashtab_create+0x40/0xe8
[21171.925018] [pid:12030,cpu4,frida-server][<ffffff82173376b8>] policydb_read+0x60/0x1b18
[21171.925018] [pid:12030,cpu4,frida-server][<ffffff821734115c>] security_load_policy+0x78/0x6ac
[21171.925048] [pid:12030,cpu4,frida-server][<ffffff821732f14c>] sel_write_load+0x184/0xaa0
[21171.925048] [pid:12030,cpu4,frida-server][<ffffff8216fc6520>] __vfs_write+0x6c/0x1d8
[21171.925048] [pid:12030,cpu4,frida-server][<ffffff8216fc6320>] vfs_write+0xcc/0x188
[21171.925048] [pid:12030,cpu4,frida-server][<ffffff8216fc9704>] SyS_write+0xb0/0x138
[21171.925048] [pid:12030,cpu4,frida-server]Exception stack(0xfffffff29d013ec0 to 0xfffffff29d014000)
[21171.925048] [pid:12030,cpu4,frida-server]3ec0: 0000000000000003 000000778c6e8600 00000000000dddc8 0000000000000000
[21171.925079] [pid:12030,cpu4,frida-server]3ee0: 0000000000000140 000000778cc0d688 000000778c385c00 000000778c385ba0
[21171.925079] [pid:12030,cpu4,frida-server]3f00: 0000000000000040 4fa457da6c430b40 0000000000000000 ffffffffffffffff
[21171.925079] [pid:12030,cpu4,frida-server]3f20: 0000000000000029 000000000000000d 0000000000000000 0000000000000001
[21171.925079] [pid:12030,cpu4,frida-server]3f40: 0000005e387f19c8 000000778d4baf10 000000778e2ee000 0000007ff40a4900
[21171.925079] [pid:12030,cpu4,frida-server]3f60: 0000000000000003 000000778c6e8600 00000000000dddc8 0000005e3861f12c
[21171.925079] [pid:12030,cpu4,frida-server]3f80: 0000000000000000 000000778cd9a9b0 000000778cdcc510 0000005e3861f0f8
[21171.925079] [pid:12030,cpu4,frida-server]3fa0: 0000005e3861f0f3 0000007ff40a48b0 0000005e3848ce58 0000007ff40a4870
[21171.925109] [pid:12030,cpu4,frida-server]3fc0: 000000778d4baf18 0000000000000000 0000000000000003 0000000000000040
[21171.925109] [pid:12030,cpu4,frida-server]3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[21171.925109] [pid:12030,cpu4,frida-server][<ffffff8216a03bc0>] el0_svc_naked+0x34/0x38
[21171.925109] [pid:12030,cpu4,frida-server]---[ end trace 3053fb5618a9dc76 ]---
[21171.925170] [pid:12030,cpu4,frida-server]------------[ cut here ]------------
[21171.925170] [pid:12030,cpu4,frida-server]WARNING: CPU: 4 PID: 12030 at ../../../../../../vendor/hisi/ap/kernel/mm/pmalloc.c:424 pmalloc_protect_pool+0xbc/0xcc
[21171.925170] [pid:12030,cpu4,frida-server]Modules linked in: balong_modem
[21171.925201] [pid:12030,cpu4,frida-server]CPU: 4 PID: 12030 Comm: frida-server VIP: 00 Tainted: G        W       4.14.116 #1
[21171.925201] [pid:12030,cpu4,frida-server]TGID: 12030 Comm: frida-server
[21171.925201] [pid:12030,cpu4,frida-server]Hardware name: kirin980 (DT)
[21171.925201] [pid:12030,cpu4,frida-server]task: fffffff45ec20000 task.stack: fffffff29d010000
[21171.925201] [pid:12030,cpu4,frida-server]PC is at pmalloc_protect_pool+0xbc/0xcc
[21171.925201] [pid:12030,cpu4,frida-server]LR is at pmalloc_protect_pool+0x18/0xcc
[21171.925201] [pid:12030,cpu4,frida-server]pc : [<ffffff8216fbc100>] lr : [<ffffff8216fbc05c>] pstate: 20400145
[21171.925201] [pid:12030,cpu4,frida-server]sp : fffffff29d013b60
[21171.925231] [pid:12030,cpu4,frida-server]x29: fffffff29d013b80 x28: fffffff45ec20000 
[21171.925231] [pid:12030,cpu4,frida-server]x27: fffffff45ec20000 x26: 00000000014000c0 
[21171.925231] [pid:12030,cpu4,frida-server]x25: 0000000000000124 x24: fffffff45ec20000 
[21171.925231] [pid:12030,cpu4,frida-server]x23: ffffff8219422000 x22: 00000000000dddc8 
[21171.925231] [pid:12030,cpu4,frida-server]x21: 00000000fffffff4 x20: fffffff2983b29e8 
[21171.925231] [pid:12030,cpu4,frida-server]x19: fffffff2abe1bd80 x18: 0000000000000032 
[21171.925262] [pid:12030,cpu4,frida-server]x17: fffffff67fcbe252 x16: 0000000000000000 
[21171.925262] [pid:12030,cpu4,frida-server]x15: 0000000000000001 x14: ffffff821aa05000 
[21171.925262] [pid:12030,cpu4,frida-server]x13: ffffff821a490c80 x12: ffffff821aa05000 
[21171.925262] [pid:12030,cpu4,frida-server]x11: 00000000004432c4 x10: 0000000000000000 
[21171.925262] [pid:12030,cpu4,frida-server]x9 : 0000000000000001 x8 : fffffff2abe1d6c0 
[21171.925262] [pid:12030,cpu4,frida-server]x7 : 0000000000000000 x6 : 000000000000003f 
[21171.925292] [pid:12030,cpu4,frida-server]x5 : 0000000000000040 x4 : ffffffffffffffd0 
[21171.925292] [pid:12030,cpu4,frida-server]x3 : fffffff2abe1d6c0 x2 : ffffff8218da9218 
[21171.925292] [pid:12030,cpu4,frida-server]x1 : ffffff8217341624 x0 : 0000000000000000 
[21171.925292] [pid:12030,cpu4,frida-server]\x0aSP: 0xfffffff29d013ae0:
[21171.925292] [pid:12030,cpu4,frida-server]3ae0  5ec20000 fffffff4 00000124 00000000 014000c0 00000000 5ec20000 fffffff4
[21171.925323] [pid:12030,cpu4,frida-server]3b00  5ec20000 fffffff4 9d013b80 fffffff2 16fbc05c ffffff82 9d013b60 fffffff2
[21171.925323] [pid:12030,cpu4,frida-server]3b20  16fbc100 ffffff82 20400145 00000000 5ec20000 fffffff4 5ec20000 fffffff4
[21171.925323] [pid:12030,cpu4,frida-server]3b40  ffffffff 0000007f 00000124 00000000 9d013b80 fffffff2 16fbc100 ffffff82
[21171.925354] [pid:12030,cpu4,frida-server]3b60  000dddc8 00000000 fffffff4 00000000 983b29e8 fffffff2 983b2800 fffffff2
[21171.925354] [pid:12030,cpu4,frida-server]3b80  9d013cb0 fffffff2 17341628 ffffff82 1fad1000 ffffff80 000dddc8 00000000
[21171.925384] [pid:12030,cpu4,frida-server]3ba0  9d013bd0 fffffff2 1fbaefff ffffff80 1fbaf000 ffffff80 00000000 00000000
[21171.925384] [pid:12030,cpu4,frida-server]3bc0  1fbaf000 ffffff80 e0451000 0000007f c0000000 0000007f 1fbaefff ffffff80
[21171.925384] [pid:12030,cpu4,frida-server]\x0aX3: 0xfffffff2abe1d640:
[21171.925384] [pid:12030,cpu4,frida-server]d640  00000000 00001290 00001e60 000001b0 00001b00 00001878 00000af8 00000f30
[21171.925415] [pid:12030,cpu4,frida-server]d660  00001bd8 000000d8 00000d80 000016c8 00000360 00000bd0 00000870 000006c0
[21171.925415] [pid:12030,cpu4,frida-server]d680  00001008 000005e8 00001d88 00000a20 00000798 00000000 00000000 00000000
[21171.925445] [pid:12030,cpu4,frida-server]d6a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.925445] [pid:12030,cpu4,frida-server]d6c0  abe1bd80 fffffff2 00000001 00000000 19c0564c ffffff82 00000124 00000000
[21171.925445] [pid:12030,cpu4,frida-server]d6e0  18dcf114 ffffff82 00000000 00000000 19a0628c ffffff82 00000124 00000000
[21171.925476] [pid:12030,cpu4,frida-server]d700  18dcf118 ffffff82 00000000 00000000 19a1854d ffffff82 00000124 00000000
[21171.925567] [pid:12030,cpu4,frida-server]d720  18dcf11c ffffff82 00000000 00000000 19a139eb ffffff82 00000124 00000000
[21171.925659] [pid:12030,cpu4,frida-server]\x0aX8: 0xfffffff2abe1d640:
[21171.925659] [pid:12030,cpu4,frida-server]d640  00000000 00001290 00001e60 000001b0 00001b00 00001878 00000af8 00000f30
[21171.925750] [pid:12030,cpu4,frida-server]d660  00001bd8 000000d8 00000d80 000016c8 00000360 00000bd0 00000870 000006c0
[21171.925842] [pid:12030,cpu4,frida-server]d680  00001008 000005e8 00001d88 00000a20 00000798 00000000 00000000 00000000
[21171.925872] [pid:12030,cpu4,frida-server]d6a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.925872] [pid:12030,cpu4,frida-server]d6c0  abe1bd80 fffffff2 00000001 00000000 19c0564c ffffff82 00000124 00000000
[21171.925903] [pid:12030,cpu4,frida-server]d6e0  18dcf114 ffffff82 00000000 00000000 19a0628c ffffff82 00000124 00000000
[21171.925903] [pid:12030,cpu4,frida-server]d700  18dcf118 ffffff82 00000000 00000000 19a1854d ffffff82 00000124 00000000
[21171.925933] [pid:12030,cpu4,frida-server]d720  18dcf11c ffffff82 00000000 00000000 19a139eb ffffff82 00000124 00000000
[21171.925933] [pid:12030,cpu4,frida-server]\x0aX17: 0xfffffff67fcbe1d2:
[21171.925933] [pid:12030,cpu4,frida-server]e1d0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
[21171.925964] [pid:12030,cpu4,frida-server]e1f0  000000c3 000000ba 0000001f 00000000 cf7ddca0 ffffffbf d9bfb4e0 ffffffbf
[21171.925964] [pid:12030,cpu4,frida-server]e210  ce6ccf20 ffffffbf cc9bbee0 ffffffbf 7fcbe220 fffffff6 7fcbe220 fffffff6
[21171.925964] [pid:12030,cpu4,frida-server]e230  7fcbe230 fffffff6 7fcbe230 fffffff6 f5000038 00000000 00000600 00000000
[21171.925994] [pid:12030,cpu4,frida-server]e250  00330000 00000000 00000000 00000000 00000000 00000000 0029588c 00000000
[21171.925994] [pid:12030,cpu4,frida-server]e270  d0a1f800 ffffffbf ca2adbc0 ffffffbf c6229bc0 fffffff3 005a144c 00000000
[21171.925994] [pid:12030,cpu4,frida-server]e290  cf188a40 ffffffbf ca1a56c0 ffffffbf 8ab6ea80 fffffff2 0127b0cc 00000000
[21171.926025] [pid:12030,cpu4,frida-server]e2b0  ca2adb80 ffffffbf ca2cec00 ffffffbf 734630c0 fffffff6 00017c64 00000000
[21171.926025] [pid:12030,cpu4,frida-server]e2d0  d9cd1800 ffffffbf 00000000 00000000 00000000 00000000 000029e4 00000000
[21171.926055] [pid:12030,cpu4,frida-server]\x0aX19: 0xfffffff2abe1bd00:
[21171.926055] [pid:12030,cpu4,frida-server]bd00  08341000 ffffff80 08343000 ffffff80 00000004 00000000 abe1b599 fffffff2
[21171.926055] [pid:12030,cpu4,frida-server]bd20  00000000 00000000 00000000 00000000 abe1b5b0 fffffff2 abe1beb0 fffffff2
[21171.926055] [pid:12030,cpu4,frida-server]bd40  00000000 5f6b6c63 abe1cec0 fffffff2 0000306b 00000000 00000000 00000000
[21171.926086] [pid:12030,cpu4,frida-server]bd60  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926086] [pid:12030,cpu4,frida-server]bd80  00010001 dead4ead ffffffff ffffffff ffffffff ffffffff 95f50000 fffffff2
[21171.926116] [pid:12030,cpu4,frida-server]bda0  95f50000 fffffff2 00000004 ffffffff 18db0a8c ffffff82 abe1d6c0 fffffff2
[21171.926116] [pid:12030,cpu4,frida-server]bdc0  abe1e340 fffffff2 ffffffff ffffffff ffffffff fffff7ff ffffffff ff7fffff
[21171.926116] [pid:12030,cpu4,frida-server]bde0  ffffffff ffffffff fffffbff fffffff7 ffffffff ffffffff ffffffff ffffffff
[21171.926147] [pid:12030,cpu4,frida-server]\x0aX20: 0xfffffff2983b2968:
[21171.926147] [pid:12030,cpu4,frida-server]2968  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926147] [pid:12030,cpu4,frida-server]2988  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926177] [pid:12030,cpu4,frida-server]29a8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926177] [pid:12030,cpu4,frida-server]29c8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926177] [pid:12030,cpu4,frida-server]29e8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926208] [pid:12030,cpu4,frida-server]2a08  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926208] [pid:12030,cpu4,frida-server]2a28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926208] [pid:12030,cpu4,frida-server]2a48  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926239] [pid:12030,cpu4,frida-server]\x0aX24: 0xfffffff45ec1ff80:
[21171.926239] [pid:12030,cpu4,frida-server]ff80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926239] [pid:12030,cpu4,frida-server]ffa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926269] [pid:12030,cpu4,frida-server]ffc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926269] [pid:12030,cpu4,frida-server]ffe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926269] [pid:12030,cpu4,frida-server]0000  00000020 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[21171.926300] [pid:12030,cpu4,frida-server]0020  9d010000 fffffff2 00000002 00404100 00000000 00000000 00000000 00000000
[21171.926300] [pid:12030,cpu4,frida-server]0040  5ec20040 fffffff4 5ec20040 fffffff4 00000000 00000000 21f06ecb 00001336
[21171.926330] [pid:12030,cpu4,frida-server]0060  00000000 00000000 d4bd1480 fffffff3 00000001 00000000 00000000 00000000
[21171.926330] [pid:12030,cpu4,frida-server]\x0aX27: 0xfffffff45ec1ff80:
[21171.926330] [pid:12030,cpu4,frida-server]ff80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926361] [pid:12030,cpu4,frida-server]ffa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926361] [pid:12030,cpu4,frida-server]ffc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926361] [pid:12030,cpu4,frida-server]ffe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926391] [pid:12030,cpu4,frida-server]0000  00000020 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[21171.926391] [pid:12030,cpu4,frida-server]0020  9d010000 fffffff2 00000002 00404100 00000000 00000000 00000000 00000000
[21171.926391] [pid:12030,cpu4,frida-server]0040  5ec20040 fffffff4 5ec20040 fffffff4 00000000 00000000 21f06ecb 00001336
[21171.926422] [pid:12030,cpu4,frida-server]0060  00000000 00000000 d4bd1480 fffffff3 00000001 00000000 00000000 00000000
[21171.926422] [pid:12030,cpu4,frida-server]\x0aX28: 0xfffffff45ec1ff80:
[21171.926422] [pid:12030,cpu4,frida-server]ff80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926452] [pid:12030,cpu4,frida-server]ffa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926452] [pid:12030,cpu4,frida-server]ffc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926452] [pid:12030,cpu4,frida-server]ffe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[21171.926483] [pid:12030,cpu4,frida-server]0000  00000020 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[21171.926483] [pid:12030,cpu4,frida-server]0020  9d010000 fffffff2 00000002 00404100 00000000 00000000 00000000 00000000
[21171.926483] [pid:12030,cpu4,frida-server]0040  5ec20040 fffffff4 5ec20040 fffffff4 00000000 00000000 21f06ecb 00001336
[21171.926513] [pid:12030,cpu4,frida-server]0060  00000000 00000000 d4bd1480 fffffff3 00000001 00000000 00000000 00000000
[21171.926513] [pid:12030,cpu4,frida-server]\x0aX29: 0xfffffff29d013b00:
[21171.926513] [pid:12030,cpu4,frida-server]3b00  5ec20000 fffffff4 9d013b80 fffffff2 16fbc05c ffffff82 9d013b60 fffffff2
[21171.926544] [pid:12030,cpu4,frida-server]3b20  16fbc100 ffffff82 20400145 00000000 5ec20000 fffffff4 5ec20000 fffffff4
[21171.926544] [pid:12030,cpu4,frida-server]3b40  ffffffff 0000007f 00000124 00000000 9d013b80 fffffff2 16fbc100 ffffff82
[21171.926574] [pid:12030,cpu4,frida-server]3b60  000dddc8 00000000 fffffff4 00000000 983b29e8 fffffff2 983b2800 fffffff2
[21171.926574] [pid:12030,cpu4,frida-server]3b80  9d013cb0 fffffff2 17341628 ffffff82 1fad1000 ffffff80 000dddc8 00000000
[21171.926574] [pid:12030,cpu4,frida-server]3ba0  9d013bd0 fffffff2 1fbaefff ffffff80 1fbaf000 ffffff80 00000000 00000000
[21171.926605] [pid:12030,cpu4,frida-server]3bc0  1fbaf000 ffffff80 e0451000 0000007f c0000000 0000007f 1fbaefff ffffff80
[21171.926605] [pid:12030,cpu4,frida-server]3be0  abf3e7e8 fffffff2 1fbaf000 ffffff80 5ec20000 fffffff4 1a872c80 ffffff82
[21171.926605] [pid:12030,cpu4,frida-server]
[21171.926635] [pid:12030,cpu4,frida-server]Call trace:
[21171.926635] [pid:12030,cpu4,frida-server]Exception stack(0xfffffff29d013a20 to 0xfffffff29d013b60)
[21171.926635] [pid:12030,cpu4,frida-server]3a20: 0000000000000000 ffffff8217341624 ffffff8218da9218 fffffff2abe1d6c0
[21171.926635] [pid:12030,cpu4,frida-server]3a40: ffffffffffffffd0 0000000000000040 000000000000003f 0000000000000000
[21171.926635] [pid:12030,cpu4,frida-server]3a60: fffffff2abe1d6c0 0000000000000001 0000000000000000 00000000004432c4
[21171.926635] [pid:12030,cpu4,frida-server]3a80: ffffff821aa05000 ffffff821a490c80 ffffff821aa05000 0000000000000001
[21171.926635] [pid:12030,cpu4,frida-server]3aa0: 0000000000000000 fffffff67fcbe252 0000000000000032 fffffff2abe1bd80
[21171.926666] [pid:12030,cpu4,frida-server]3ac0: fffffff2983b29e8 00000000fffffff4 00000000000dddc8 ffffff8219422000
[21171.926666] [pid:12030,cpu4,frida-server]3ae0: fffffff45ec20000 0000000000000124 00000000014000c0 fffffff45ec20000
[21171.926666] [pid:12030,cpu4,frida-server]3b00: fffffff45ec20000 fffffff29d013b80 ffffff8216fbc05c fffffff29d013b60
[21171.926666] [pid:12030,cpu4,frida-server]3b20: ffffff8216fbc100 0000000020400145 fffffff45ec20000 fffffff45ec20000
[21171.926666] [pid:12030,cpu4,frida-server]3b40: 0000007fffffffff 0000000000000124 fffffff29d013b80 ffffff8216fbc100
[21171.926666] [pid:12030,cpu4,frida-server][<ffffff8216fbc100>] pmalloc_protect_pool+0xbc/0xcc
[21171.926666] [pid:12030,cpu4,frida-server][<ffffff8217341628>] security_load_policy+0x544/0x6ac
[21171.926696] [pid:12030,cpu4,frida-server][<ffffff821732f14c>] sel_write_load+0x184/0xaa0
[21171.926696] [pid:12030,cpu4,frida-server][<ffffff8216fc6520>] __vfs_write+0x6c/0x1d8
[21171.926696] [pid:12030,cpu4,frida-server][<ffffff8216fc6320>] vfs_write+0xcc/0x188
[21171.926696] [pid:12030,cpu4,frida-server][<ffffff8216fc9704>] SyS_write+0xb0/0x138
[21171.926696] [pid:12030,cpu4,frida-server]Exception stack(0xfffffff29d013ec0 to 0xfffffff29d014000)
[21171.926696] [pid:12030,cpu4,frida-server]3ec0: 0000000000000003 000000778c6e8600 00000000000dddc8 0000000000000000
[21171.926727] [pid:12030,cpu4,frida-server]3ee0: 0000000000000140 000000778cc0d688 000000778c385c00 000000778c385ba0
[21171.926727] [pid:12030,cpu4,frida-server]3f00: 0000000000000040 4fa457da6c430b40 0000000000000000 ffffffffffffffff
[21171.926727] [pid:12030,cpu4,frida-server]3f20: 0000000000000029 000000000000000d 0000000000000000 0000000000000001
[21171.926727] [pid:12030,cpu4,frida-server]3f40: 0000005e387f19c8 000000778d4baf10 000000778e2ee000 0000007ff40a4900
[21171.926727] [pid:12030,cpu4,frida-server]3f60: 0000000000000003 000000778c6e8600 00000000000dddc8 0000005e3861f12c
[21171.926727] [pid:12030,cpu4,frida-server]3f80: 0000000000000000 000000778cd9a9b0 000000778cdcc510 0000005e3861f0f8
[21171.926757] [pid:12030,cpu4,frida-server]3fa0: 0000005e3861f0f3 0000007ff40a48b0 0000005e3848ce58 0000007ff40a4870
[21171.926757] [pid:12030,cpu4,frida-server]3fc0: 000000778d4baf18 0000000000000000 0000000000000003 0000000000000040
[21171.926757] [pid:12030,cpu4,frida-server]3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[21171.926757] [pid:12030,cpu4,frida-server][<ffffff8216a03bc0>] el0_svc_naked+0x34/0x38
[21171.926757] [pid:12030,cpu4,frida-server]---[ end trace 3053fb5618a9dc77 ]---
[21171.926757] [pid:12030,cpu4,frida-server]SELinux: failed to load policy

@waruqi
Copy link

waruqi commented Jun 28, 2020

I have run setenforce 0 command.

Unable to save SELinux policy to the kernel: Out of memory
{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n    at f._checkAvailable (frida/node_modules/frida-java-bridge/index.js:274:1)\n    at f.perform (frida/node_modules/frida-java-bridge/index.js:190:1)\n    at /internal-agent.js:270:6","fileName":"frida/node_modules/frida-java-bridge/index.js","lineNumber":274,"columnNumber":1}

@cryptax
Copy link

cryptax commented Jan 7, 2022

By the way, I still have this issue.

{"type":"error","description":"Error: Java API not available","stack":"Error: Java API not available\n    at y._checkAvailable (frida/node_modules/frida-java-bridge/index.js:286:1)\n    at y.perform (frida/node_modules/frida-java-bridge/index.js:191:1)\n    at /internal-agent.js:490:6","fileName":"frida/node_modules/frida-java-bridge/index.js","lineNumber":286,"columnNumber":1}
  • It does not help to bind the frida server to /system/bin/pppd
  • It does not help to remount rw system and copy frida server to /system
  • Command setenforce 0 does not change anything. Neither setenforce Permissive.
  • There is no relevant message in dmesg nor in logcat -b crash

With a Java Bridge and Playground, I compiled a long time ago a custom frida server. With that server, I am able to perform frida-ps. I am not able to launch a process frida -U --runtime=v8 -f mypackage -l _agent.js and get "Failed to spawn: need Gadget to attach on jailed Android; its default location is...". I suspect this is because of version mismatch (my old server is not Frida 15.1.14).

So, 2 questions:

  1. I forgot how to compile a Frida server, I remember I had to patch something in the code so as not to get the Java API error. @oleavr do you remember how to do this?
  2. Is there a solution altogether to this issue, without using Java bridge + playground?

Thanks!

@kirin233x
Copy link

03-16 10:18:21.955 13276 13276 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 in tid 13276 (frida-server), pid 13276 (frida-server)
03-16 10:18:21.985 13284 13284 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-16 10:18:21.985 13284 13284 F DEBUG : Build fingerprint: 'HUAWEI/JEF-AN00/HWJEF:10/HUAWEIJEF-AN00/10.1.1.115SP1C00:user/release-keys'
03-16 10:18:21.985 13284 13284 F DEBUG : Revision: '0'
03-16 10:18:21.985 13284 13284 F DEBUG : ABI: 'arm64'
03-16 10:18:21.985 13284 13284 F DEBUG : SYSVMTYPE: Maple
03-16 10:18:21.985 13284 13284 F DEBUG : APPVMTYPE: Unknown
03-16 10:18:21.985 13284 13284 F DEBUG : Timestamp: 2022-03-16 10:18:21+0800
03-16 10:18:21.985 13284 13284 F DEBUG : pid: 13276, tid: 13276, name: frida-server >>> ./frida-server <<<
03-16 10:18:21.985 13284 13284 F DEBUG : uid: 0
03-16 10:18:21.985 13284 13284 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28
03-16 10:18:21.985 13284 13284 F DEBUG : Cause: null pointer dereference
03-16 10:18:21.985 13284 13284 F DEBUG : x0 0000007594fe2f60 x1 0000000000000000 x2 0000005fcd4aa650 x3 0000000000000002
03-16 10:18:21.986 13284 13284 F DEBUG : x4 000000000000013e x5 0000000000000000 x6 0000008013130d10 x7 7362716eff6f606c
03-16 10:18:21.986 13284 13284 F DEBUG : x8 0000007594fe2f60 x9 0000000000000001 x10 0000000000000000 x11 0000000000000004
03-16 10:18:21.986 13284 13284 F DEBUG : x12 00000000000000a0 x13 ffffffffffffffc8 x14 9bb236880695f6d3 x15 0000007fedeba040
03-16 10:18:21.986 13284 13284 F DEBUG : x16 0000000000000001 x17 0000007595b65970 x18 000000759617e000 x19 0000007594fff820
03-16 10:18:21.986 13284 13284 F DEBUG : x20 0000007593410d68 x21 0000000000000000 x22 0000000000000004 x23 0000000000000669
03-16 10:18:21.986 13284 13284 F DEBUG : x24 0000007594f3e880 x25 0000007595455790 x26 0000000000000669 x27 0000007594fe2f60
03-16 10:18:21.986 13284 13284 F DEBUG : x28 0000005fcd1188c0 x29 0000007fedeba4e0
03-16 10:18:21.986 13284 13284 F DEBUG : sp 0000007fedeba4e0 lr 0000005fcd39ea70 pc 0000005fcd3a5a14
03-16 10:18:21.989 13284 13284 F DEBUG :
03-16 10:18:21.989 13284 13284 F DEBUG : backtrace:
03-16 10:18:21.989 13284 13284 F DEBUG : #00 pc 0000000002a0ea14 /data/local/tmp/frida-server
03-16 10:18:21.989 13284 13284 F DEBUG : #1 pc 0000000002a07764 /data/local/tmp/frida-server
03-16 10:18:22.063 1641 1641 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x320 in tid 1641 (system_server), pid 1641 (system_server)
03-16 10:18:22.164 13293 13293 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-16 10:18:22.164 13293 13293 F DEBUG : Build fingerprint: 'HUAWEI/JEF-AN00/HWJEF:10/HUAWEIJEF-AN00/10.1.1.115SP1C00:user/release-keys'
03-16 10:18:22.164 13293 13293 F DEBUG : Revision: '0'
03-16 10:18:22.164 13293 13293 F DEBUG : ABI: 'arm64'
03-16 10:18:22.165 13293 13293 F DEBUG : SYSVMTYPE: Maple
03-16 10:18:22.165 13293 13293 F DEBUG : APPVMTYPE: Unknown
03-16 10:18:22.165 13293 13293 F DEBUG : Timestamp: 2022-03-16 10:18:22+0800
03-16 10:18:22.165 13293 13293 F DEBUG : pid: 1641, tid: 1641, name: system_server >>> system_server <<<
03-16 10:18:22.165 13293 13293 F DEBUG : uid: 1000
03-16 10:18:22.165 13293 13293 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x320
03-16 10:18:22.165 13293 13293 F DEBUG : Cause: null pointer dereference
03-16 10:18:22.165 13293 13293 F DEBUG : x0 ffffffffffffffff x1 0000000000001000 x2 0000000000000005 x3 0000000000000022
03-16 10:18:22.165 13293 13293 F DEBUG : x4 ffffffffffffffff x5 0000000000000000 x6 0000007f6c34d000 x7 0000000000033bee
03-16 10:18:22.165 13293 13293 F DEBUG : x8 0000007f6c46a188 x9 879b7c3354378ef9 x10 00000000000001e5 x11 0000000000000001
03-16 10:18:22.165 13293 13293 F DEBUG : x12 0000007ee560d888 x13 00000000ffff0001 x14 000ac9d72e7b6400 x15 0000181babea9ade
03-16 10:18:22.165 13293 13293 F DEBUG : x16 0000007f6935c810 x17 0000007f692f0f80 x18 00000000c11f4f34 x19 0000007ede84fdc0
03-16 10:18:22.165 13293 13293 F DEBUG : x20 0000007ede84fe68 x21 000000000000012c x22 000000000000012c x23 0000007ede84fdc0
03-16 10:18:22.165 13293 13293 F DEBUG : x24 000000000000012c x25 0000007f6b0b5020 x26 0000000013487048 x27 0000000000000000
03-16 10:18:22.165 13293 13293 F DEBUG : x28 0000000000000001 x29 0000007fcc6a2ac0
03-16 10:18:22.165 13293 13293 F DEBUG : sp 0000007fcc6a2920 lr 0000000000000320 pc 0000000000000320
03-16 10:18:22.165 13293 13293 F DEBUG :
03-16 10:18:22.165 13293 13293 F DEBUG : backtrace:
03-16 10:18:22.165 13293 13293 F DEBUG : #00 pc 0000000000000320
03-16 10:18:24.678 2964 2964 E AndroidRuntime: FATAL EXCEPTION: main
03-16 10:18:24.678 2964 2964 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 2964
03-16 10:18:24.678 2964 2964 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
03-16 10:18:24.684 2667 2667 E AndroidRuntime: FATAL EXCEPTION: main
03-16 10:18:24.684 2667 2667 E AndroidRuntime: Process: com.android.phone, PID: 2667
03-16 10:18:24.684 2667 2667 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
03-16 10:18:24.684 2592 3084 E AndroidRuntime: FATAL EXCEPTION: OllieServiceThread
03-16 10:18:24.684 2592 3084 E AndroidRuntime: Process: com.huawei.systemserver, PID: 2592
03-16 10:18:24.684 2592 3084 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause

@RealMrHex
Copy link

Frida [latest].
Same issue on A71, A52, S22Ultra, NoxEmulator and AndroidStudio X86 Emulator :)
Help plz

@fingeroutt
Copy link

If doing it from Python / in an automated way, make sure pid is not 0 or some other invalid value, as it returns exactly the same error...

@madsu
Copy link

madsu commented Apr 5, 2023

I searched for "Java API not available" and got here, and by reading the code, on my own platform, I solved the problem.
I wrote a post to record it https://bbs.kanxue.com/thread-276755.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests