yashsingh1/xdaforums huggingface dataset:
[prjkt.io] vetzki:
I got following crash on a aosp-7.1.1_r9 build if I try to apply a theme

01-05 19:07:39.190 7122 7122 D Masquerade: Running command: "cmd overlay enable android.ModernUITheme com.android.server.telecom.ModernUITheme com.android.chrome.ModernUITheme com.android.documentsui.ModernUITheme com.android.settings.ModernUITheme com.google.android.gm.ModernUITheme com.android.vending.ModernUITheme com.android.contacts.ModernUITheme com.google.android.googlequicksearchbox.ModernUITheme com.android.packageinstaller.ModernUITheme com.android.systemui.statusbars.ModernUITheme com.android.systemui.ModernUITheme com.android.dialer.ModernUITheme com.android.phone.ModernUITheme projekt.substratum.ModernUITheme && sleep 2 && pkill -f com.android.systemui"
01-05 19:07:39.196 7122 7122 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.BufferedWriter.write(java.lang.String)' on a null object reference
01-05 19:07:39.196 7122 7122 W System.err: at masquerade.substratum.util.Root$SU.runCommand(Root.java:56)
01-05 19:07:39.196 7122 7122 W System.err: at masquerade.substratum.util.Root.runCommand(Root.java:20)
01-05 19:07:39.196 7122 7122 W System.err: at masquerade.substratum.util.Helper.onReceive(Helper.java:66)
01-05 19:07:39.196 7122 7122 W System.err: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3055)
01-05 19:07:39.196 7122 7122 W System.err: at android.app.ActivityThread.-wrap18(ActivityThread.java)
01-05 19:07:39.196 7122 7122 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1572)
01-05 19:07:39.197 7122 7122 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
01-05 19:07:39.197 7122 7122 W System.err: at android.os.Looper.loop(Looper.java:154)
01-05 19:07:39.197 7122 7122 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6169)
01-05 19:07:39.197 7122 7122 W System.err: at java.lang.reflect.Method.invoke(Native Method)
01-05 19:07:39.197 7122 7122 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
01-05 19:07:39.197 7122 7122 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
...
01-05 19:08:02.162 12622 12622 W rade.substratum: type=1400 audit(0.0:197): avc: denied { execute } for name="su" dev="rootfs" ino=5467 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:su_exec:s0 tclass=file permissive=0

building and installing works

01-05 19:07:38.419 5165 10981 D SubstratumBuilder: Overlay APK has successfully been installed!

I applied all commits from substratum repo (fb,fn,sepolicy,exactcalculator,phone,...)

"masquerade" is added during build

edit:

selinux issue, with selinux in permissive mode, applying a theme works

edit2:

probably only relevant for phh's superuser, but with this patch it works
[prjkt.io] FSadino:
I need to merge entire repos or just the commits made by substratum team? Most of the since November until now.
[prjkt.io] vetzki:
only the commits from substratum team
[prjkt.io] FSadino:
I was missing some commits and now i review all and its all merged but i have new errors

frameworks/base/libs/androidfw/AssetManager.cpp:765:1: error: version control conflict marker in file
<<<<<<< HEAD
^
frameworks/base/libs/androidfw/AssetManager.cpp:766:20: error: out-of-line definition of 'addSystemOverlays' does not match any declaration in 'android::AssetManager'
void AssetManager::addSystemOverlays(const char* pathOverlaysList,
^~~~~~~~~~~~~~~~~
frameworks/base/libs/androidfw/AssetManager.cpp:795:13: error: no member named 'isSystemOverlay' in 'android::AssetManager::asset_path'
oap.isSystemOverlay = true;
~~~ ^
frameworks/base/libs/androidfw/AssetManager.cpp:807:54: error: no member named 'addOverlay' in 'android::AssetManager::ZipSet'
const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
4 errors generated.
[ 3% 1307/34481] target Java: core-al...RARIES/core-all_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/fsadino/android/LineageOS_14.1'

#### make failed to build some targets (02:52 (mm:ss)) ####
[prjkt.io] sykopompos:
Those shouldn't exist, oms scraps the rro way of handling system overlays being done directly by asset manager
[prjkt.io] vetzki:
cherry-pick "produced" confilcts, fix them

frameworks/base/libs/androidfw/AssetManager.cpp:765:1: error: version control conflict marker in file

<<<<<<< HEAD

probably this commit

7e2f0c7066649044cead61b9c0fff22c081b8c2d

OMS7-N: Integrate OverlayManagerService into framework [3/11]

There's a issue in the source, got also a conflict when picking this
[prjkt.io] BeansTown106:
is this after january security update merge or just when trying to merge oms itself? if when trying to merge oms itself cherrypick this before 3/11

https://github.com/PureNexusProject...mmit/151b3a960faf883e5a75c6da3bff09ee3ac14476

where is your roms source code so i can check it out and be sure

edit: looking at ur error i think u messed up the merge for january security update

Edit2: sorry [MENTION=3445844]vetzki[/MENTION] i meant to quote [MENTION=4315132]FSadino[/MENTION]
[prjkt.io] vetzki:
my source code is on my pc

Dont need a check as it works

Just stumbled yesterday over the same conflict

applied changes to a plain aosp frameworks_base (7.1.1_r9) with no changes at all and ran into the same conflict as FSadino
[prjkt.io] bigo72:
Hey guys, I'm experiencing an UI crash with a theme and the theme developer is asking me to use the crash report share button to send him a log. But I can't share the log that way, because I have no UI when everything explodes. Now, is there a log file I can send to him? I searched this thread without any glue.
[prjkt.io] arc_knight:
Substratum Crashing after applying a theme :(

Cant open Substratum after applying a certain theme. I dont like the theme. Need to change it back. Please help me open Substratum successfully again. :)

and here is the logcat in a zip file.

View attachment 2017-01-06-19-03-31.zip
[prjkt.io] mihran_thalhath:
Flash the rescue zip.
[prjkt.io] arc_knight:
i just got that comment while reading through the post.
[prjkt.io] FSadino:
[MENTION=4395895]BeansTown106[/MENTION]

If I understand well I need to pick that commit. I will try and report

Thanks
[prjkt.io] nathanchance:
No, delete the entire SystemOverlays function like in the 3/11 commit in our repo.

When you get a merge conflict, you should be looking at your untouched file and the resulting file on Github to see what the commit is doing. OMS removes that entire function but it seems that you kept it when resolving the merge.
[prjkt.io] FSadino:
Ok, now i understand. I will delete my entire oms branch from frameworks/based and merge all commits again.

Thanks again
[prjkt.io] vetzki:
no need to delete, just reset --hard to the point before you picked oms commits
[prjkt.io] FSadino:
How can i bypass this?
[prjkt.io] syedquader:
Thanks that helped :)
[prjkt.io] nicesoni_ash:
Make update or try to sync repo again.

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[prjkt.io] vetzki:
either one of the two

To make these errors go away, you have two choices:

1) You can add "@hide" javadoc comments to the methods, etc. listed in the

errors above.

2) You can update current.txt by executing the following command:

make update-api
[prjkt.io] fhem:
[MENTION=6842057]The Flash[/MENTION] I'm confused -- easy for me :D Anyway what's the latest public release??? 519, 522, or 524??? I have lost track over the holidays. :confused:
[prjkt.io] bdwilk:
524. The Flash and all these guys with their big words confuse most of us. Haha. :rolleyes:
[prjkt.io] fhem:
I'm sorry all but I am still confused -- Substratum git shows last public stable release as 513 -- are all subsequent builds (519,522,524) unofficial debug releases. This is what I am trying to understand. [MENTION=3605033]nicholaschum[/MENTION] [MENTION=6842057]The Flash[/MENTION] Sorry for being a PITA on this issue. I'm just an old confused guy :confused::D:good:

EDIT: And the Play Store shows 522.
[prjkt.io] nathanchance:
522 is the latest public release, up to here: https://github.com/nicholaschum/substratum/commit/c1c2bd10d12122ab805973c43d055c355c46244a
[prjkt.io] Yousmass:
Hey guys. Thank you for the good work and an aspiration to make android experience what it always should've been.

I really enjoy this theme engine.

However, there is one feature that is still missing, and I think it could make the whole theming experience much better.

There is no preview when you mess around with theming options, e.g. when you pick an accent color there is no way you could see what you'll end up having. When you choose a nav bar there is no way you could see what is hidden behind a witty name, etc.

So if you could add a preview functionality I guess I won't be the one grateful for such a neat addition!

Keep up the good work and thank you for reading this.
[prjkt.io] fhem:
Thank you sir. That is sorta what I thought but just wasn't sure. Thanks again.:good::good::good:
[prjkt.io] FSadino:
I used option 2 and get more errors... This time is because commit3/11 on frameworks/base again... I have solve all code errors and let it build when I left home, I hope all goes right now.

I'll report back
[prjkt.io] fhem:
[MENTION=6842057]The Flash[/MENTION] Hope you are feeling better -- lots of bad stuff going around , at least here in Pittsbugh. Well I got a new issue w/ Substratum -- All was working good for me on my rom build w/ _r6 -- My latest build _r13 finshes OK , flashes and boots ok. Both Substratum and masquerade get root permission -- themes build cache ok but when I apply the theme it won't finish -- just hangs and goes nowhere -- any Ideas on what might be causing that?? I reset hard and redid all the OMS commits. I am using latest masquerade 20 and I have tried diff vers. of Sub still no love :crying::confused:
[prjkt.io] FSadino:
Its really hard to merge substratum on lineage repos... Is really an adventure for a non developer :)
[prjkt.io] nathanchance:
Log pls? :p

Certainly gives you some git and coding knowledge lol.
[prjkt.io] FSadino:
That's why I'm still attempting to make it work!
[prjkt.io] vetzki:
Do you still get the api error?

also note

https://github.com/LineageOS/android_build/commit/6905f632ef3e7d958c031936d01508567bab65f7
[prjkt.io] FSadino:
T

No, after api-update it continues to build. Now I have other errors related to settings.apk... I'm solving and getting another ones but I'm almost at 90% build so, in my opinion its going well
[prjkt.io] FSadino:
I missed any commit?

packages/apps/Settings/res/layout/condition_card.xml:23: error: Error: No resource found that matches the given name (at 'background' with value '@color/condition_card_background_color').

packages/apps/Settings/res/layout/condition_card.xml:41: error: Error: No resource found that matches the given name (at 'tint' with value '@color/condition_card_icon_color').

packages/apps/Settings/res/layout/condition_card.xml:49: error: Error: No resource found that matches the given name (at 'textColor' with value '@color/condition_card_title_text_color').

packages/apps/Settings/res/layout/condition_card.xml:57: error: Error: No resource found that matches the given name (at 'tint' with value '@color/condition_card_expander_color').

packages/apps/Settings/res/layout/condition_card.xml:76: error: Error: No resource found that matches the given name (at 'textColor' with value '@color/condition_card_summary_text_color').

packages/apps/Settings/res/layout/condition_card.xml:87: error: Error: No resource found that matches the given name (at 'background' with value '@color/condition_card_divider_color').

packages/apps/Settings/res/layout/condition_card.xml:102: error: Error: No resource found that matches the given name (at 'textColor' with value '@color/condition_card_first_button_text_color').

packages/apps/Settings/res/layout/condition_card.xml:113: error: Error: No resource found that matches the given name (at 'textColor' with value '@color/condition_card_second_button_text_color').

packages/apps/Settings/res/layout/gesture_preference.xml:26: error: Error: No resource found that matches the given name (at 'background' with value '@color/gestures_switchbar_color').

packages/apps/Settings/res/layout/storage_summary.xml:29: error: Error: No resource found that matches the given name (at 'textColor' with value '@color/storage_summary_title_color').

nothing matches overlay file suw_navbar_ic_back.xml, for flavor anydpi-v21
nothing matches overlay file suw_navbar_ic_more.xml, for flavor anydpi-v21
nothing matches overlay file suw_navbar_ic_next.xml, for flavor anydpi-v21
nothing matches overlay file suw_progress_bar.xml, for flavor v21
[ 88% 30654/34481] Building with Jack:...e_intermediates/with-local/classes.dex
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/fsadino/android/LineageOS_14.1'

#### make failed to build some targets (01:41:04 (hh:mm:ss)) ####
[prjkt.io] Rawwr:
can someone post the rescue zip for substratum legacy here ? from their device,

substratum didn't made any folder on my device and i'm stuck on bootloop

please help

Edit - found it thanks to shaggyskunk
[prjkt.io] vetzki:
did this commits applied without conflict?

https://github.com/SubstratumResour...mmit/4bff13c67abc02e74aee08978b0c154dcb2153ae (gesture card)

https://github.com/SubstratumResour...mmit/dad0be16388932ee4b97c06ba2bfca5b6871a640 (gesture switchbar)

https://github.com/SubstratumResour...mmit/7d1ed0e804a9dcb55fd56624ae2c0b0e13e73bc5 (storage summary)

how does your res/values/projekt_colors.xml looks like?

edit:

you dont have to clean everytime you start a new build, especially if you get errors like this (dont know if you do that, just wondered why "build counter" [sorry for the inappropriate expression] was >34000)
[prjkt.io] hkjr:
Posted to G+
[prjkt.io] fhem:
Try running this from build dir before starting your build

export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g"
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server
[prjkt.io] gwolfu:
hey guys

I want to build this for a custom Resurrection Remix based ROM, and managed to build masquerade properly while compiling, but am wondering, do I need to apply any specific commits to my build in order to make everything work since for now Substratum reports only legacy support is working even if masquerade seems to be running ok

Note that I did set root permissions and check if masquerade is running
[prjkt.io] mihran_thalhath:
You need to add the oms commits in order to make substratum work. Or else it will be only be legacy.
[prjkt.io] gwolfu:
do I need to apply all commits from https://github.com/SubstratumResources

that will be madness

only Settings app has 27000+ commits

how exactly can this be done in a good and easy manner?
[prjkt.io] mihran_thalhath:
You should cherry pick only the commits of branch n-mr1-oms7.

In the commits for settings app, you can see a commits which is like someone committed with nathanchance. Cherry - pick only those commits. Same applies for frameworks/base, native, sepolicy and apps settings, contacts, phonecommon, exact calculator, dialer.
[prjkt.io] FSadino:
I have all this commits applied without no issues.

I have started all over again since my github was a mess. I'm compiling right now, let's see what happens
[prjkt.io] fhem:
[MENTION=6842057]The Flash[/MENTION] I rebased and reapplied oms commits but still no luck themes will not apply -- stuck in loop after hitting build and apply.

Do either of these errors tell you where I should look to try and fix my issue???

[ 01-08 08:37:57.192 2574: 2574 V/RenderScript_jni ] Unable to load BLAS lib, ONLY BNNM will be supported: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/app/Substratum/Substratum.apk"],nativeLibraryDirectories=[/system/app/Substratum/lib/arm64, /system/app/Substratum/Substratum.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]] couldn't find "libblasV8.so

[ 01-08 08:37:57.606 2574: 3776 E/AndroidRuntime ] FATAL EXCEPTION: RSMessageThread Process: projekt.substratum, PID: 2574 android.support.v8.renderscript.RSRuntimeException: Fatal error 4097, details: Allocation::Allocation, alloc failure at android.support.v8.renderscript.RenderScript$MessageThread.run(RenderScript.java:1299)

As always thanks for the help.
[prjkt.io] FSadino:
Thank you all for help, I have now successfully merged all substratum repos to my custom ROM.

Just one last question, if I add masquerade to my build, themes doesn't apply but without masquerade all runs perfect... I'm confused
[prjkt.io] ThommmF:
I don't find it either. There is an empty folder `/storage/emulated/0/.substratum/` but not a directory called "substratum" without the dot.

I use substratum legacy on OPO Slim7.
[prjkt.io] Rawwr:
download the zip files posted here

and create a folder 'substratum' or anything you want to and flash the rescue zip
[prjkt.io] vetzki:
maybe you get also selinux denials, could be the same or similar problem I had
[prjkt.io] FSadino:
How did you solved? i already add oms7 commits to my system/sepolicy

Thanks again for your help
[prjkt.io] vetzki:
I needed additional changes because of usage of phhhs superuser. (I added rules for platform_app)

And as cm/lineageos uses their own su implementation I bet its a selinux issue (platform_app cant get su rights.)

This was the error

01-05 19:07:39.190 7122 7122 D Masquerade: Running command: "cmd overlay enable android.ModernUITheme com.android.server.telecom.ModernUITheme com.android.chrome.ModernUITheme com.android.documentsui.ModernUITheme com.android.settings.ModernUITheme com.google.android.gm.ModernUITheme com.android.vending.ModernUITheme com.android.contacts.ModernUITheme com.google.android.googlequicksearchbox.ModernUITheme com.android.packageinstaller.ModernUITheme com.android.systemui.statusbars.ModernUITheme com.android.systemui.ModernUITheme com.android.dialer.ModernUITheme com.android.phone.ModernUITheme projekt.substratum.ModernUITheme && sleep 2 && pkill -f com.android.systemui"
01-05 19:07:39.196 7122 7122 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.BufferedWriter.write(java.lang.String)' on a null object reference
01-05 19:07:39.196 7122 7122 W System.err: at masquerade.substratum.util.Root$SU.runCommand(Root.java:56)
01-05 19:07:39.196 7122 7122 W System.err: at masquerade.substratum.util.Root.runCommand(Root.java:20)
01-05 19:07:39.196 7122 7122 W System.err: at masquerade.substratum.util.Helper.onReceive(Helper.java:66)
01-05 19:07:39.196 7122 7122 W System.err: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3055)
01-05 19:07:39.196 7122 7122 W System.err: at android.app.ActivityThread.-wrap18(ActivityThread.java)
01-05 19:07:39.196 7122 7122 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1572)
01-05 19:07:39.197 7122 7122 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
01-05 19:07:39.197 7122 7122 W System.err: at android.os.Looper.loop(Looper.java:154)
01-05 19:07:39.197 7122 7122 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6169)
01-05 19:07:39.197 7122 7122 W System.err: at java.lang.reflect.Method.invoke(Native Method)
01-05 19:07:39.197 7122 7122 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
01-05 19:07:39.197 7122 7122 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
...
01-05 19:08:02.162 12622 12622 W rade.substratum: type=1400 audit(0.0:197): avc: denied { execute } for name="su" dev="rootfs" ino=5467 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:su_exec:s0 tclass=file permissive=0

maybe you can check in logcat if you get something similar (edit: or if applying in permissive mode works)
[prjkt.io] NepoRood:
Running selinux in non-enforcing modes is the current fix we use with AOKP 7.1 ROM (which is CM/LOS based), substratum is working on all devices running permissive, and some running moderate.
[prjkt.io] side:
well...i still cant understand which commits i should cherrypick from the branch,to make my rom work with oms...all?

thanks for that great work guys!

i believe oms is the future!

ROM details:

based on cm14.1
[prjkt.io] NepoRood:
There's a bunch, lol. You can go to AOKP gerrit review, select the "merged" tab, then put OMS in the search box and hit search. You'll get around 2 and half pages of results. These are all the commits Sean made to get OMS working on AOKP :good:

Link
[prjkt.io] vetzki:
I would rather try to fix the selinux issue instead of switching to permissive.

[MENTION=5968293]side[/MENTION]

example frameworks_base, https://github.com/SubstratumResources/platform_frameworks_base/commits/n-mr1-oms7

first commit is 7b1db662f29429470ae603f070aedbdb5851f155 OMS7-N: Support tagging resources as OK to overlay [1/11]

last is 8c848db8e521e04eac999ec267ef3f78d94c9ddd SystemUI: Expose switch bar title
[prjkt.io] side:
that was my first thought.i just didnt try until i get sure :D thanks mate!
[prjkt.io] rickysidhu_:
Quick question: when removing a theme, is it safe to just uninstall it straight away, or is it recommended that we disable first, and then uninstall? Thank you in advance!
[prjkt.io] side:
error 5: Added public field android.Manifest.permission.MODIFY_OVERLAYS

******************************

You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:

1) You can add "@hide" javadoc comments to the methods, etc. listed in the

errors above.

2) You can update current.txt by executing the following command:

make update-api

^^^^^^^^^^^^^^^^^^

CONGRATS YOU EARNED A QUAIL STAR!

any ideas ?

I know people asked there but didnt work for me :/ .any ideas
[prjkt.io] FSadino:
make update-api && brunch

Then you can push modded files from framework/base to GitHub so you dont have to update api again

You can see here: https://github.com/FSadino/android_frameworks_base/commit/002444c12148f3f2eb32ac41465d9710bdf772b7
[prjkt.io] side:
testing and reporting here mate :)
[prjkt.io] bdwilk:
Uninstall right away is OK. It'll just remove the overlays directly after uninstallation.
[prjkt.io] FSadino:
I have successfully applied all frameworks/base commits but didn't solve. I will try running permissive mode to see if it helps
[prjkt.io] rickysidhu_:
Sweet, thank you a ton!
[prjkt.io] bigbaluka:
Thanks to [MENTION=4351374]shaggyskunk[/MENTION] for posting rescue zips. For some reason there was no substratum folder on my SD card. I've used them before but for some reason the folder with SubstratumRescue.zip & SubstratumRescue_Legacy.zip wasn't there. I often use Default Manager to disable or uninstall overlays but when I get bootloop that won't help. If anyone has the same issue this might help. https://xdaforums.com/showpost.php?p=70326159&postcount=1176
[prjkt.io] vetzki:
can you check in logcat what is causing the error?

another question, why should fb commits solve the issue? (I hope thats not a rude question. if so sorry for that, not intended, just a lack of lingustic skills)
[prjkt.io] nicesoni_ash:
Correct, sepolicy commits have to do with it somehow but there is only one commit afaik and that too is for something else.

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[prjkt.io] FSadino:
Forget about fb commits, my bad interpretation of your quoted post.