yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] DiamondJohn:
A little ironically, but level 1 does the most damage regarding attachment, but re-attaching from memory is the same for all.

I have done most of my testing of re-attaching apps on YouTube (ie a google app). And re-attaching that was by simply opening up the YouTube page. Or worst case, accepting the update for that one app (ie accepting an update over Vanced YouTube)

You should not need to wipe your playstore data. Re-attaching basically does the same thing, but ONLY for the single app. ie it clears all my blocks and the data for that one app

EDIT: If you reaad below, it seems its just a matter of timebefore the plastore corrects itself

1. Search for the app and open the page in the playstore, may trigger it to correct the link; as it did for me and YouTube

2. reinstall the app from the playstore. I think it will see you have it installed and thereby you have done method 1 above (and correct your data).

3. accept/install the next update.

4. LAST RESORT: backup your data for that one app, uninstall the app, install the app from the playstore, restore your data

if you find one method that works, please comeback and post here for others.
[Android Apps and Games] DiamondJohn:
New Build!

New Version v1.0.81

Download: SEE OP!

Notable changes:

Shout out to [MENTION=5893314]shadowstep[/MENTION] who made me do a litttttlllle more testing on the re-attach:o You may have better luck with re-attaching your app now. Re-run the re-attach, it will correct the mistake; although a little late now..:o

Updated Items. within the menu at "TeMeFI Configuration>Latest Updated Menu Items"

New Items. within the menu at "TeMeFI Configuration>Latest Added Menu Items"

Enjoy and stay safe.
[Android Apps and Games] shadowstep:
You're welcome. ;) Thanks for the quick update! I have tested it again, and now when I select the re-attach option, all the entries are properly removed, unlike before. However, the app still doesn't show up until I clear Play Store's data, so no clue what's up there. I haven't tried updating it via Play Store once I open the link to the app and see an update pending (strange that the Play Store shows this, but in the my apps section, just forgets that the app is installed :eek:). Might try that the next time I have to update a hidden app. Anyway, thanks for TeMeFI, the detachment is pretty rock solid! :good:
[Android Apps and Games] DiamondJohn:
Whats up there is two things IS.

1. I obviously have made the detach too deep/good;)

2. Most of my concerns & testing were with YouTube, For which, Google take EVERY opportunity (even when not asked:mad:) to re-attach. As such, most of my testing and time was spent ensuring that it never got re-attached. I would guess the same will happen to all their own apps, whereas others, not so much.

Again, (unless you find it easier) you only need to backup, uninstall, reinstall and restore the data for the single app, not the whole playstore. I wonder what backup/restore apps do to re-attach restored apps? surely they do not backup the playstore link; i have seen inside their data. There must be some method that could be issued to let the PlayStore "know".

OR

Not tested, but I think if you could wait patiently for the next update, that may re-attach the app, if you manually accept the update.:confused:

By your experience, maybe a little too solid;)
[Android Apps and Games] DiamondJohn:
New build!

Download: TeMeFi-v1.0.14.apk

MD5: f3e7423ee216e78e8bd5c334908e6814

Its a BETA for installation on PIE; or more specifically for Marshmallow+

Not in OP as its a BETA

Pie Aware

Hold down a menu item it will pop up a box with explanation/description, an option to preview the shell command BEFORE it is run, actually run it, or cancel (ie OK)

Switching options should now take effect without a restart. eg Toolbar at bottom.

I tested on Pie with root, and allow access to storage, and it all appears good. Tried disallowing storage and root, and still worked ok, but restricted of course. However, when I tried installing it on a ROM that simply did not have root, it failed. But not having root makes it difficult to debug whats gone wrong...

Please give it a go, and let me know how you go, and I will look further into the root installed/not installed issue. :mad: but simply assume that this version requires root, at least installed if not granted.
[Android Apps and Games] DiamondJohn:
Thought I better quote you so you get a notification. Let me know how you go with the version above. NB: Its not in the OP.
[Android Apps and Games] yochananmarqos:
The dancing banana mocks me still. I see it's targeting SDK 26 now at least. Logcat attached.
[Android Apps and Games] DiamondJohn:
New build!

The banana is not mocking you, it dances for your pleasure. ;)

Anyway, I have this new build which I have tested on a Pixel device (rooted with Magisk, but also tested it before rooting), which appears to work well for me.

To ensure a clean install, uninstall any previous versions, and delete the folder /sdcard/TeMeFI, then install this new APK, and let me know. :fingers-crossed: As I said, it works for me on a pixel ROM, AOSP based.

New Version v1.0.15

Download: TeMeFi-v1.0.15.apk

MD5: 5e16724d36f2dbc751c5acd347857821

Not in OP as yet, until I get confirmation from someone it isn't just me it works for. :confused:

Working on Pie for me

Opened up a few more Non-Root methods

Please give it a go, and let me know how you go.
[Android Apps and Games] DiamondJohn:
New build!

New Version v1.0.16

Download: SEE OP!

Pie Aware (uses storage permissions as implemented in Marshmallow & up)

Long press a menu item it will pop up a box with explanation/description, an option to preview the shell command BEFORE it is run, actually run it, or cancel (ie OK)

You can search within the results of the last output. Long press the "?" button in the menu, which normally searches the menu tree

Switching options should now take effect without a restart. eg Toolbar at bottom.

Changed some root/non root options

Added internal logging options (optional, defaults to off, exceptions are always logged)

I will do some info / doco on some of the new features in the coming days as they have made a big difference to TeMeFI's functionality.

NB: If you are running on less than Marshmallow, I would suggest the previous version if the newest doesn't run.
[Android Apps and Games] DiamondJohn:
just a note, the AAPT features, although available, only work on 32bit, not 64bit devices.
[Android Apps and Games] DiamondJohn:
New build!

New Version v1.0.17

Download: SEE OP!

Menu Animations

Added some more items

Fixed a couple of options

Fixed dumpysys and stat - it was including a carriage return in the filename:eek:

Fixed handling files with spaces in filename

added some long press actions to the toolbar items. Long press "?" filters current results, "#" excludes from current results. Can be performed recursively!

Other stuff...;)

I will do some info / doco on some of the new features in the coming days as they have made a big difference to TeMeFI's functionality. (said that before...)
[Android Apps and Games] DiamondJohn:
A quick doco of one of the new features.

TeMeFI can Generate SELinux Allows, to be included in a ROM Build, based off of any denials in the currently running ROM.

Found under
Logcat > Logcats > Generate SELinux Allows

After generation, use the filter current / exclude from current

Write out the final results, and and integrate with your ROM

Its not fast,so be patient for the results

After you run it once, I would suggest running the "Logcat Clear" option, so you wont regenerate any on the next run.

There will be duplicates in the results, as it is generated directly off of the denials within a logcat, It also includes the triggering line as a commented line so as to allow an easy trace back to what cause it.

Use the "Filter Current Results" by long pressing the "?" on the toolbar to limit the results say to a specific app

Use the "Exclude filter of Current Results" by long pressing the "#" button in the toolbar to exclude items from the last results. For example, you may wish to exclude "untrusted_app" from your results.

I would also suggest the above is all run while under SELinux Permissive so as to not restrict what occurs. Which can also be switched ON/OFF within TeMeFI under (if you have built an enforcing kernel)

Current State > SELinux > Set SELinux PERMISSIVE
[Android Apps and Games] shaqman89:
I also initially got stuck on the dancing banana. But after I killed the app (recent menu, swipe up), on the next launch the requested su dialog pops up and it continues.

So, the dancing banana might be due to it waiting for root permission. Maybe adding a check for that would be better?

I'm on Pie using aicp.
[Android Apps and Games] DiamondJohn:
Out of interest, which root method (ie SuperUser, ROM Built In, Magisk) are you using? version (ie if Magisk, are you using 16.*, 17.1 or 17.2)?

Technically, that's how you request and are granted root access. You try something requiring root, and the root method/system should respond and handle the request. ie its already there.
[Android Apps and Games] shaqman89:
I'm on magisk 17.2.

I understand. It seems that there are a few apps out there that somehow fails to request su on the first time.

Not really sure what causes it though.
[Android Apps and Games] DiamondJohn:
Yeah, I had a suspicion you were on 17.2 Do not forget that it is in beta, ie it will have bugs. You are also running pie, which by last public google report was < 0.1% market penetration.

If you clear the data of TeMeFI (totally safe and should remove any SU status), then run

su;
logcat -c;

Then restart TeMeFI, and give it some time for Magisk to respond with the SU Request and then run

logcat -d -v > /sdcard/$(date +"%Y%m%d%H%M%S")_logcat.log;

Take this log (or a log using the "Magisk prescribed way", to the beta forum, and post it up there.

The request code I use for SU is

# Returns 0 (ie no error) if root is available and 1 if not

IS_ROOTED=$(su -c "ls /data/data");
if [ $? -ne 0 ]; then
echo 1;
else
if [ "$IS_ROOTED" == "" ]; then
echo 1;
else
echo 0;
fi;
fi;

Which they may also be interested to know along with the logcat.

Also, if you look in the log yourself, you *may* see a line that looks like

E Magisk : select failed with 9: Bad file descriptor

If you search the web, this Magisk log is often associated with a failure to handle the root request, and is commonly followed with a git commit within Magisk source to fix it.

I personally flashed it to an PIE ASOP based rom with 17.2 and it worked, as long as the Magisk Manager was also installed, which wasn't by default.
[Android Apps and Games] DiamondJohn:
New build!

New Version v1.0.18

Download: SEE OP!

Improved Menu Animations

Added a couple more items "Run user scripts", "Top 1000 albums with no songs attached", "Media Record Use"

Fixed a couple of items

Other stuff...

And again I say, I will do some info / doco on some of the new features in the coming days as they have made a big difference to TeMeFI's functionality. (said that before...)

The new "Run user scripts", which is found under "Dynamic Lists" enables you to trigger your own scripts using the TeMeFI user interface with script output management.

By Default, all user scripts can be found within the path /sdcard/TeMeFI/scripts". However, if you already have another pre-existing path you wish to use, you can configure it to use your own path with a shell statement as below:

echo "[color="Red"][B]/sdcard/My Scripts[/B][/color]" > /sdcard/TeMeFI/.config/USER_SCRIPT_LOCATION;

Where the part in red is the folder you wish to use. To undo that change, simply delete the file "/sdcard/TeMeFI/.config/USER_SCRIPT_LOCATION"

NB: This thread is not a scripting help thread.

I have included an example script to kick off the media scanner, but I am not truly 100% sure it works;media scanner is slow, and I was impatient. Its simply an example. You can delete the example, and it stays gone. However, if you delete the directory "/sdcard/TeMeFI/scripts", it will be recreated on next startup.
[Android Apps and Games] DiamondJohn:
One feature I think I should let you know of is, if you Long Press on a menu item, a message box will pop up giving you the option to "Preview", "Run" or "Cancel".

If you press "Preview", the script that would of been run, will appear in the results window, allowing you to check if you are OK with it being run on your device, before it is run.

When I do things in the "danger" areas, I tend to use this feature, as it also includes the name, path and short description from which I can check I actually clicked on what I was trying to click on. I have fat fingers, that appear to get fatter in direct relation to the danger of what I am about to run.;)

Almost forgot, this is also a great way to see the full menu item text if/when it is wider than the displayed menu
[Android Apps and Games] shaqman89:
I agree. It is likely to be an issue somewhere in Magisk. What I am trying to say though, that shouldn't the app fail more gracefully when it couldn't get root? Maybe something like a timeout after some hundred seconds. At the very least, it gives a better UX than rather guessing what might happen on the loading banana screen.
[Android Apps and Games] DiamondJohn:
There is no moneytisation in this project (no ads, no cripleware, no link or even hint to a donation), and hence no driver to make it work when other components are possibly failing. ie make TeMeFI "fail gracefully". Its a project I actually built for my own personal use, but saw how useful others may also find it, so I shared. The more I navigate the menu's, the more and more useful stuff I find. It is a cost to add features/fixes to TeMeFI, and the returns are... err... zero. So spending time fixing something that is possibly only a temporary situation, really is not going to happen. Sorry.:( especially since I am one of those that it does work for.;)

Even if it "failed gracefully" with no root, it would be very crippled for a root user. I *think* you can "step over" the root check, and run as non-root, by running the following:

echo 1 > /sdcard/TeMeFI/.config/ROOT_CHECK;

If memory servers me correctly, that should boot you up as non-root and side step an actual root check on boot. Maybe.

Also possibly, running

echo 0 > /sdcard/TeMeFI/.config/ROOT_CHECK;

may actually force it to do the root check after start-up, and it may then work. But that's all theory. The root code was some of the very first code I built, and is way out of my mind, and I never had any issues with it. Even from day one, it simply worked; its not rocket science.
[Android Apps and Games] DiamondJohn:
New build!

New Version v1.0.19

Download: SEE OP!

New more appropriate icons in the toolbar

Stop animating when switching levels in menu, but still in the menu.

Extended the run user scripts to enable multiple source sources for script locations (see below)

Changed the menu font to use a condensed menu font (ie fits more horizontally visible text now)

Force a refresh in the menu after its been refilled. Sometimes the update lagged behind showing it

MINOR: Fixed formatting of a couple of Dynamic lists (were hard left aligned)

Other stuff...

And again I say, I will do some info / doco on some of the new features in the coming days as they have made a big difference to TeMeFI's functionality. (said that before...)

The "Run user scripts", which is found under "Dynamic Lists" enables you to trigger your own scripts using TeMeFI user interface with output management. The previous release alloowed a single location, I have now enabled multiple locations. To set the multiple locations up, run the following line in a shell (NB: the actual values will be different for your phone, and only you know what is the setup of your phone). The code below assumes you have v17.+ of Magisk installed, but will still work if you dont, just a little slower

echo "/sdcard/TeMeFI/scripts,/sbin/.core/img/.core/service.d,/sbin/.core/img/.core/post-fs-data.d,/system/etc/init.d" > /sdcard/TeMeFI/.config/USER_SCRIPT_LOCATION;

To undo it

rm /sdcard/TeMeFI/.config/USER_SCRIPT_LOCATION;
[Android Apps and Games] DiamondJohn:
Some explanations

Just some new screen shots and explanation of new features

The initial/start screen, with the toolbar set to be shown at the bottom, showing the new icons/button images. Also the newer more condensed font used for the menu

Just showing pinch to zoom, after zooming out to show full page

Explanation of the text in the toolbar, when the actual tools aren't shown

Explanation of each of the buttons in the toolbar, on a SHORT press

View attachment 4621231

Explanation of each of the buttons in the toolbar, on a LONG press

View attachment 4621487

Long press the magnifying glass will filter the currently displayed results to lines only containing the entered text

Long press the code button, will filter OUT from the currently displayed results, lines containing the entered text

Short press the Magnifying glass will search the menu for items containing the entered text. Including the actual code. NB: does not extend into dynamic menu's

Long pressing a menu item will display these details. Helpful to confirm you do wish to run the action before you actually do. Or to see the full text of an item if it extends beyond the edge of the menu.

An example showing the output of "preview" ie show the shell code
[Android Apps and Games] DiamondJohn:
New build!

New Version v1.0.20

Download: SEE OP!

Enable multiple sources for log directory (Dynamic lists>My Logs Files)

eg. Comma separated list

echo "/sdcard/TeMeFI,/storage/emulated/0/User/Logs" > /sdcard/TeMeFI/.config/USER_LOG_LOCATION;

Changed /sdcard to use more universal/correct OS supplied path (ie "/storage/emulated/0" as provided/specified by the OS instead of being hard coded as "/scard")

Added horizontal scroll to menu. ie now you can scroll right and read looooong menu items.

There is no explicit limit how far right you can scroll; I would guess it will crash as you close in on a couple of kilometers (or miles)...

To quickly scroll back left (ie "de-scroll") simply LONG PRESS the home icon in the tool-bar, OR hide the menu and redisplay it. The home long press will also return you to the top menu item, while hiding will keep your vertical place in the menu you have scrolled to

I actually switched back to the non-condensed font in the menu, now that you can scroll long items into view. Boy did that font get old quickly, so I switched back;)

If you are scrolled over about 10% it will automatically jump to a long press action in a non sub-menu item, as it assumes you may not be able to see what your actually clicking on. ie avoid accidentally clicking on the wrong item

There is no "fling"

Added a "back"/previous results button via a long press of the Hide Menu button (<). It will try and retrieve the last results/previous results. The results can actually span from previous days / App Starts / closes / re-boots ie not just a short time ago. However, it will only go back a single step. Very handy when using the filter/exclude from results, and you either made a typo or want to try a different variation on the same string.

Fixed typo in "ROOT acct folder" method

Other stuff...

The "My Log", which is found under "Dynamic Lists" enables you to view your own custom logs using the TeMeFI user interface with output management. The previous release allowed a single location, I have now enabled multiple locations. To set the multiple locations up, run the following line in a shell (NB: the actual values will be different for your phone, and only you know what is the setup of your phone).

echo "/storage/emulated/0/TeMeFI,/storage/emulated/0/User/Logs" > /storage/emulated/0/TeMeFI/.config/USER_LOG_LOCATION;

To undo it

rm /storage/emulated/0/TeMeFI/.config/USER_LOG_LOCATION;
[Android Apps and Games] shaqman89:
I tried using the Generate SELinux Allows, and it works. Unfortunately I found one that was generating the wrong rule compared to audit2allow, and in effect didn't solve the denied issue.

Here is what is generated by TeMeFi

# 10-21 19:21:48.952 12911 12911 W Binder:410_1: type=1400 audit(0.0:33): avc: denied { entrypoint } for path="/system/bin/fsck.exfat" dev="mmcblk0p66" ino=37 scontext=u:r:fsck_untrusted:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0
allow fsck_untrusted system_file:tclass { entrypoint };

And here is from audit2allow

allow fsck_untrusted system_file:file { entrypoint };

What I am saying that, the generated rule wrongly gets the left-handed part from tclass=file, rather than the right-handed part.
[Android Apps and Games] m0han:
just posting for information. not sure how the option in the screenshot works; i don't use play store.
[Android Apps and Games] shadowstep:
1. Is obviously true. :p

2. That makes sense, and I read about that in the post that you had made earlier in the thread regarding the differences between the three methods.

I know, but it's still too much of a hassle. Plus there are cases where backing up and restoring data of a messaging app can sometimes create push notification issues (where the push notifications stop coming when the backup is restored, and the app has to be re-setup from scratch), so I'd like to avoid that headache.

Hell yeah, haha! :highfive:
[Android Apps and Games] replica88:
On my OP5T phone, detach youtube successfully with every check passes, but after rebooting the 9.0 check failed, and eventually a few hours to few days later it got updated. During the time YT wont show up in play store anywhere (detached properly) but it still got updated somehow. I even dont open play store or go into the app's page. I also tried reboot right after detached and every checks passes successfully, only to find out check 9.0 failed right after boot up. Is there anything i miss here?

The rom is OOS 10 beta 2
[Android Apps and Games] DiamondJohn:
Yep, I would expect it to fail eventually if tests 9's or 10's do not pass. Although all work together, the 9's and 10's are what stop the playstore from re-attaching the app.:mad: as opposed to simply checking if its detached right now.

If you ever see a single fail, run the detach again for that app.

Things to check:

1. Check what version of SQLite you are running. And post back.

Database>SQLite Location and Version

2. Although I explicitly do it (ie kill the playstore) during the process. Remove the playstore from recents and kill it. Then run the detach.

3. Maybe try not rebooting (to be honest, I never really have) and letting it settle:confused: and come back and hour or so later, and run the check, and let us know how you go.

4. Check and post what version of the playstore you are running.

Its weird as checks 9 & 10 are on components that the playstore has no concept about. As opposed to other changes where I modify an existing playstore detail.:confused:

I forgot to ask, are you running detach method 1, 2 or 3?

Save off the check files (ie when it passes and then again when it fails) and attach the files (NOT screenshots) from /sdcard/TeMeFI.
[Android Apps and Games] DiamondJohn:
So I detached a non-Google app a few days ago, then removed the detachment. Yes a double negative, but TeMeFI does not re-attach, but simply removes the detachment, allowing it to be attached. It no longer appeared in my list of apps in the playstore. However, I had a suspicion if I left it long enough...:fingers-crossed:

So now after about 48 hours, never off and always with really good WiFi, the app has re-attached itself:victory:. So, it appears, all it takes is possibly patience!:angel: It says in the playstore it was installed 22hrs ago, so maybe even less:cool:. Of course, since it was only one app, I am now questioning myself if i really did the above:silly:... but no, i'm pretty sure.
[Android Apps and Games] shadowstep:
Ah, I see. Let me give that a shot and see. Thanks for getting back! If you can somehow force that task that the Play Store does whenever it feels like for reattaching the app, that'll be great. Hopefully, someday! :fingers-crossed: