Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why do i get a Segmentation fault error when i exec "pm" on an android device?

my device:htcg14 rooted

i can exec pm on emulator.

But my device does not work. Before I exec "su",it works fine.

shell@android:/ $ pm
usage: pm list packages [-f] [-d] [-e] [-s] [-e] [-u] [FILTER]
       pm list permission-groups
       pm list permissions [-g] [-f] [-d] [-u] [GROUP]

But when I exec su,then exec pm,i get an error below.Why?

shell@android:/ $ su
su
shell@android:/ # pm
pm
[1] + Stopped (signal)     pm
shell@android:/ # pm
pm
[2] + Stopped (signal)     pm
[1] - Segmentation fault   pm
shell@android:/ # busybox pm
busybox pm
pm: applet not found
[2] + Segmentation fault   pm
1|shell@android:/ #

how can i execute pm? help...

like image 265
android_su Avatar asked Dec 27 '22 18:12

android_su


1 Answers

In your established shell session, either remote or local, ensure the LD_LIBRARY_PATH envar is set:

/ # export LD_LIBRARY_PATH=/system/lib
like image 132
deed02392 Avatar answered Apr 03 '23 15:04

deed02392