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

Error installing frida on Android #22

Closed
matbrik opened this issue May 28, 2019 · 15 comments
Closed

Error installing frida on Android #22

matbrik opened this issue May 28, 2019 · 15 comments

Comments

@matbrik
Copy link

matbrik commented May 28, 2019

Hi, I tried to automatically install frida on the device but it seems not working
I've tried on a Nexus 5 with 5.1 and on a Pixel XL with android 8 rooted with Magisk from Ubuntu
my steps are:
I start Dwarf
select Android
A dwarf USB session window opens with a red bar saying waiting for device and a button install frida
I click on install frida, a series of messages appear
once done on the red bar appears a dropdown menu with 2 entries of Pixel XL
If I try again Install frida more pixel xl entries appear in the dropdown menu
I checked on the device and frida is not running nor installed

@matbrik
Copy link
Author

matbrik commented May 28, 2019

I manually copied the frida binary in /data/local/tmp/ and modified the commands to frida in adb from frida to /data/local/tmp/frida and now it shows correctly the processes and the apps

@PinkiePieStyle
Copy link
Collaborator

should be fixed with
45b2f03

@matbrik
Copy link
Author

matbrik commented May 28, 2019

with the new commit on the terminal which started dwarf once I click the button "install frida" I get "failed to mount /system on device" and the red bar stays hanging with the label "Mounting devices filesystem..."

@PinkiePieStyle
Copy link
Collaborator

make sure in magisk->superuser 'shell' is enabled

@matbrik
Copy link
Author

matbrik commented May 28, 2019

yes it is

@PinkiePieStyle
Copy link
Collaborator

whats the output when u run
adb shell "mount | grep system"
in console

@matbrik
Copy link
Author

matbrik commented May 28, 2019

/dev/block/sda34 on /system_root type ext4 (ro,seclabel,relatime,data=ordered)
/dev/block/sda34 on /system type ext4 (ro,seclabel,relatime,data=ordered)
/sbin/.magisk/block/system_root on /sbin/.magisk/mirror/system_root type ext4 (ro,seclabel,relatime,data=ordered)

@PinkiePieStyle
Copy link
Collaborator

ok so
adb root
adb remount
should work

@PinkiePieStyle
Copy link
Collaborator

or u can try changing in lib/adb.py
line 390
from
res = self.su_cmd('mount -o rw,remount /system')
to
res = self.su_cmd('mount -o rw,remount /dev/block/sda34 /system')

@matbrik
Copy link
Author

matbrik commented May 28, 2019

same error with res = self.su_cmd('mount -o rw,remount /dev/block/sda34 /system')
also adb root does not work because

adbd cannot run as root in production builds

@iGio90
Copy link
Owner

iGio90 commented May 28, 2019

Whats the output of
adb shell su -c getenforce
adb shell su -c mount -o rw,remount /system

@matbrik
Copy link
Author

matbrik commented May 28, 2019

adb shell su -c getenforce --> Enforcing
adb shell su -c mount -o rw,remount /system --> blank line

@iGio90
Copy link
Owner

iGio90 commented May 28, 2019

blank line means success.

adb shell su -c setenforce 0
(Just to be sure)

@iGio90
Copy link
Owner

iGio90 commented May 28, 2019

Try to
adb shell
su
echo test >> /system/xbin/testtttt
rm /system/xbin/testtttt

If it works you can safely copy frida there and chmod a+x it

@matbrik
Copy link
Author

matbrik commented May 28, 2019

adb shell
marlin:/ $ su
marlin:/ # echo test >> /system/xbin/testtttt
/system/bin/sh: can't create /system/xbin/testtttt: No such file or directory

there is no xbin folder in /system/
side question: why are you installing frida in system and not in /data/local/tmp/ ?

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

3 participants