PurifyOS By-pass PIE

Search This thread

ErnyTech

Senior Member
Oct 9, 2015
272
1,118
Savona, SV
purifyos.it
Google in the update from Android KitKat to Android Lollipop has introduced a new type of restriction that blocks the execution of non-PIE binary.
This block mainly forces the user to copy the binaries he wants to run in /system/bin, /system/xbin, or in /sbin.
This restriction stops executing some apps (also app no-root), this Magisk module disable this restriction.

Who needs this module ?:
This modulr can be useful if you run the following statement while you are running a binary:
Error: only available independent executables (PIE) are supported.

How does the module work ?:
The operation is really simple, I checked the commit of the aosp source to identify the changes made to linker.cc responsible for the PIE restriction and I removed the part of code that blocks the execution of non-PIE binaries then it was enough to compile the linker and create a Magisk module with modified binaries.

Compatibility:
Android 7.1.X (probably also 7.0 but has not been tested)
Architectures: all

Flash in Magisk Manager or TWRP, NEEDED MAGISK 13.1 OR NEWER

The source for now is not available, will be released on the following days (Monday at maximum)
 

Attachments

  • PurifyOS-Bypass-PIE.zip
    1.2 MB · Views: 3,748

Spartacus500

Senior Member
Nov 6, 2014
857
183
Working on Samsung Galaxy S7 edge nougat 7.0
 

Attachments

  • Screenshot_20170805-125217.png
    Screenshot_20170805-125217.png
    53.3 KB · Views: 2,339
  • Like
Reactions: ErnyTech

zentao78

Senior Member
Dec 9, 2016
51
25
Did you try to run a non-PIE binary?

Hi! Small understanding info on my language on net. Its security restrictions for PIE added,removed by Google in different versions of Android. But in newer buidls his add this check,and any modern OS too have it. In two words tell me why i need bypass this sec.system(e.g disable security)? For exploits?

sorry,Eng is not my native lang.
 

ErnyTech

Senior Member
Oct 9, 2015
272
1,118
Savona, SV
purifyos.it
Hi! Small understanding info on my language on net. Its security restrictions for PIE added,removed by Google in different versions of Android. But in newer buidls his add this check,and any modern OS too have it. In two words tell me why i need bypass this sec.system(e.g disable security)? For exploits?

sorry,Eng is not my native lang.
Unfortunately in some roms there are, for example, the Oxygen OS and sometimes also the Lineage. The mod need for users who have to run a binary but its execution is blocked by PIE verification, probably most of the users do not need
 

Herbie_2005

Senior Member
Jan 4, 2012
98
15
Stuttgart
If I use this Magisk module, I cannot take any photo with my camera. Disabling this module, everything is ok again.

I have got a HTC One M8 with LineageOS 14.1.
 

Riyad_

Senior Member
Jan 23, 2015
237
109
Chittagong
is it will work on latest LineageOS 14.1??

Edit :: Yes.! it works :D ...but can u please make a zip for supersu user??it will be really helpful.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Google in the update from Android KitKat to Android Lollipop has introduced a new type of restriction that blocks the execution of non-PIE binary.
    This block mainly forces the user to copy the binaries he wants to run in /system/bin, /system/xbin, or in /sbin.
    This restriction stops executing some apps (also app no-root), this Magisk module disable this restriction.

    Who needs this module ?:
    This modulr can be useful if you run the following statement while you are running a binary:
    Error: only available independent executables (PIE) are supported.

    How does the module work ?:
    The operation is really simple, I checked the commit of the aosp source to identify the changes made to linker.cc responsible for the PIE restriction and I removed the part of code that blocks the execution of non-PIE binaries then it was enough to compile the linker and create a Magisk module with modified binaries.

    Compatibility:
    Android 7.1.X (probably also 7.0 but has not been tested)
    Architectures: all

    Flash in Magisk Manager or TWRP, NEEDED MAGISK 13.1 OR NEWER

    The source for now is not available, will be released on the following days (Monday at maximum)
    1
    Working on Samsung Galaxy S7 edge nougat 7.0