WeAreFairphone / flashable-zip_microG

Install microG or UnifiedNlp into an Android system, plus an OTA survival addon.d script
https://github.com/WeAreFairphone/flashable-zip_microG/releases
GNU General Public License v3.0
28 stars 6 forks source link

Cannot build ZIP on Ubuntu 18.04 or 19.10 (awk positional specifiers syntax) #4

Open mulles opened 6 years ago

mulles commented 6 years ago

Hope it is okay, to ask question not concerning the Fairphone plattform. As I am using lineageOS as well I run into the same problem as you, as I need to install UnifiedNLP.apk es well through as .zip file.

The prebuild https://github.com/WeAreFairphone/flashable-zip_microG/releases/tag/2018-08-17 does not work when flashing on my nexus 4 ( apps shows app as installed, but I can not open it)

I tried to use build-zip.sh to build for lineages OS 15.1 nexus 4 but the terminal just closes after displaying "Making OTA Survival Script". Their is no ZIP being generated (or it might be in a different folder?)

Any hints

Roboe commented 6 years ago

Hi, thank you for the interest. This project holds no relation with Fairphone devices, other than being hosted under the WeAreFairphone umbrella, which is a very customization-friendly, privacy-oriented community. BTW, I happen to have a Nexus 4 running LOS 15.1 and tested the Oreo build there.

Concerning the impossibility of launching the UnifiedNLP app, this is happening on all devices (see this forum thread). I don't know why it can't be launched normally on Oreo, but you can still access the UnifiedNLP configurations through "Location settings" (tap and hold the notification bar quick-setting for toggling location), and at the bottom (“Location services”) you’ll find an entry for launching it.

About the build process, I've not tested it ouside my Debian Testing machine. Which OS are you running it under? It may break due to incompatibilities. Do you have the xmlstarlet dependency installed?

mulles commented 6 years ago

Thx you so much for quick reply and for building this install zip. I got it running, you where totally correct about how to open the configuration of UnifiedNLP. I manually installed some location backends and configured them in the UnifiedNLP settings and bingo.

Concerning the build process: I have installed xmlstarlett and I am running on Ubuntu 18.04.

As of my understanding this flashable ZIP should work on any device running Lineage OS 15.1 right?

Thx again for providing this, finally after running CM and now LineageOS for 5 years I got network based location working.

Roboe commented 6 years ago

As of my understanding this flashable ZIP should work on any device running Lineage OS 15.1 right?

Exactly.

Thx again for providing this, finally after running CM and now LineageOS for 5 years I got network based location working.

Glad to help other people. I was in your same situation, that's the reason I built this ZIP, :)

Concerning the build process: I have installed xmlstarlett and I am running on Ubuntu 18.04.

I can get an Ubuntu laptop to test the build script there. Will report here then.

mulles commented 6 years ago

Don't bother with the build on ubuntu, it's not important for me right now. And note that this was actually the first time I tried to build a flashable .zip ;) Nevertheless, I would be available for help to get the build running, in case that is important to you.

Roboe commented 6 years ago

A flashable ZIP is not something exotic, in fact. It's just a regular ZIP with a script in a specific path (i.e. META-INF/com/google/android/update-binary).

I'm replacing the build script with a Makefile in another branch (a work in progress), so it will be good to know any compatibility issues to fix them there. People should be able to build their own microG/UnifiedNlp ZIPs too, because they don't need to trust me, my machines, or my ZIPs.

mulles commented 6 years ago

Cool. The communication with you has been a pleasure. And you master to write very clear and use formatting tools available to the best. I will try to copy some of you quality in future. Please keep me updated on the build issue, I love the way you want to make it accessible to the crowd.

Roboe commented 6 years ago

Wow, such kind words. Thank you so much for them. I just try to give the best out of me. I appreciate your attitude too, reaching me and contributing back. This is the open source spirit: humanity & sharing, :)

I've tried a quick build in an Ubuntu machine and stumbled upon the error you stated. It seems to be an awk formatting issue. I'll drop the log here to analyze it in the future.

Xubuntu 18.04 log:

$ ./build-zip.sh 
~~~ Downloading repo indexes
[...]
~~~ Downloading apps
[...]
~~~ Making OTA survival script
awk: run time error: improper conversion(number 1) in printf("%1$s/%2$s.apk
%1$s/%2$s/%2$s.apk
")
    FILENAME="-" FNR=1 NR=1

By the way, I instructed to use source build.sh in the README file, but that was lack of knowledge on the shell in my side. The script is executable and should be executed as that. I'll edit the instructions now.