[MOD][FIX] Grorkmod (STABLE|SYSTEMLESS|LOS-Version)

Search This thread

vsrookie

Senior Member
Feb 10, 2011
263
222
Hello.

After many many tinkering and a small hint from @rovo89, finally i can present you the first stable version of the grorkmod.
Added v1.7 LineageOS-Version
Fix for bluetooth
Updated Audio_policy.conf will be copied. Result is a working audio.

Added v1.0 LineageOS-Version
Until the fix is integrated in the Rom, you can use the LOS-Version for a working fm-radio.

The Fix will add the following rights to selinux:
system_app fm_device:chr_file {write, read, open, ioctl}
This is a quick'n'dirty way.

Added v1.1 lite
In this version the fix is the same, but the script dont need an installed superuser. Also it will leave the system untouched.
Ive tested this version with Eragon v4.0 (With Gravitybox as testmodule, guess what... its working. ;) Ive NOT tested if magisks will work properly with banking apps. please do it for me.

Review betaversions
In the past versions i have tried to workaround the problem.
At projectstart i have seen many audit denies. I tried to eliminate them with injecting allows to the sepolicy.
This was a part of the little success i had with the first versions. The other part was to set the classes internally to permissive.
These two components and the "bootprocesshack", in which i changed the sepolicy-binary in root, made the beta versions working.
The problem in the beta version was always, that in some cases the workaround didn't worked. ;)

Stable
After an hint that @rovo89 gave me, i saw the problem in seconds, and.... *FACEPALM*
I've saw the problem and didn't saw it anyway.....
For a reason i don't know (maybe it's just a fault from Elephone or mediathek?) they "forget" to setup the contexts files not correctly.
With this mod i fix the entries in the seapp_contexts and file_contexts.
This is the whole magic.

Installation
    • Wipe Dalvik/Cache
    • Install ROM
    • Install SuperSU
    • Install grorkmod
    • Install xposed
    • then boot to system

Have fun with a fully working ROM!:D

greetings
vsrookie


CREDIT / INSPIRATION
@Chainfire - for his overwhelming work. @rovo89 - for making apps bend like metal
@skeleton1911 - for making his rom and his work
@Mikos - for his setools for android
@Deepflex - for all the work done to our device





Download mod LOS-Version v1.7

Download mod v1.1 lite
Download mod v1.0
Alternative Download


older Versions:


old Projectdescription:

About

This is a solution to get the xposed framework running in enforcing mode AND keep it running after a reboot, dalvik cache wipe and installation of any app.
The main goal is for sure the working xposed framework in enforcing mode, but as we all noticed there are several issues that come with a script that only set the selinuxmode to permissive. That's the second part of this project, trying to not change the behaviour of apps like on stockrom.

Background
As i get the p9000 and installed eragon the first time, i installed the xposed framework as fast as i can and.... everything works? Installed modules and... nothing worked!? I tried some things to get it working, but with everything i tried, i had to take a smear.
Pretty annoying, isn't it?
I took a deeper look into selinux and tinkered.... and tinkered ... and tinkered! :cowboy:
Now i think it's time to share my stuff with this great community and i hope that i will help with my mod.

BEWARE/Disclaimer
If you don't know what selinux is, then i think you have to read a "little bit" about it. (pure linux stuff; non Android)
If you google it, then you find everything you need, to learn more about it. If you don't know what rooting is, then play Angrybirds instead.

Understand this:
SELinux is a abbreviation for Security Enhanced Linux. That isn't just a name, it's the programm.
With this mod you will loose the S in the name.

Please be sure you have made a backup from everything that's important for you.
I've done this mod in all conscience, but I'm not responsable for bricked devices. Realize it! :D

You have been warned! :good:


The idea behind
This mod installs setools binaries to /su/bin, so you use them on terminal with this mod. We need them to inject permissions to the sepolicy binary. The next problem is, that the original sepolicy is compiled into the kernel (rootfs). Thats why it will be overwritten on boot. If you inject permissions manually, they are gone with every reboot. So i wrote a script that injects permissions on boot to a patched (with superkernel) sepolicy binary and copy it to root.

Installing
Now the funny part! :highfive:

What you need
I tested this mod on Eragon v2.8 and Aerom V3.
So you need one of these Roms (i think it will also work on rooted stockrom and Darksense, cause the two three other based on stockrom)
superSu 2.74
xposed framework v85
and of course my mod (see the attachement).

How to
Download everything to your SDCard.
Make sure you have wiped your device, so you can start fresh. (I don't have tried, only to flash this mod.)
Dont reboot. If you reboot, then reboot into recovery again! ;)

Install the rom of your choice. (If you install Eragon v2.8, then be sure to delete the script inside /system/etc/init.d)
Install SuperSu 2.74
Install XposedFramework v85
Install Grorkmod

After this step just reboot. And check if everything is fine.

If not then let me know!


XDA:DevDB Information
Grorkmod, Tool/Utility for the Elephone P9000

Contributors
vsrookie

Version Information
Status: Stable
Current Stable Version: 1.1
Stable Release Date: 2016-09-17
Current Beta Version: 0.94
Beta Release Date: 2016-06-09

Created 2016-06-09
Last Updated 2017-02-17
 
Last edited:

vsrookie

Senior Member
Feb 10, 2011
263
222
Reserved

LineageOS-Versions
v1.7
- FIX for not working audio over Bluetooth.

LineageOS-Versions
v1.0
- FIX for not working FM-Radio

Stockrom-Versions
v1.1 (lite version; systemless)
- reworked the script, so it will run systemless
- init.d support don't implemented in this version
- old grorkmods wil NOT be removed. So you have to install this one from scratch.

v1.0 (STABLE RELEASE!)
- live patching seapp_contexts and file_contexts
- live patching sepolicy binary at flashing time, add some allows were missing
- add init.d support as supposed to be
- disabling old grorkmod versions at flashin time.

v0.94
- live patching sepolicy binary at flashing time.
- works on all stockbased Roms
- Add init.d support, if it is not implemented already (For Stockrom; busybox EXCLUDED; it has to be installed afterwards to /system/xbin).

Minor changes are:
- cleared out Installer

Current issues:
- sometimes it's lost on reboot. Workaround: just reboot another time, or shutdown phone and reboot again.

v0.8
tidied up scripts
changed hook for injecting sepolicy

v0.7
simplified script
fixed an issue if phone shutdown

v0.6
fixed logcat support in scripts.

v0.5
Beta release
 
Last edited:

mangoman

Senior Member
Dec 20, 2006
661
75
ok, thanks. did a quick test with AeromV3. At first gravitybox, app settings, flat color keyboard* worked after a soft reboot. Ebay app also worked.

Then on next soft reboot there was 2 loops of optimizing apps and only gravity worked.
Shut off the phone and restarted, none worked. After what I have read that was expected.

Did a soft reboot in xposed,then loops of android is starting- optimizing app . after third loop i shutdown the phone and restarted. Then xposed did not work. Tried another soft reboot, this time no loop and xposed modules are working and ebay app works.
 

vsrookie

Senior Member
Feb 10, 2011
263
222
ok, thanks. did a quick test with AeromV3. At first gravitybox, app settings, flat color keyboard* worked after a soft reboot. Ebay app also worked.

Then on next soft reboot there was 2 loops of optimizing apps and only gravity worked.
Shut off the phone and restarted, none worked. After what I have read that was expected.

Did a soft reboot in xposed,then loops of android is starting- optimizing app . after third loop i shutdown the phone and restarted. Then xposed did not work. Tried another soft reboot, this time no loop and xposed modules are working and ebay app works.

Hi.

Never tried to softreboot the phone. I will try and report back as fast as i can.
Did you made a clean install? Or dirty flashed the mod?

greetings
vsrookie
 

mangoman

Senior Member
Dec 20, 2006
661
75
clean AeromV3 install. normal reboots do not work

Good I have 3 sim cards on same number the way I mess with my phones.
 
Last edited:

vsrookie

Senior Member
Feb 10, 2011
263
222
Hi.

Tried to softreboot the phone from xposed installer. That don't work, that's sure.

On Eragon normal reboots work. I will test with Aerom soon.

greeting
vsrookie

Sent from my P9000 using XDA-Developers mobile app
 

mangoman

Senior Member
Dec 20, 2006
661
75
ok, will test eragon. It stopped working altogether now on AeromV3 after several soft reboots, shutdowns and normal reboots.
gravitybox seemed to work, but other modules seemed to stop. Disabled gravity but that did not seem to work.

Also the android starting, optimizing app message loops seems random.

Seems better on eragon. Works after normal reboot, and from powered off. Ebay also works.

edit2..
so after installing same apps and some reboots, xposed modules will not function sometimes. A few reboots and this time they came back working.

one app that does not work is amplify, maybe just coincidence but that one seems to brake the other when selected.
 
Last edited:

arlrb

Senior Member
Feb 8, 2011
93
9
ok, will test eragon. It stopped working altogether now on AeromV3 after several soft reboots, shutdowns and normal reboots.
gravitybox seemed to work, but other modules seemed to stop. Disabled gravity but that did not seem to work.

Also the android starting, optimizing app message loops seems random.

Seems better on eragon. Works after normal reboot, and from powered off. Ebay also works.

edit2..
so after installing same apps and some reboots, xposed modules will not function sometimes. A few reboots and this time they came back working.

one app that does not work is amplify, maybe just coincidence but that one seems to brake the other when selected.
Is your edit 2 referring to eragon 2.8?
 

mangoman

Senior Member
Dec 20, 2006
661
75
yes.
3-4 reboots, and not working. 1 soft reboot and they came back.

so seems a luck of the draw when it works after a reboot.
 

arlrb

Senior Member
Feb 8, 2011
93
9
yes.
3-4 reboots, and not working. 1 soft reboot and they came back.

so seems a luck of the draw when it works after a reboot.
Thanks, I'll leave it for now.
I made a backup of my eragon before I did any xsposed stuff, I can install that for eBay etc ...

PS - so I can't install this with xposed already running?
 
Last edited:

vsrookie

Senior Member
Feb 10, 2011
263
222
yes.
3-4 reboots, and not working. 1 soft reboot and they came back.

so seems a luck of the draw when it works after a reboot.
That s not true.... sorry.

I am on aeromv3 right now rebooted around 5 times (normal, not over xposedinstaller).

Everything works as expected. Even with amplify.

Do you use backuped Apps?

Greetings
Vsrookie

Sent from my P9000 using XDA-Developers mobile app
 

vsrookie

Senior Member
Feb 10, 2011
263
222
Thanks, I'll leave it for now.
I made a backup of my eragon before I did any xsposed stuff, I can install that for eBay etc ...

PS - so I can't install this with xposed already running?
Hi.

You have to do a clean install of the Rom of your choice. Install newest supersu and xposed, install this mod.

Everything should work fine.

If it is not so, there is another Problem. Maybe backuped Apps?

Greetings
Vsrookie

PS: if you install Eragon, don't forget ti delete the initd Script.
Sent from my P9000 using XDA-Developers mobile app
 
  • Like
Reactions: arlrb

mangoman

Senior Member
Dec 20, 2006
661
75
yes, strange. At first on eragon it worked with reboots, but after a few of them not so much. Then soft reboots seemed to do the trick.

Right now got amplify working. This time did not enable it in xposed first, but rather ran the app then enabled it in xposed when it asked.
 

Attachments

  • amplif.7z
    1.6 KB · Views: 33

arlrb

Senior Member
Feb 8, 2011
93
9
Hi.

You have to do a clean install of the Rom of your choice. Install newest supersu and xposed, install this mod.

Everything should work fine.

If it is not so, there is another Problem. Maybe backuped Apps?

Greetings
Vsrookie

PS: if you install Eragon, don't forget ti delete the initd Script.
Sent from my P9000 using XDA-Developers mobile app
They say you should flash the framework before installing the installer & modules.
So should I install this after framework but before installer, or after framework & installer?
 

vsrookie

Senior Member
Feb 10, 2011
263
222
yes, strange. At first on eragon it worked with reboots, but after a few of them not so much. Then soft reboots seemed to do the trick.

Right now got amplify working. This time did not enable it in xposed first, but rather ran the app then enabled it in xposed when it asked.
Hi.

Can you give the new version 0.7 a shot?

I had issues if the phone shut down completely. At this point i had also no running xposed anymore.
Fixed this.

Now i can reboot also out of xposed installer.

Greetings
vsrookie

Sent from my P9000 using XDA-Developers mobile app
 

vsrookie

Senior Member
Feb 10, 2011
263
222
They say you should flash the framework before installing the installer & modules.
So should I install this after framework but before installer, or after framework & installer?
Hi.

This order:
wipe
install rom
install supersu
install xposed franework
install mod
boot
install xposed installer
install modules
activate them
restart phone

greetings
vsrookie

Sent from my P9000 using XDA-Developers mobile app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 27
    Hello.

    After many many tinkering and a small hint from @rovo89, finally i can present you the first stable version of the grorkmod.
    Added v1.7 LineageOS-Version
    Fix for bluetooth
    Updated Audio_policy.conf will be copied. Result is a working audio.

    Added v1.0 LineageOS-Version
    Until the fix is integrated in the Rom, you can use the LOS-Version for a working fm-radio.

    The Fix will add the following rights to selinux:
    system_app fm_device:chr_file {write, read, open, ioctl}
    This is a quick'n'dirty way.

    Added v1.1 lite
    In this version the fix is the same, but the script dont need an installed superuser. Also it will leave the system untouched.
    Ive tested this version with Eragon v4.0 (With Gravitybox as testmodule, guess what... its working. ;) Ive NOT tested if magisks will work properly with banking apps. please do it for me.

    Review betaversions
    In the past versions i have tried to workaround the problem.
    At projectstart i have seen many audit denies. I tried to eliminate them with injecting allows to the sepolicy.
    This was a part of the little success i had with the first versions. The other part was to set the classes internally to permissive.
    These two components and the "bootprocesshack", in which i changed the sepolicy-binary in root, made the beta versions working.
    The problem in the beta version was always, that in some cases the workaround didn't worked. ;)

    Stable
    After an hint that @rovo89 gave me, i saw the problem in seconds, and.... *FACEPALM*
    I've saw the problem and didn't saw it anyway.....
    For a reason i don't know (maybe it's just a fault from Elephone or mediathek?) they "forget" to setup the contexts files not correctly.
    With this mod i fix the entries in the seapp_contexts and file_contexts.
    This is the whole magic.

    Installation
      • Wipe Dalvik/Cache
      • Install ROM
      • Install SuperSU
      • Install grorkmod
      • Install xposed
      • then boot to system

    Have fun with a fully working ROM!:D

    greetings
    vsrookie


    CREDIT / INSPIRATION
    @Chainfire - for his overwhelming work. @rovo89 - for making apps bend like metal
    @skeleton1911 - for making his rom and his work
    @Mikos - for his setools for android
    @Deepflex - for all the work done to our device





    Download mod LOS-Version v1.7

    Download mod v1.1 lite
    Download mod v1.0
    Alternative Download


    older Versions:


    old Projectdescription:

    About

    This is a solution to get the xposed framework running in enforcing mode AND keep it running after a reboot, dalvik cache wipe and installation of any app.
    The main goal is for sure the working xposed framework in enforcing mode, but as we all noticed there are several issues that come with a script that only set the selinuxmode to permissive. That's the second part of this project, trying to not change the behaviour of apps like on stockrom.

    Background
    As i get the p9000 and installed eragon the first time, i installed the xposed framework as fast as i can and.... everything works? Installed modules and... nothing worked!? I tried some things to get it working, but with everything i tried, i had to take a smear.
    Pretty annoying, isn't it?
    I took a deeper look into selinux and tinkered.... and tinkered ... and tinkered! :cowboy:
    Now i think it's time to share my stuff with this great community and i hope that i will help with my mod.

    BEWARE/Disclaimer
    If you don't know what selinux is, then i think you have to read a "little bit" about it. (pure linux stuff; non Android)
    If you google it, then you find everything you need, to learn more about it. If you don't know what rooting is, then play Angrybirds instead.

    Understand this:
    SELinux is a abbreviation for Security Enhanced Linux. That isn't just a name, it's the programm.
    With this mod you will loose the S in the name.

    Please be sure you have made a backup from everything that's important for you.
    I've done this mod in all conscience, but I'm not responsable for bricked devices. Realize it! :D

    You have been warned! :good:


    The idea behind
    This mod installs setools binaries to /su/bin, so you use them on terminal with this mod. We need them to inject permissions to the sepolicy binary. The next problem is, that the original sepolicy is compiled into the kernel (rootfs). Thats why it will be overwritten on boot. If you inject permissions manually, they are gone with every reboot. So i wrote a script that injects permissions on boot to a patched (with superkernel) sepolicy binary and copy it to root.

    Installing
    Now the funny part! :highfive:

    What you need
    I tested this mod on Eragon v2.8 and Aerom V3.
    So you need one of these Roms (i think it will also work on rooted stockrom and Darksense, cause the two three other based on stockrom)
    superSu 2.74
    xposed framework v85
    and of course my mod (see the attachement).

    How to
    Download everything to your SDCard.
    Make sure you have wiped your device, so you can start fresh. (I don't have tried, only to flash this mod.)
    Dont reboot. If you reboot, then reboot into recovery again! ;)

    Install the rom of your choice. (If you install Eragon v2.8, then be sure to delete the script inside /system/etc/init.d)
    Install SuperSu 2.74
    Install XposedFramework v85
    Install Grorkmod

    After this step just reboot. And check if everything is fine.

    If not then let me know!


    XDA:DevDB Information
    Grorkmod, Tool/Utility for the Elephone P9000

    Contributors
    vsrookie

    Version Information
    Status: Stable
    Current Stable Version: 1.1
    Stable Release Date: 2016-09-17
    Current Beta Version: 0.94
    Beta Release Date: 2016-06-09

    Created 2016-06-09
    Last Updated 2017-02-17
    7
    Hi!

    Version 0.9 is on the way. This time it will be basically the same as 0.8, which is quite stable.

    The mainfeature is that the patched sepolicy will be created live at flashing time. This is to make sure, that my mod will work on EVERY stockbased Rom till now.
    Another mainfeature is that init.d support, will be added, if it is not implemented already. (busybox EXCLUDED; it has to be installed afterwards to /system/xbin).

    Minor changes are:
    - cleared out Installer

    greetings
    vsrookie

    PS: I'm actually testing v0.9 on Stockrom 20160608 and it works pretty fine.

    PS: v0.94 is out now. Check it out on thr first post.
    Sent from my P9000 using XDA-Developers mobile app
    6
    Hi.

    Last tests for new Version 0.8.

    I changed the hook in which i plant the sepolicy.
    This is much more stable as the way before.

    Its not 100 % already, but i think its on a good way.

    If you like my work please show it with a like (or a beer). ;)

    Thanks guys for your support.

    greetings
    vsrookie

    PS: I havent tested AeromV3 yet. I think i do it tomorrow.
    PSS: A shutdown will shutdown also the mod.... grrr.... please just reboot, then it will work again.
    5
    Hi!

    Added Grorkmod LineageOS-Version 1.0 to the first post.
    This is a fix, for a working fm-radio.

    Just
    - flash it
    - restart system
    - done

    :)
    greetings
    vsrookie
    5
    Added v 1.7
    - Fix for not working "audio over Bluetooth"
    - working trim for sdcard (speedup?)

    Sent from my P9000 using XDA-Developers Legacy app