• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][MONTANA][UNOFFICIAL] LineageOS 14.1

Search This thread

kalyansundhar

Senior Member
Aug 22, 2008
300
380
Bangalore

LineageOS 14.1
Lineage-os.jpg


Code:
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */

Prerequisites
Bootloader unlock > HERE
Recovery twrp > squid2 or sevenmaxs

What works
  • RIL (dual sim, volte)
  • WIFI
  • Tethering
  • Camera
  • Bluetooth
  • Sensors
  • MTP
  • Sound
  • Fingerprint
  • NFC
  • MotoActions
  • - - SELinux: enforcing

Todo
  • Fix "Enable on-screen nav-bar" toggling option.

Download
https://www.androidfilehost.com/?w=files&flid=251047 AFH LOS7 Files
https://opengapps.org/ OpenGApps - Choose ARM/7.1/PICO or NANO

Source
Device: https://github.com/kayesk/android_device_motorola_montana
Vendor: https://github.com/kayesk/android_vendor_motorola_montana
Branch: cm-14.1

How to install the rom ?
  • Copy the rom to your G5S.
  • Restart in recovery (squid or Sevenmaxs)
  • Take a backup of existing ROM.
  • Wipe clean (Cache, Data, Dalvik/ART, System)
  • Install ROM.
  • Make a wipe cache.
  • Reboot System.
Initial load would take time.

Contributions :
@GoldeneyeS2 for fixing OEM bloatware, NFC and releasetools script.

THANKS TO :
@squid2 for twrp
@SevenMaxs for twrp
All other users who provided support, valuable suggestions and productive comments.

Report bugs with proper logcat details.
Device is unrooted. Root using Magisk works.

Thanks
KS
 
Last edited:

gfarina

Member
Sep 9, 2016
7
2
Awesome work! Works fine, no bugs until right now, BUT
one thing about the moto devices that i love, is the moto actions and the moto display, how to keep them?
Have some flashable lib from stock? Can you Add or teach how to use it? I need one hand navigation on the fingerprint sensor.

Thx
 
  • Like
Reactions: GoldeneyeS2

GoldeneyeS2

Senior Member
Mar 29, 2016
139
114
Anyone drop screenshots
Tomorrow I will do. But its just lineage 14.1.
The ROM is based on the stock version. Some services are still from Motorola.

Following bug I found:
The first time you watch a full screen video. You will get a message about it. Portrait modes there is no problem but in landscape you will see a weird thing happening with the message and the video.
 
  • Like
Reactions: lohanbarth

Bjr49000

Member
Oct 30, 2016
35
3
Thanks so much for developping a rom for this device, because not a lot a developper make something for this device contrary to the dev arround the moto g5s plus. And happy new year.
 
  • Like
Reactions: GoldeneyeS2

Doug.97

New member
Jan 2, 2016
3
1
Tomorrow I will do. But its just lineage 14.1.
The ROM is based on the stock version. Some services are still from Motorola.

Following bug I found:
The first time you watch a full screen video. You will get a message about it. Portrait modes there is no problem but in landscape you will see a weird thing happening with the message and the video.


Thank you very much for making a rom for the Moto G5S. Are you aware of the bug in the developer options and Moto Actios does not work? Sorry for any mistake in English.
 
  • Like
Reactions: GoldeneyeS2

kalyansundhar

Senior Member
Aug 22, 2008
300
380
Bangalore
Thank you very much for making a rom for the Moto G5S. Are you aware of the bug in the developer options and Moto Actios does not work? Sorry for any mistake in English.

Yes. I am aware of the issues you mentioned.
@govind1233, I have published kernel code as well https://github.com/kayesk/android_kernel_motorola_msm8937.

Can someone confirm NFC support in this device? Mine is XT1795 (India) and I don't see NFC support.

Also I have one confusion. If I add MotoActions apk to code, will it interfere with CMActions?

Thanks
KS
 

GoldeneyeS2

Senior Member
Mar 29, 2016
139
114
Can someone confirm NFC support in this device? Mine is XT1795 (India) and I don't see NFC support.
KS
I have the XT1794 with NFC. I dont see the nfc in settings.
I also try to get it working.
Maybe its something with settings.apk??? Did you also copy that from the G5???
@kalyansundhar
Are now working building or still copying and pasting? you can better upload your system.img and boot.img to github(extract).
 

govind1233

Senior Member
Aug 17, 2016
978
1,019
New Delhi
OnePlus 7
Yes. I am aware of the issues you mentioned.

@govind1233, I have published kernel code as well https://github.com/kayesk/android_kernel_motorola_msm8937.

Can someone confirm NFC support in this device? Mine is XT1795 (India) and I don't see NFC support.

Also I have one confusion. If I add MotoActions apk to code, will it interfere with CMActions?

Thanks
KS
Thanks bro

---------- Post added at 04:35 PM ---------- Previous post was at 03:35 PM ----------

Yes. I am aware of the issues you mentioned.

@govind1233, I have published kernel code as well https://github.com/kayesk/android_kernel_motorola_msm8937.

Can someone confirm NFC support in this device? Mine is XT1795 (India) and I don't see NFC support.

Also I have one confusion. If I add MotoActions apk to code, will it interfere with CMActions?

Thanks
KS
For Moto actions to work u need proper commits for cmactions
 
  • Like
Reactions: GoldeneyeS2

kalyansundhar

Senior Member
Aug 22, 2008
300
380
Bangalore
I have the XT1794 with NFC. I dont see the nfc in settings.
I also try to get it working.
Maybe its something with settings.apk??? Did you also copy that from the G5???

@kalyansundhar
Are now working building or still copying and pasting? you can better upload your system.img and boot.img to github(extract).

Well, I am doing little bit here and there with whatever limited experience I have.

My main concern now is my lack of understanding on how everything fits in the big picture. And without knowing it if I make some change that shouldn't be screwing up something which works fine.

I think it is better for me to stop here, so that good developers could take it further. Anyway the repositories are public.

I cannot push system.img to github because of file size limitation. File size is 900MB and allowed limit is 100MB.

I would share it in my onedrive account and publish the link.

Bugs so far:
1) Developer options - Getting selinux permission issue which is blocked by global rule. I don't know how to override a global rule.
2) Moto Actions - Not working.
3) NFC - Getting zygote error related to seapp_context.
Code:
01-02 21:32:58.857  1534  1593 E ActivityManager: android.util.Log$TerribleFailure: Removing process that hasn't been killed: ProcessRecord{ffc4c99 8487:com.android.nfc/1027}
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at android.util.Log.wtf(Log.java:295)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at android.util.Slog.wtfStack(Slog.java:98)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at com.android.server.am.ActivityManagerService.removeLruProcessLocked(ActivityManagerService.java:3419)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at com.android.server.am.ActivityManagerService.processStartTimedOutLocked(ActivityManagerService.java:6611)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at com.android.server.am.ActivityManagerService.-wrap13(ActivityManagerService.java)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at com.android.server.am.ActivityManagerService$MainHandler.handleMessage(ActivityManagerService.java:1895)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at android.os.Handler.dispatchMessage(Handler.java:102)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at android.os.Looper.loop(Looper.java:154)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at android.os.HandlerThread.run(HandlerThread.java:61)
01-02 21:32:58.857  1534  1593 E ActivityManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:46)
01-02 21:32:58.872  8500  8500 E SELinux : seapp_context_lookup:  No match for app with uid 1027, seinfo default, name com.android.nfc
01-02 21:32:58.873  8500  8500 E SELinux : selinux_android_setcontext:  Error setting context for app with uid 1027, seinfo default: No such file or directory
01-02 21:32:58.873  8500  8500 E Zygote  : selinux_android_setcontext(1027, 0, "default", "com.android.nfc") failed
01-02 21:32:58.873  8500  8500 F art     : art/runtime/jni_internal.cc:492] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:631: selinux_android_setcontext failed
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422] Runtime aborting...
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422] Aborting thread:
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422] "main" prio=5 tid=1 Native
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   | group="" sCount=0 dsCount=0 obj=0x73784268 self=0xa5a05400
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   | sysTid=555 nice=0 cgrp=default sched=0/0 handle=0xa86de534
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   | state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   | stack=0xbe70f000-0xbe711000 stackSize=8MB
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   | held mutexes= "abort lock"
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   kernel: (couldn't read /proc/self/task/555/stack)
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   native: (backtrace::Unwind failed for thread 555: Thread doesn't exist)
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:95)
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:225)
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:853)
01-02 21:32:58.905  8500  8500 F art     : art/runtime/runtime.cc:422]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)

Looks like all 3 issues boils down to selinux, file contexts, uevent permissions.

Thanks,
KS
 

kalyansundhar

Senior Member
Aug 22, 2008
300
380
Bangalore
I have the XT1794 with NFC. I dont see the nfc in settings.
I also try to get it working.
Maybe its something with settings.apk??? Did you also copy that from the G5???

@kalyansundhar
Are now working building or still copying and pasting? you can better upload your system.img and boot.img to github(extract).

Uploaded boot-20180102.img and system-20180102.img to onedrive. https://1drv.ms/f/s!Ahq68S0B7zYZjmVhmIHwvYGoz3gq. Please find it within build_images subdirectory.

Thanks
KS
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33

    LineageOS 14.1
    Lineage-os.jpg


    Code:
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    Prerequisites
    Bootloader unlock > HERE
    Recovery twrp > squid2 or sevenmaxs

    What works
    • RIL (dual sim, volte)
    • WIFI
    • Tethering
    • Camera
    • Bluetooth
    • Sensors
    • MTP
    • Sound
    • Fingerprint
    • NFC
    • MotoActions
    • - - SELinux: enforcing

    Todo
    • Fix "Enable on-screen nav-bar" toggling option.

    Download
    https://www.androidfilehost.com/?w=files&flid=251047 AFH LOS7 Files
    https://opengapps.org/ OpenGApps - Choose ARM/7.1/PICO or NANO

    Source
    Device: https://github.com/kayesk/android_device_motorola_montana
    Vendor: https://github.com/kayesk/android_vendor_motorola_montana
    Branch: cm-14.1

    How to install the rom ?
    • Copy the rom to your G5S.
    • Restart in recovery (squid or Sevenmaxs)
    • Take a backup of existing ROM.
    • Wipe clean (Cache, Data, Dalvik/ART, System)
    • Install ROM.
    • Make a wipe cache.
    • Reboot System.
    Initial load would take time.

    Contributions :
    @GoldeneyeS2 for fixing OEM bloatware, NFC and releasetools script.

    THANKS TO :
    @squid2 for twrp
    @SevenMaxs for twrp
    All other users who provided support, valuable suggestions and productive comments.

    Report bugs with proper logcat details.
    Device is unrooted. Root using Magisk works.

    Thanks
    KS
    12
    It is time to say goodbye. I exchanged my g5s device for Nokia 6.1 plus.

    Journey with g5s was so exciting. With all your help and support, we managed to bring the first custom rom for this device. We managed to come up with tools and procedure to unbrick the device. I thank for all your support.

    G5S is one of the solid device. Unfortunately it is a product of Motorola and we required their mercy to get security updates to the least.

    I wish everyone all the best. Once again thanks for all your kind support. If anyone wants to take over future builds of LOS14.1, please feel free.

    Wish you all a Merry Christmas and a Happy New year in advance.

    Regards
    KS

    Sent from my Nokia 6.1 Plus using Tapatalk
    10
    I am willing to continue development of montana, a.k.a Moto G5S. But since I personally don't have the device, I need fellow contributors and testers. I already have , Reviver Kernel, a build of LineageOS 14.1 (updated from where @kalyansundhar left) and I am starting Oreo bringup for the device. Interested members may join my testers' group on Telegram at https://t.me/montana_reviver . :fingers-crossed: Here's my github: https://github.com/rajatgupta1998

    p6gDr8O.jpg
    YvtwOmv.jpg
    8
    • Video recording - FIXED
    • FIXED another issue with MTP.
    • NFC selinux rules are added - SOMEONE PLEASE VERIFY IF IT WORKS.

    NEW BUILD: lineage-14.1-20171231_060004-UNOFFICIAL-montana.zip
    Link: Same as in topic.

    Thanks
    KS
    7
    New update: https://www.androidfilehost.com/?fid=962339331458999798

    Change log: June 2018 Security Patch.

    Dirty flash should work. If not, try a clean flash. If not, then get back to me.

    Thanks
    KS