[Feature Development] Debugging Bridge in Manjaro ARM

Hello all,

To make it easier for everybody to contribute to the development of the PinePhone, and maybe Manjaro ARM in general I would like to create a package which enables a kind of debugging bride (a la Mobian).
In Mobian this used to be a separate package called mobian-dev-tools, which is what I’m aiming for as well.
And maybe with a build flag, to distinguish between Nightly (Unstable) builds and Stable builds, that it will be included in Nightly builds only.
The package will set-up RNDIS initerface which initializes a connection between the PC and the Manjaro-ARM build (PinePhone for instance).
My idea is to start a OpenSSH instance in boot of Manjaro-ARM, for security reasons with a public key login only, so with password login disabled by default.
This means that on first set-up of your device you would need to authorize you public key in Manjaro to make it possible to login.
Please let me know what you think about it and what you would like to see or how you think the implementation could be done better.
In the meantime I will try to create a basic package to build on.

Greetings Jasper

I’m even thinking of submitting the package upstream to Arch-ARM.
Than a wider audience can make use of it.
Currently I’m testing the scripts on my personal Pinehone, on which it is working perfectly so far,
I’ll set up a Github ASAP, and upload a PKGBUILD so more people could test it and comment on this.

1 Like

This is interesting.
Happy to see new contributors joining in.

Looking forward for this app so we can test it out and push it to the official repo.

Thank you for your support and effort towards oss community.

For this I think @philm @oberon and @Strit Can advice.

Is this something like android ADB? For debuging applications? Or something else?

Hello @gibbz,

What I want to achieve is a littlebit similiar to ADB in android indeed.
I think debugging things/taking logs should be made as easy as possible for everybody.
This way I hope as much people can join in the fun Pinephone developing as possible.
The scripts I use have been borrowed from the Mobian project, which already has them included in their images.
I have altered it a littlebit to remove some “Mobian” branding and make it more universal for use in other distros as well.
What the scripts exactly does is create a new network device on the USB0 interface.
A dependency for this package will be dnsmasq, which will be used as a dhcp server for network on the USB0 network device.
When you connect the phone to your laptop/desktop with a usb cable, it will recognize the rndis service which the phone is running for this interface.
To check if this is the case you can do a ‘dmesg’ and check the last output which appeared when pluggin in usb decvice.
The network will initialize upon plugin in as well, and your desktop/laptop will get a IP adress in the range of 10.66.0.1/8.
Currently the Pinephone already has a SSH session running when fresly installed.
Currenty password login for it has been enabled, which I would like to disable and make the Pinephone generate a keypair (pubkey) to use for loggin in to your SSH session. In my opinion this is more safe.
Now when you plugin your USB, you can reach your SSH shell with username@10.66.0.1 , where username can be root, kde or any personal chose username and as password the corresponding password for the accound.
From within this shell you can use commands like dmesg and journalctl to debug things or acquire the neccasary logs for developers to debug certain problems.

Hello everybody,

You can now test the package yourself by cloning my repository on Github.
First you need to make sure git is installed on your pinephone: sudo pacman -S git
A dependency of this package is also dnsmasq, which isn’t installed on Manjaro-ARM by default (at least not on my Plasma Mobile edition), to install issue: sudo pacman -S dnsmasq
Compilation and installation steps are as follows:

  • git clone GitHub - PsychoGame/pinephone-dev-tools
  • cd pinephone-dev-tools
  • make
  • sudo make install
  • reboot the phone and the RNDIS service and usb network should be set-up and running.
    You can check this by pluggin in your Pinephone to your Laptop/PC and check dmesg output.
    If everything went correctly you can now connect to your pinephone using the command: "username"@10.66.0.1

If you would like to remove the package again, just issue:
sudo make uninstall from within the cloned “pinephone-dev-tools” build directory.

Please test the package and let me know how it works for you and if I need to look at some things.
If everything works smoothly I’ll create a PKGBUILD and try to push it upstream
For now the ssh server remains as password login, I’m trying to figure out how to correctly make a keypair for the Host PC only.

Greetings Jasper

Hello everybody,

My package has been uploaded to the AUR.
It can be found over here: (aur.archlinux org/packages/pinephone-dev-tools/)
Please everybody test the package and report back if you encounter any problems.
Also please submit a vote for the package if you like it.
This way the package might find it’s way into the community repository.
I’ve broken the link to the AUR package in 2 parts, as I’m not allowed to post any links

Greetings Jasper

2 Likes