[New Feature] Android installer

Discuss newly added features or request new features.
Post Reply
hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

[New Feature] Android installer

Post by hugbug » 26 Jul 2015, 23:23

As you may know Android is based on Linux. The universal Linux Installer for NZBGet developed in v15 has shown partial compatibility with Android platform. Similarly to embedded Linux platforms Android lacks many standard command line tools; some of them are used in the universal Linux installer.

The latest testing version v16 can be installed on android using parameter "--nocheck" which disables package consistency verification (which relies on tools not available on Android). The installer must be launched using terminal. Since the executables cannot be run from sdcard the destination must be on system partition.

I will not explain in more details how to get the Linux installer working on Android because there is now an Android installer which makes all the work for you. In short the installation of NZBGet on Android consists of two steps:
  • download and install NZBGet installer app;
  • launch the app and click "Install daemon".
The app downloads NZBGet Linux installer and automatically installs it. The app includes all necessary command line tools lacking on Android. The installation is also made into app-directory. That solves the problem with access to system partition.

This means:
  • easy installation without terminal work;
  • installation doesn't require root access.
For full instructions see Installation on Android.

Please post your feedback in this topic.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 26 Jul 2015, 23:25

What about post-processing and other scripts?
That's the main limitation on Android platform: there is no python for Android. That means most scripts will not work.

Our hope is [PP-Script] MediaCenterPal, a script written in shell and not requiring python. Please post in the script topic to let the author know that you are interested.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 28 Jul 2015, 17:47

Update:
  • the installer app has been updated to work with GitHub downloads area. Buttons "Install latest testing" and "Install latest testing debug" now work. This eliminates the previously required manual download of installer package and simplifies the installation. Installation manual updated as well.

treefiddy
Posts: 2
Joined: 29 Jul 2015, 09:54

Re: [New Feature] Android installer

Post by treefiddy » 29 Jul 2015, 10:41

First of all: Thank you for your hard work.

I just did some testing with my Galaxy S6 using nzbget-android-1.0-testing-r8-bin.apk:

latest testing:
- i could not get any connection to a newsserver (tested 3 different connections and 2 different newsserver/provider, WLAN, mobile data connection) -> Could not resolve hostname, ErrNo111, Connection refused.
- Also not possible to fetch any nzb from nzbindex, no connection possible
- the daemon crashed and i could not stop the daemon, even a reboot did not help. Stopping did not work and starting was not possible

Installation works flawlessly.

Please let me know if i can help you with anything else. Do you need any log files? (lates testing debug?)

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 29 Jul 2015, 11:03

Thanks for testing. I also had errors "Could not resolve hostname" in Android Emulator (no errors on a real device). What helped was the use of IP-addresses instead of DNS-names for news-servers. Please try this.
treefiddy wrote:the daemon crashed and i could not stop the daemon, even a reboot did not help. Stopping did not work and starting was not possible
Daemon never starts on reboot. It's possible that the status shown in the app wasn't correct, it checks for lock-file created/deleted by daemon. It will show status "running" if daemon crashes. I need to improve the check.

Another user has also reported crashes on S6. That can be an incompatibility with 64 bit ARM. I can try compiling specifically for ARM64 to see if it works better.

To debug the crash I need the core-file. Do you have root access (to look for core file)?

treefiddy
Posts: 2
Joined: 29 Jul 2015, 09:54

Re: [New Feature] Android installer

Post by treefiddy » 29 Jul 2015, 11:59

hugbug wrote: To debug the crash I need the core-file. Do you have root access (to look for core file)?
Unfortunately not (company phone protected by Samsung Knox)...

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 29 Jul 2015, 12:12

Update: 1.0-testing-r10:
  • improved daemon status detection.
It now should correct daemon status after crash allowing to start daemon again.

@treefiddy:
Please try with IP of newsserver.

If it crashes again, please install debug version and activate debug logging (option DebugTarget=log). It should print crash info into log, which is by default in /sdcard/data/nzbget/nzbget.log. Then send the log (zipped) to me at nzbget@gmail.com. Thanks.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 29 Jul 2015, 12:22

The core-file is usually created in current directory. May be you'll find it even without root. When using debug version activate option DumpCore. When it crashes look for file "core" or "core.<number>" in "/sdcard/data/nzbget" and subfolders.

Nedle
Posts: 49
Joined: 06 Aug 2014, 10:24

Re: [New Feature] Android installer

Post by Nedle » 12 Oct 2015, 15:15

Only just found this so figured I'd try it out, have been using the nzbget mobile port which you can find on the playstore prior to this.
Also had the "Could not resolve hostname error", using IP-addresses does indeed fix that and I was able to download a few test files.

Didn't get PP-scripts to work tho, set the directory to '/data/data/net.nzbget.nzbget/nzbget/scripts' where the default scripts email and logger where also located. Just added a simple test.sh file, which does basically nothing but echo test to see if it will run. It does show up as a script in the settings menu and I can see it under extension scripts. However even if I set it as a PostScript is it never run. I also can't select it when clicking an individual download and going to postprocess, only the email and logger scripts show up there. I did give it all the neccasary permissions (before this it was not even seen by nzbget), so not sure why it does show up in only some of the settings.

BTW, python does exist for android. I'm running the NZBGet mobile version on my android FireTV for a while now and using the videoSort python scripts to sort the downloaded media. I use python-for-android. NZBGet runs a shell script first which sets the correct paths for python and then calls the python scripts.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Android installer

Post by hugbug » 12 Oct 2015, 19:54

Settings page always loads all scripts from disk. But to be able to select scripts for nzbs or launch them NZBGet must be reloaded after a new script was added to scripts folder.

NZBGet android app is just small control program to launch the actual nzbget daemon. The daemon is controlled via a shell script. The script has an unusual filename libdaemon.so (there is a reason for such naming) but that's a normal shell script which you can edit in a text editor. That script would be a perfect place to put python intialization. After that you might be able to use python scripts without wrappers. Can you test this?

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests