yashsingh1/xdaforums huggingface dataset:
[Magisk] slumslayer:
One of the app I use crash with NanoMod

08-02 16:03:28.682 E/AndroidRuntime(18576): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.android.location.provider.jar", zip file "/system/priv-app/GmsCore/GmsCore.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]] couldn't find "libvtm-jni.so"

This is related to this microg bug : https://github.com/microg/android_packages_apps_GmsCore/issues/19 (see second comment for fix)

If I extract the libs from the apk to /system/lib64, it does indeed work :svetius:

Could you add those libs in NanoMod?
[Magisk] Setialpha:
Actually the installer extracts those libs on it's own and that works on all my devices. What mode (Magisk/System), what Version of NanoMod? What gives

getprop | grep abi
[Magisk] slumslayer:
System mode, 12.0 from 2017-07-23

$ getprop | grep abi
[gsm.baseband.capability]: [503]
[ro.product.cpu.abi]: [arm64-v8a]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: [arm64-v8a]
[ro.product.cpu.abilist]: [arm64-v8a,armeabi-v7a,armeabi]

The file is neither in lib64 nor lib. I've attached the recovery.log, it doesn't mention anything in lib[64]

Can I provide anything else? :)
[Magisk] BrotherZero:
This looks awesome! Thanks for the great work!

I'm a little bit confused though which option do I flash if I want MicroG and F-droid with extended privileges but I don't want Google Play on my phone. I flashed the full install that included Google Play, but I cant remove Google Play now ( I already wiped the phone so I wondered what to flash next time I try NanoMod).
[Magisk] :
Just before flashing nanomod itself you can flash the "setupwizard" in TWRP.

It uses an AROMA installer and let you chose whetet or not to install apps, debloat, yalpstore or pkaystire etc.
[Magisk] demonoidmaster:
You should investigate the app it's referring to and see if you can toggle the accounts permission or such

Edit com.google.android.apps.gcs is actually this here

http://www.apkmirror.com/apk/google-inc/google-connectivity-services/

If this app is on your device, then go to it's permissions and enable the stuff lol
[Magisk] Setialpha:
This already includes the latest beta.
[Magisk] f41lbl0g:
Magisk passes fine without the module though. I think some apps in the module may need to be mounted differently?
[Magisk] Setialpha:
There's only one way to do so, so I can't do anything about it, sadly. On my Moto X Play I get full CTS pass with my module, on my Galaxy Tab 4 "only" basic integrity (which is enough for games like FE Heroes, SMR or PoGo).

Magisk gives you different results under different devices.
[Magisk] facuarmo:
Thanks for the module Setialpha. In my device, with package spoofing enabled and everything set up I found out that CTS is completely dead.

ROM: crDroid v2.5.

Excepting that, the module is completely awesome. I love how my phone flies like if nothing were loaded (while almost 30 apps actually are).
[Magisk] Setialpha:
You may need to install DroidGuard Helper as user-app, see "Issues" in first post. With Magisk Hide it should at least pass basic integrity. But your's even fails before that, so I assume your affected by Magisk Bug #155.
[Magisk] Setialpha:
on-device framework-patcher

I have created a first try of an on-device framework-patcher (read: no more pc/laptop required to patch framework for use with microG - that is: if it works on your device).

To quote myself from https://github.com/Lanchon/haystack/issues/5

Ah... about the speed: on my Galaxy Tab 4 that process takes about 3 - 4 Minutes, on my Moto X Play it also takes about 3 Minutes. Quite speedy this dexpatcher thingy. ?

Another note: the framework-patcher is able to install the patched services.jar into three places:

NanoMod Magisk Module (if it's installed)

NanoMod microG Module (if it's installed)

directly into /system/framework (fallback)

Edit: I uploaded a flashable zip to the download directory (see first post for link).

2nd Edit: updated instructions since I've re-written the on-device framework-patcher in many parts
[Magisk] Setialpha:
I just commited the following to the github repository:

re-write many parts of on-device framework-patcher:

* workaround faulty LD_LIBRARY_PATH on ****ty TWRP builds
* merge framework-patcher into update-binary
* full dexpatch and zip output visible to user
* actual error handling and exiting upon error

updated instructions one post back. There's also an updated on-device framework-patcher on afh.
[Magisk] facuarmo:
Wow, you're awesome. Successfully did that and it's working fine. Thanks, really.

BTW, the path of the file is:

/system/priv-app/DroidGuard/DroidGuard.apk

For other users, please note that it's not required to reboot your smartphone after doing this.
[Magisk] slothdabski:
I tried us8ng updated on device patcher on RR 7.1.2 for OP3. Got error 1 in twrp when flashing. Log is attached

---------- Post added at 01:30 PM ---------- Previous post was at 01:29 PM ----------

https://drive.google.com/file/d/0B1My3ELWb01vSlFMbE04NDJUVFU/view?usp=drivesdk

---------- Post added at 01:32 PM ---------- Previous post was at 01:30 PM ----------

I think error may occur BC script says android 4.1-6 detected even though I'm trying to patch nougat
[Magisk] Setialpha:
I already fixed the wrong version detection in the on-device framework-patcher, but there's still one issue remaining to be fixed before another zip drops. I'll drop info in this thread once it's done.

Thanks for spotting that.
[Magisk] Setialpha:
I updated the patcher zip file to 20170415.5. Found in the AFH link from first post. All remaining bugs - as of now - have been fixed. Feel free to try it out.

[MENTION=6864870]slothdabski[/MENTION]
[Magisk] slothdabski:
[MENTION=4187311]Setialpha[/MENTION] this is what I get now

Installing zip file '/sdcard/Download/NanoMod-patcher-20170415.5.zip' Checking for MD5 file... Skipping MD5 check: no MD5 file found I:Update binary zip I:Zip does not contain SELinux file_contexts file in its root. I:Legacy property environment initialized. ******************************** NanoMod 5.2.20171231 Framework Patcher Powered by DexPatcher (@lanchon) ******************************** > Android 7.x detected > preparing environment Archive: /sdcard/Download/NanoMod-patcher-20170415.5.zip creating: dexpatcher/ inflating: dexpatcher/core_services.jar.dex inflating: dexpatcher/dexpatcher.dex inflating: dexpatcher/dexpatcher.jar inflating: dexpatcher/hook_4.1-6.0_services.jar.dex inflating: dexpatcher/hook_7.x_services.jar.dex > patching services.jar << this might take a few minutes, << depending on your device's power >> applying hook patch !! dexpatcher failed !! zip failed !! zip failed >> applying core patch !! dexpatcher failed !! zip failed !! zip failed << installing services.jar to: NanoMod (microG) >> clean up > Done! Thanks for using NanoMod I:Updater process ended with RC=0 I:Legacy property environment disabled. I:Install took 1 second(s). Updating partition details... I:Data backup size is 499MB, free: 14026MB. I:Unable to mount '/usb-otg' I:Actual block device: '', current file system: 'vfat' ...done I:Set page: 'flash_done' I:operation_end - status=0 I:Set page: 'clear_vars' I:Set page: 'main2' I:Set page: 'advanced' I:Set page: 'copylog' I:Set page: 'action_page' I:operation_start: 'Copy Log' I:Copying file /tmp/recovery.log to /data/media/0/

---------- Post added at 04:46 PM ---------- Previous post was at 04:37 PM ----------

https://drive.google.com/file/d/0B1My3ELWb01vRDJkSmI4MkxublE/view?usp=drivesdk
[Magisk] Setialpha:
OK, please try again with 20170415.7 which adds a check whether device is arm64.

Edit: or wait until tomorrow, so I can test on an arm64 device myelf.
[Magisk] slothdabski:
im about to try it! THanks for the quick updates!!! :)

---------- Post added at 07:30 PM ---------- Previous post was at 07:06 PM ----------

@Setialpha

It works!!!!! :))))

---------- Post added at 07:30 PM ---------- Previous post was at 07:30 PM ----------

@Setialpha

It works!!!!! :))))
[Magisk] facuarmo:
Just found another bug, gallery never starts.

ROM: crDroid.

NOTES: every other gallery app works as expected, such as QuickPic.
[Magisk] Setialpha:
I can't feproduce that issue. Did you grant storage permission to the Gallery? Else I need a logcat.
[Magisk] f41lbl0g:
I'm running crdroid and my gallery app works fine. Maybe it's a Rom bug of the build you are using. Try clearing cache/data of gallery.
[Magisk] candiesdoodle:
Could someone who has a fully functional setup with access to google play store, confirm that they are getting the option to install these two apps:

https://play.google.com/store/apps/details?id=com.snapwork.hdfc&hl=en

https://play.google.com/store/apps/details?id=com.enstage.wibmo.hdfc&hl=en

I always use to get "app not compatible with your phone..." when i used microg last time

very excited with this module but want to confirm the above two
[Magisk] slothdabski:
I am using microg and can install those apps
[Magisk] candiesdoodle:
thanks a ton for the confirmation. May i ask which Rom and kernel you use on your OP3?
[Magisk] AcRs:
Hi everyone, I'm a bit clumsy and because I've been investigating how nanomod is installed. (Patcher, microg, fdroid, if its compatible w f2fs)

If for example I only want playstore in my device on a clean flash is this te correct way??

1 Flash rom

2 Flash kernel

3 Flash Magisk

And ...?

Cheers guys
[Magisk] BrotherZero:
Thanks for that!

Just one more question. What does the "Init Scripts" option do?

EDIT: I'm a bit confused. I just used the setupwizard to only instal MicroG and F-Droid (and "Init Scripts") but there is no MicroG (or F-droid) on my device after reboot.

And when am I supposed to flash the "NanoMod-patcher"?

TIA

EDIT 2: I managed to get MicroG working by first flashing the NanoMod-patcher, then the setup wizard and only chosing MicroG (although I have no clue if that was a necessary step) and then just install the MicroG apks manually. But no clue what I actually did or which steps was superfluous.
[Magisk] :
The setup wizard only creates a config file. You have to flash the standard micro G package afterwards.

The patcher shall be run after you boot in the ROM for the first time.

Don't know what the INI scripts do though ...
[Magisk] Setialpha:
12.1-beta1

The first beta of version 12.1 is now available. Highlights since version 12.0

Include Orbot and Orfox

(hopfuly) fix the bug that nanomod_libs installer routine fails to install libs in a few cases

since people don't read the docs, tell them to flash another NanoMod package after flashing the SetupWizard

Full ChangeLog since 12.0

* Bug Fixes
* Full, microG, F-Droid packages:
* make `nanomod_libs` installer routine (hopefuly) more robust
* General Changes
* Full, microG packages:
* merge all nanomod-overlay sub-scripts into the main script
* SetupWizard:
* print Yet Another Message™ that the SetupWizard is *only* the SetupWizard (and that they need to flash another package afterwards, also: did I say people should read the docs?)
* New
* Orbot (15.4.1-RC1)
* Orfox (1.4-RC2)
* Updates
* Anysoft Keyboard (1.8.1333)
* Substratum (815)
* Yalp Store (0.21)
* Odyssey (1.1.6)
* OpenKeychain (4.5)
* Play Store (8.1.25.S)
* GNU Nano (2.8.6)

Download from AFH.

In case of errors, please provide

your device's architecture

your device's Android version (not ROM version)

whether installed as Magisk Module or in System Mode

used Magisk version

recovery.log or logcat or both (whatever is applicable)

You should read the Documentation, which btw. is linked in first post. It mentions *everything*. What's included in the packages, how to install, how to setup, ...
[Magisk] Setialpha:
Documentation > Installation

Documentation > Details > NanoMod > Init Scripts
[Magisk] BrotherZero:
Thanks for those most useful links, and apologies for somehow missing them in the op.
[Magisk] droiduin:
Same here. How does one install the various parts as Magisk modules? I tried to install the NanoMod-patcher via the Magisk Manager but it fails with "Could not detect dalvikvm architecture". Am I supposed to flash the zip via TWRP? If so, how can I ensure that it's indeed installed as a Magisk Module and not directly into /system? If I just flash it via TWRP it doesn't show up in the Magisk modules list.

Cheers
[Magisk] slumslayer:
Unfortunately, the install now fails on installing libs :(

recovery.log :

chmod: /dev/tmp/NanoModmicroG/system/bin/unzip.arm: No such file or directory
<< installing microG
dir: /dev/tmp/NanoModmicroG/system/app/nlpBackendIchnaea > /system/app/
!! installing libs failed
Updater process ended with ERROR: 1
I:Legacy property environment disabled.
I:Install took 2 second(s).
[Magisk] marcdw:
The patcher should be flashed in TWRP. ROM is then patched to provide signature spoofing. It's not some kind of app or module you use within a running ROM.

LG G3 D851, LiquidSmooth v4.1 ROM, MultiROM, Tapatalk 4.9.5
[Magisk] ShapeShifter499:
I never installed this app, why is it here? I can only guess that it was installed for Google Play store but I don't know why exactly. Also the app settings do not allow me to grant the app any permissions. Here is a screenshot: http://imgur.com/2wnRRKa I can't even select the permissions view.
[Magisk] Oswald Boelcke:
The whole installation or better flashing process/procedure is very well describe in the Nanomod Readme that is linked in the OP.

It also describes if and when Nanomod is installed as a Magisk module and not to /system.

Nanomod patcher is never a Magisk module. Please read the readme.
[Magisk] droiduin:
Well, I did several times, but obviously it wasn't as clear to me. For instance:

It doesn't unambiguously say that some parts are not installable as Magisk modules. "NanoMod" could mean NanoMod the Magisk Module or NanoMod the project (and all its components).

This indicates that at least NanoMod as a whole and the microG component are available a Magisk modules but this part also doesn't say how to install the patcher for the different modes, or that you just need to flash it for all modes.

That said, does this mean that one has to flash the patcher again after each ROM update, like manual patching via Needle/Haystack? Or let me ask the other way round: if I want the patcher as (part of) a Magisk module (to avoid reflashing on mod update) with the most minimal NanoMod installation possible, am I right that I at least have to install the NanoMod-microG Magisk module as well?

Thanks
[Magisk] Oswald Boelcke:
Affirmative but I guess that isn't a big deal.
[Magisk] droiduin:
I see, thanks. The whole point of wanting to use NanoMod as a Magisk module for me, though, is to avoid just that. Could you please take another look at my previous post that I updated in the meantime? The final sentence/question is the essence.

Thanks!
[Magisk] Shadow53:
A number of ROMs bundle that app. I usually remove it, since I see no use for it. I'm sure it wasn't from NanoMod, though.
[Magisk] Oswald Boelcke:
If you use (what I don't do) the "complete" Nanomod module you don't need the microG module as it comes with the complete package.

Affirmative, if you want to use the microG services you are definitely required to flash the Nanomod-microG module. If during the flash Magisk is recognised it's automatically installed as a Magisk module; otherwise to /system.

From my understanding, the patcher isn't a Magisk module as it only manipulates two files of the ROM.

My best practise when (even dirty) flashing a ROM update is to take my Nandroid backup, wipe dalvik and cache (if clean flash also /system and /data), flash ROM, (if required flash kernel, what's the case for me), flash Magisk (currently v13.3), (unless you have already a .nanomod-setup file, flash the Nanomod-setup Aroma installer with your desired settings), flash Nanomod-microG (don't take me for granted but I believe a previously flashed Nanomod-microG Magisk module doesn't "survive" the re-flash of Magisk before; I might be wrong as I actually don't know because I always use the here described procedure. Reboot into system, and back into TWRP. Flash the Nanomod-patcher (patcher is independent from the mode you're using Nanomod). Reboot into system.

This thread by me might be useful or interesting, don't know?
[Magisk] ShapeShifter499:
This is a official build of LineageOS 14.1 Nightly., I was under the impression it was Google free unless you flashed in Google apps. Should be ok to remove? I don't want this affecting apps that I want to have GPS access.
[Magisk] Setialpha:
In the Installation instructions it says to boot into TWRP for installation. Flashing through Magisk Manager might work, but doesn't have to, as the NanoMod Installer(s) are different from others.

The Patcher is not a Magisk module, it just installs to a Magisk Module or System, if none (matching) found.

I revised the README sections #Packages and #Installation to be more clear.
[Magisk] Setialpha:
That's actually supposed to happen, instead of just failing silently. Of course it shouldn't fail at all. Flashing through Magisk or TWRP? What gives

ls /dev/tmp/
ls /dev/tmp/NanoMod*/
unzip --help

after flashing from TWRP?
[Magisk] droiduin:
Thanks, that's what I figured. I'm familiar with microG in general as I used it with CM13 and Xposed before. Now I'm looking for a substitute based on Nougat as CM13 (e.g. sultan's) isn't maintained anymore. Since the NanoMod patcher isn't persistent across updates and the NanoMod microG module already installs more than I like, I probably look elsewhere (a mod already patched for microG).

Thanks guys
[Magisk] slumslayer:
I'm flashing from TWRP, system mode.

From TWRP Terminal :

~ # ls /dev/tmp/
NanoModmicroG
~ # ls /dev/tmp/NanoMod*/
ChangeLog.md README.md swipe
META-INF module.prop system
~ # unzip --help
BusyBox v1.22.1 bionic (2017-03-17 23:28 +0800) multi-call binary.

Usage: unzip [-lnopq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR]
...

In /dev/tmp/NanoMod*/system/bin

~ # ls /dev/tmp/NanoMod*/system/bin
aapt.arm bash.bin.x86 column.x86
aapt.x86 bashbug.arm nanomod-overlay
bash bashbug.x86
bash.bin.arm column.arm
[Magisk] Setialpha:
Fixed in git repo. **** happens when one rewrites the build script...
[Magisk] Oswald Boelcke:
Check shadow53's or ale5000's site/thread.
[Magisk] gimpy1:
For some reason, I cannot download the latest beta link from AHF. There is s lock and an https in the URL. Is that keeping me out?

I am on the latest version of nanomod and have tried several different times since yesterday to download the beta version.

NVM. Got it to working. I think it had to do with my browser, KLAR. I uninstalled it and used lightning, instead. Downloaded just fine.
[Magisk] Shadow53:
It's an app meant to help with connecting to WiFi networks, as I understand. I have no issues after removing it, so you should still be fine. I'd recommend sticking with disabling it in Settings unless you want to write an addon.d script to remove it on every update - otherwise it will come back.

As a sort of side note, I've been working on a program that makes it easy to build zips for installing/removing files and apps. I can send you a small zip built from it to remove GCS and any other apps you want removed, or give you instructions on how to use it (more as a test for me than to help you). Or I think NanoMod might have an option for hiding it with Magisk - that pseudo debloat option. I don't actually use it, I just lurk around microG related threads :silly:
[Magisk] Setialpha:
If you provide a simple list of files (1 per line, no directories) to replace, I may provide a script to create a Magisk pseudo debloat module from it.
[Magisk] gimpy1:
In the " alter installation" configuration, the first line is to install ".nano-setup" in the sd card. Is the "." (dot) supposed to be there? When i try to add that folder, I am never successful and thought it might be because of the dot.
[Magisk] slumslayer:
I've built a package from git to test it out, but it still fails when installing libs :/ . The setup does not say what went wrong, but on the good side, it doesn't complain about unzip anymore so this part is fixed :)

...
inflating: .nanomod-setup
> Config | nanomod-setup | fallback
> Config | nanomod-overlay | fallback
> Mode | System | detected

<< installing microG
dir: /dev/tmp/NanoModmicroG/system/app/nlpBackendIchnaea > /system/app/
!! installing libs failed
Updater process ended with ERROR: 1
I:Legacy property environment disabled.
I:Install took 2 second(s).
Error installing zip file '/external_sd/Download/Roms/NanoMod-microG-12.1.99999999.zip'
[Magisk] Setialpha:
Really fixed now.
[Magisk] Setialpha:
Yes, but that's not a folder, but a file, which is called .nanomod-setup the '.' means "hidden file" on unixoid operating systems. You can also use the Setup Wizard instead of manually creating the file btw.
[Magisk] demonoidmaster:
Seems it's a system app (hence why you can only disable but not uninstall)

As for permissions, use an app like AppOps or if you've got a rom that's got Privacy Guard use that (go to Privacy Guard's list of apps, find gcs and press&hold till the permissions page opens, then select what you can.)
[Magisk] slumslayer:
It works! :victory:

Thx !! :good::good:
[Magisk] demonoidmaster:
I'll just zip him a debloat zip with the app added to it however if there are apps he wants to keep he's gonna have to extract the zip, edit the addon.d script and the updater-script file to remove the lines of certain apps he doesn't want removed from /system and then rezip the META-INF and system folders back up
[Magisk] demonoidmaster:
Here you go added gcs to the list of already added apps that get removed, if you wanna edit it to keep certain apps ask me about it (gimme a list of apps you find in the updater-script file you'd wanna keep and I'll make the changes for you)
[Magisk] Setialpha:
12.1

Version 12.1 is now available. Highlights since 12.0:

Bug fixes regarding library installation in microG and F-Droid packages

When an error occurs in Magisk Mode installation, a full clean-up is performed

The Documentation was improved

Included Orbot/Orfox

Full ChangeLog since 12.0

* Bug Fixes
* Full, microG, F-Droid packages:
* make `nanomod_libs` installer routine actually fail, when an error occurs
* filter out error code 11 (apk does not have libs to install)
* when an error occurs in Magisk Mode installation perform cleanup when `error` is called
* run Magisk's `recovery_cleanup` to ensure TWRP is in usable state (without reboot)
* remove partially installed Magisk Module
* unmount Magisk image
* shrin Magisk image's size
* microG, F-Droid packages:
* fix that `unzip` was not bundled
* General Changes
* Full, microG packages:
* merge all nanomod-overlay sub-scripts into the main script
* SetupWizard:
* print Yet Another Message™ that the SetupWizard is *only* the SetupWizard
* on-pc framework-patcher:
* update hook patch name to reflect Haystack update
* if Haystack repo is already downloaded, update it, instead of re-cloning it
* New
* Orbot (15.4.2-RC1)
* Orfox (1.4-RC2)
* Updates
* Anysoft Keyboard (1.8.1333)
* Substratum (815)
* Yalp Store (0.21)
* Odyssey (1.1.6)
* OpenKeychain (4.5)
* Play Store (8.1.25.S)
* GNU Nano (2.8.6)
* Lightning (4.5.1+snapshot20170806)

Download from AFH.

In case of errors, please provide

your device's architecture

your device's Android version (not ROM version)

whether installed as Magisk Module or in System Mode

used Magisk version

recovery.log or logcat or both (whatever is applicable)
[Magisk] kurtn:
Hi Droiduin,

i was in the same situation. Xposed FakeGapps worked fine for me on Marshmallow. Meanwhile there are several options for Nougat.

-There is a Xposed Nougat WIP. Not stable but kind of OK for LineageOS.

-More and more ROMs have the Patch index

-My solution: I only use the NanoMod-patcher, but not the NanoMod app collection on LineageOS. I have a automate flow running, that automatically re-flashes the patcher when necessary. I do weekly OS updates.