[Galaxy Grand Duos i9082 Android Development] AhmedAhmedEG:
See guys,this problem is becouse google released an update for an utility in android studio named "build tools" which it simply used to compile apks after programing them which was using and somthing that casues this problem so google after that releases an update which it's version number is 27.0.1 that fixed this problem so i was reporting about this to all devs their apps bootlooped the rom one of them is bomp squad dev as he updated his build tools and now its working so we have to report so here is a formal email to send guys that have every thing explained just replace "app name" with the app that you report about and hopfully when they see many people reporting they would update their built tools and let's start with facebook and instagram send them this message after editing it from changing "app name" to making grammer better:-

Hi, i just was reporting about a critical bug that "app name" causes a bootloop in all CyanogenMod/LineageOS Roms that are android marshmallow or less and i will explain the cause in detail i installed an android marshmallow custom rom in my phone which ported From lineageOS and lineageOS is an upgraded version of an old one named CyanogenMod, so now after i downloaded "app name" and it get installed for some peaple the phone go into bootloop immediatelyand for onthers all google apps plus playstore it self crashes in one time and after the phone back to normal and when i tried to open "app name" my phone restarted and every time i try to open "app name" it restart so this problem happens to not only me but all peaple that have installed an custom rom that ported from CyanogenMod Or LineageOS that are android marshmallow or less and this happens becouse of building utility in android studio named 'appt2" and an fully description for this bug in detail in this issue tracker link in comment 22:-

https://issuetracker.google.com/issues/64434571

"CyanogenMod has this function getPkgName (https://github.com/CyanogenMod/andr...lob/cm-13.0/libs/androidfw/AssetManager.cpp). It creates a ResXMLTree on the stack and points it at a buffer from an asset without making a copy. Then it closes the asset before the ResXMLTree is destroyed.

For apps built by aapt, this is benign. However, aapt2 produces UTF-8 string pools, which cause the ResXMLTree's ResStringPool(mStrings)'s mCache to become non-null in ResStringPool::stringAt (https://github.com/CyanogenMod/andr...ob/cm-13.0/libs/androidfw/ResourceTypes.cpp). Then ResStringPool::uninit dereferences mHeader (which is now dangling), and a crash ensues.

This crash shows up in different ways. On one Cyanogen OS device, the launcher crashes when an app built with aapt2 has been installed, but only if the manifest is large (probably due to how deallocation happens for small vs large blobs). On another device, system_server crashes at boot if an aapt2-built app is installed.

We're attempting to work around this with a custom build of aapt2 that always produces a UTF-16 string pool for the manifest. Results so far are promising"

So google fixed this problem in appt2 in android studio build tools version 27.0.1 and also if you don't want to update build tools for any reason in comment 19 in the same link above there is a code to write before building the apk to prevent android studio from using appt2 while building the apk so either of two option will fix this problem which they:-

1- update build tools in android studio to version above 27.0.1 as google released an fixed version of appt2

2- use the fix from comment 19 in the link above

"If you need to build with 3.0 but are running into this bug you can disable aapt2 using -Pandroid.enableAapt2=false on the command line when doing your build."