Are adb commands possible on SFOS?

Hey there,

I want to execute adb commands to enable special permissions for an android app.
Is there a way to execute adb command on SFOS?

Thanks!
Best Regards
Philipp

You can use lxc-attach to get a console in the container.

1 Like

devel-su lxc-attach -n aliendalvik /system/bin/sh

Itā€™s not really ā€˜adbā€™, but it is a root shell, so you can do certain things that you could do with adb, like ā€˜pm grant ā€¦permissionā€™, etc. Itā€™s like ā€˜adb shellā€™

I find it useful for navigation bar mod apps and logcat reader appsā€¦

5 Likes

There is an actual adb thatā€™s made for android, and Iā€™ve briefly yested usimg it, but itā€™s not starting. I have a feeling that it couldnā€™t work on Android on SF, probably because of read-only nature of fsā€¦


But anyway, this would not be useful to use on the device you have it installed on. It would be to use your device as if it was a computer, to do adb on another device. If you have an Android device with root access, you can easily uae it to operate adb and fastboot on your SF device. Thatā€™s how I do all of my flashing, ercā€¦

why adb then, ssh it

Iā€™m familiar with adb from years of Android. Not so familiar with sshā€¦

question for you - I have tried to access SF recovery via telnet from android terminal and telnet apps, but always get ā€˜network unreachableā€™ or something like that. I can boot the phone into Jolla recovery no problem, but canā€™t seem to access the recovery when booted. Could ssh do that, or is there something else Iā€™m missing to get through on telnet?

for telnet you should install rndis driver for new device appearing after you insert usb cable to your pc, and setup network connection. Described here: https://jolla.zendesk.com/hc/en-us/articles/360002996893

1 Like

well, then there is a new stuff you can learn.

1 Like

riright, but Iā€™m using an Android phone as a computer

no matter. install termux and feel yourself like a god

1 Like

Ok. So I made an assumption that driver wouldnā€™t install on Android like it would on computer ā€¦ Iā€™ll try it.

ohh, just realized youā€™re trying to connect to sfos recovery from an android device!

yes - thatā€™s my issue. Iā€™ve done it with pc many times, and telnet from Android is no problem, but I havenā€™t figured out how to get it to see that deviceā€¦

We have been flashing sfos from sfos quite some time ago so yes

Thank you for your replies!

I need to execute the following adb commands but with the approaches stated here this should not be possible:

Can somebody help?

answer to your question is on first comment

use terminal in Sailfish to get androud shell, as posted above, and then enter the commands in android shell, (but without the ā€˜adb -d shellā€™ part).

1 Like

Thanks! I think that worked.
The only thing is that the app ā€œCliptoā€ seems not to work. When I copy somehting in another android app Clipto should automaticly create a note with the clipboard content. But nothing happens at the moment.

clipto working fine hereā€¦



Make sure to go into settings and enable clipboard ā€˜runeā€™ā€¦