Page 1 of 14

[New Feature] Android installer

Posted: 26 Jul 2015, 23:23
by hugbug
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.

Re: [New Feature] Android installer

Posted: 26 Jul 2015, 23:25
by hugbug
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.

Re: [New Feature] Android installer

Posted: 28 Jul 2015, 17:47
by hugbug
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.

Re: [New Feature] Android installer

Posted: 29 Jul 2015, 10:41
by treefiddy
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?)

Re: [New Feature] Android installer

Posted: 29 Jul 2015, 11:03
by hugbug
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)?

Re: [New Feature] Android installer

Posted: 29 Jul 2015, 11:59
by treefiddy
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)...

Re: [New Feature] Android installer

Posted: 29 Jul 2015, 12:12
by hugbug
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.

Re: [New Feature] Android installer

Posted: 29 Jul 2015, 12:22
by hugbug
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.

Re: [New Feature] Android installer

Posted: 12 Oct 2015, 15:15
by Nedle
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.

Re: [New Feature] Android installer

Posted: 12 Oct 2015, 19:54
by hugbug
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?