yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] lucfig:
Thanks for the response.

I tried to log at the time but did not know how. After a reboot everything went back to normal (I also wiped cache and forced closed before, but only reboot solved).

Unfortunately I already wiped battery stats, but it was no longer than 24 hours. Mine is wiped everytime I unplug and it is above 70%.

If it happens again, I will save the stats.

Enviado de meu HD1903 usando o Tapatalk
[Android Apps and Games] DiamondJohn:
Interesting yours is only 70% and mine is 90% and has been for most of my ROMS; which are normally custom ROMs. Not that it makes a difference here, but you can also force it to be reset in TeMeFI (in case you keep charging it to only 69%;)) by running

► Currently Running
► Battery
Ξ Battery Reset

The method identified in the previous post is the source data that is processed, of which a lot of processing power is choosing which rows can be ignored, approx 90% or more. To actually LOG, then there is the TeMeFI internal logging, which is better suited for the interface debugging more than the actual script running. Remember, its almost entirely shell scripts that do the heavy lifting.

A reboot fixing it makes me think that android wasn't in the best state.:rolleyes:
[Android Apps and Games] lucfig:
Actually I've set a Tasker profile to clean the stats, it's not the ROM that is cleaning. I use the following command:

dumpsys batterystats --reset

I see, I tried the TeMeFI log, that's the screenshot I shared, but don't think anything relevant appeared.

Well, the reboot stopped the sh process, doesn't that makes sense?

Enviado de meu HD1903 usando o Tapatalk
[Android Apps and Games] lucfig:
I was not able to reproduce the previous issue. But now I'm receiving an error when trying to generate a battery graph.

Attached is the screenshot of the error and the battery stats report.View attachment 5069991View attachment 20200728111408_TeMeFI_Currently_Running_Battery_Battery_Stats.log.zip

EDIT: After using the battery reset option, the graph works again. Is it different from the command below?

dumpsys batterystats --reset

Enviado de meu HD1903 usando o Tapatalk
[Android Apps and Games] DiamondJohn:
A couple things here.

1. The toast message is HEAVILY CUT DOWN error text. To get the FULL error text, see the previous post (duplicated below):

https://xdaforums.com/showpost.php?p=82751523&postcount=445

If an error occurred but no display of such, you can also check for errors by long pressing the bottom area.

I'll add this info to the second post with all the other "hot spots" of the UI

2. From the little I can get from your screen shot (the full text would be MUCH better), you seem to have an IO error, which points to a bigger issue, and possibly specific to your device. The full text may/would give more clues. A huge stab in the dark would indicate possibly that your cache partition is running low on available space. The partition and block info under device details, may give clues if it is small or low on space etc

4. The battery reset CLEARS out the source data, so you lose the info you are trying to plot, and therefore not able to plot it. The fact that clears things up, again indicates possibly low space. I will give your data a go on my phone in case it is something in my code and get back to you here.
[Android Apps and Games] DiamondJohn:
It processed and plotted fine on my phone.

View attachment 5070431

The weird thing in the graph is the first 7.5hrs or so, the battery sat unmoved at 75%:confused: Like it was on a really low powered charger, that matched the discharge rate.

The dB started at 9MB and your source data was about 4MB, so double those, and it would probably of needed <50MB to process which is not a lot.
[Android Apps and Games] lucfig:
It indeed stayed that way over night. I have a magisk module installed called Advanced Charging Controller, and I set it to charge only up to 75%. Since my kernel supports battery idle mode, the phone drains power directly from the charger once it reaches 75%.

Anyway, the weird thing is that my battery stats were cleaned with the dumpsys command as soon as I unplugged. So you should not be able to see that. Android settings do not show that udle time at 75%.

Ok, next time I will take these proper logs.

4. Yes, I know that. But since battery stats were (or should have been) cleared when I unplugged the device, it should not have any problems plotting as it was up for around 1 hour or so after unplugging. Anyway, by your plotting, seems the command is not cleaning stats properly. What is the command your app uses for cleaning?

Enviado de meu HD1903 usando o Tapatalk
[Android Apps and Games] DiamondJohn:
OK, the app/config limiting your charge to 75% explains that bit of weirdness.:good:

However, as you can see in the graph I attached, there is definitely some record of the phone while it was at 75%. If it cleared when it was unplugged, there would be no record of the 75%, which there is. I can tell you how long it hovered at 75%. It did appear to clear any history beforehand, so maybe it cleared it when it first hit 75%:confused:

The command I use is the same (I think), see the post only a few above https://xdaforums.com/showpost.php?p=83147521&postcount=521

To get the code, long press the item, and chose preview. You do not need me to tell you what it runs!:mad:
[Android Apps and Games] lucfig:
Just checked, and the command is the same.

Mine should run when unplugging, but I will test it to ensure it is correctly set up. It is actually a tasker profile that runs whenever phone is unplugged and battery is above 50%. So there is no mention of 75% in tasker, it is very weird to have all data since it got to 75%.

Thanks for your help.

Enviado de meu HD1903 usando o Tapatalk
[Android Apps and Games] Syoenth:
I want to detach an app using TeMeFi and only a app that I detach previously appears, how can I fix this? thanks in advance
[Android Apps and Games] DiamondJohn:
You are in the wrong menu item.

In the last update, I limited the CHECK list to apps that ARE currently detached (and that appears to be what you are showing me). However, if you go to the correct menu item (ie "DETACH:...") then that will list all the apps available to be detached.

► Application Info / Manage
► Detach Package from Playstore
[COLOR="Red"][STRIKE] ▪► CHECK: The Detach of a single package *[/STRIKE][/COLOR]
[COLOR="Green"][B] ››► DETACH: Select Package then Protection Level v3 *[/B][/COLOR]

======================

EDIT: Just noticed the toast, which tells me you ARE in the correct menu item.:o sorry.

It would appear your google playstore data is possibly broken/empty. The list of apps are attained from that. Run the following in a shell and post your results.

su;
sSQLEXEC="/data/data/diamondjohndroid.utility.temefi/cache/sqlite3";
chmod 775 $sSQLEXEC;
sDB_LOC="/data/data/com.android.vending/databases";
sDB_FILE="localappstate.db";
sSQL="SELECT package_name FROM appstate ORDER BY package_name;";
$sSQLEXEC "$sDB_LOC/$sDB_FILE" "$sSQL";
[Android Apps and Games] Syoenth:
it works, thanks my friend, now all the app appears on the detach menu
[Android Apps and Games] DiamondJohn:
Just to clarify, I would project that nothing I said or suggested you do changed the way it responded. What happens is sometimes (due to a number of reasons) the PlayStore data can be re-initialised / cleared. After some time / use the PlayStore data will re-fill / correct itself. THATS when TeMeFI will also start to respond as expected, as it depends on the PlayStore data being valid. I would say it was simply a matter of time being allowed for the PlayStore to sort itself out, or you simply opened / used the PlayStore for a while.

In simple terms, if the app isn't attached, TeMeFI cannot detach it.
[Android Apps and Games] HippoMan:
Selecting apps by display name instead of package name?

Please forgive me if my question has already been answered in the discussion here, but that I might have missed it ...

In freezing or hiding an app, is there any way to show the list of apps by their display name as an alternative to showing the list by package name?

Or as another alternative, is there a way to search that list of package names by the display name instead of the package name when performing Freeze or Hide?

I know that I can get the package name by other means before running Freeze or Hide in TeMeFI, but I'd like to be able to skip that initial step and select an app by its display name directly from within TeMeFI, if that's possible.

But if this isn't possible, I understand, and I still very much appreciate all of the functionality of TeMeFI and all of the work that has gone into this utility.

UPDATE: I now see "List all App Names & APK Paths". That is definitely helpful, but the display names are not in sorted order, so I have to manually scroll through the entire list in order to find the info for any given app. Is there a way for me to sort this list by display name? I know that I can copy and paste the list elsewhere and then search it via some other software, but I'm wondering if this sorting/searching by display name could be done within TeMeFI.

FURTHER UPDATE: For example, perhaps something like this. See code in red ...

AAPT_EXE=/data/user/0/diamondjohndroid.utility.temefi/cache/aapt-arm-pie;
chmod 755 $AAPT_EXE;

echo "AAPT Functionality has been compiled by https://github.com/Calsign [William Smith {Calsign}] ";
echo "";

for pkg in $(cmd package list packages -f | cut -d ":" -f 2);
do
path=${pkg%=*};
app_code=$(echo $pkg | awk -F "=" ' { print $NF } ')
app_label=$($AAPT_EXE d badging "$path" 2>/dev/null | grep "application-label:" | cut -d ":" -f 2 | sed 's/^.\(.*\).$/\1/');
if [ "$app_label" != "" ]; then
[COLOR="DarkRed"] echo "${app_label};${pkg}";
fi;
done | sort -f | while read line
do
echo "${line%;*}";
echo " ${line##*;}";
echo "";
done;[/COLOR]

I tested the code on my device, and although it runs a little slower because of the sort, it seems to work.

.​
[Android Apps and Games] DiamondJohn:
The general concept I have for TeMeFI is to keep the dependencies down within scripts, which also includes building the menu's.

It is possible to give a list by display name, but, it would mean not just the coding of the list itself, but also the integration between the item you selected from the list and the final script; which gets the selection as a parameter. The final script does not understand or know what menu script you used to select the app. In some places, I format the list to have the code in the list eg."YouTube - [com.android.google.youtube]" and then parse that selection in the final script. However, in this case, I would be adding the dependency to AAPT into the menu building script, which is kinda not in line of the "grand plan" of keeping dependencies down to a minimum. Especially AAPT in a menu build. Also, AAPT is not a standard feature of Android, and it is 32b and compiled by a third party. Too many moving parts I am not in control of for my liking.

Also its not a feature that users will go into too often. And to be honest, the original concept was for TeMeFI to be used to build scripts someone could extract and place into other things such as boot scripts, Tasker etc etc etc. But I understand, its gone well beyond that now.

And as for "List all App Names & APK Paths". You can search this list instead of scrolling to find what you are looking for. Maybe I'll add an extra layer of selection/filtering to let the user, select which sort order.
[Android Apps and Games] HippoMan:
Thank you for your replies.

Given the goal of keeping dependencies to a minimum, I now understand how the display name would not be part of the list for "Hibernate-Freeze-Hide", etc.

As for searching the "List all App Names & APK Paths" list, I don't see how such a search could be performed on that list, unless I copy and paste that list to a different app. Is there a search function that I can use on this list within TeMeFI that I might be overlooking? If I generate that list, click on the back arrow, select the search icon, type a search string, and select "OK", the list does not get searched.

Also, is there a way that we users can write our own custom scripts and somehow install them within our instance of TeMeFI? I couldn't find that functionality, but again, I might be overlooking something.

Thank you again, especially for all your work on this very useful utility.

.​
[Android Apps and Games] DiamondJohn:
Lots of things to unwrap here.

Regarding your "Hibernate-Freeze-Hide" list, the big thing is that you may be using the wrong function for your purpose. Lets deal with that later.

Firstly, regarding searching / filtering. See the second post: https://xdaforums.com/showpost.php?p=76860050&postcount=2

In short, there are four types of filter/search.

1. Filtering a dynamic menu. As you know, long press the X button

2. Searching the whole menu. Short press the magnifying glass

3. Filtering the RESULTS. Long press the magnifying glass. This is what you appear to have possibly missed.

4. Filtering the results by exclusion ie not containing. Long press the "code" icon just right of the magnifying glass

NB: All filtering, except for menu search, can be performed again/iteratively on the previous filter results

Now for your app description to code mapping.

I will assume the app you are trying to "Hibernate-Freeze-Hide" is an app from the play store? With that assumption, the better way to get the mapping between the title and the document id (ie the app code) is by actually querying the playstore data. This can be done through the Dynamic Queries of TeMeFI. The following should give you an idea.

► Database
► Dynamic DB Queries
››► Filtered Table Data
/data/data
(Search resulting menu for "localapp" using long-press on X)
select .....localappstate.db
appstate
title (NOT PACKAGE_NAME)
[enter your search criteria, partial text is ok]
select the name
I realise now that the next select is wasted as its sort order, but it should only return one row.:o

In the returned results, the PACKAGE_NAME is the app identifier/code, the TITLE is the named text you know and love.

The one caveat here, is that sometimes google does not fill in the TITLE field in their PlayStore data.

As for writing your own scripts, and getting it into the menu, yes, and its been covered before. "User Scripts" would of pulled it up in a thread search, or even "scripts". You simply have to tell TeMeFI where to find the scripts, or simply use the default /TeMeFI/scripts folder which ALREADY EXISTS. I just found more info about it, doing the search myself. https://xdaforums.com/showpost.php?p=77905824&postcount=37:rolleyes: And you can check your current settings under

► TeMeFI Configuration
► Default Startup Config
Current Startup Config

These will appear under:

► Dynamic Lists
▪► Run user scripts

AND you can then save it as a Favourite, so it will appear under there. This works out well for me, as I have many many MANY user scripts, but only run a few manually on a regular basis.

That covered everything i think, except for a little gotcha on filtering the results from the AAPT method... and a bug I've been meaning to fix for a while now on filtering the tabular results... but lets not confuse things:p the above is probably a lot to take in, and my fingers are getting cramped:mad:
[Android Apps and Games] HippoMan:
Thank you for **all** this info!

As for searching ... I had overlooked the long-press option on the search magnifying glass, and I now see that I can do that in order to search results. However, as for the "List all App Names & APK Paths" results, it still doesn't give me what I was hoping for.

For example, suppose that I want to get the package name for the "Telegram" app. In the "List all App Names & APK Paths" results, the following is one of the entries ...

Telegram
/data/app/org.telegram.messenger-vF2mWVXEJxbkdhacDXswLQ==/base.apk=org.telegram.messenger

If that entry is embedded deep in the list and I want to find that entry in order to obtain the APK path for that app, I can long-press on the magnifying glass and enter "Telegram". However, in doing so, it will only present me with the following:

Telegram

The APK path does not show up, because it appears on a different line from that in which the word "Telegram" appears.

However, I now see that I can perform a dynamic query in order to retrieve that data, instead, as you described.

And thank you for pointing out that user scripts are indeed possible under TeMiFI, which is another thing that I had overlooked. I will more than likely make use of a user script in order to get the info that I want.

I appreciate all your help, and again, thank you for all your work on this utility!

.​
[Android Apps and Games] DiamondJohn:
and thats the GOTCHA i hinted at regarding the AAPT script,:laugh:

Another thing to remember, the concept of TeMeFI is not as a Turnkey solution. That is the reason the scripts are available for the user to save off, and thereby modify to meet their specific needs. If I thought of making it a final destination, I would not of given the scripts out. Think of how many apps you have that do this? its a bonus that most functions of TeMeFI happen to be ready to run, as-is.

Maybe skim reading the release posts in reverse order may help you remember when / what major features are available. Just search the thread for "new build" by user DiamondJohn. And also read the second post.

Another side-step :rolleyes: to get the app code, is to go into the detach menu item, and when it lists all the apps, long press the X to search that menu. That will give you the code for an app as well.;)
[Android Apps and Games] DiamondJohn:
Your code is relying on none of the app descriptions containing a ";" character. I would guess that is a valid character in an app description, but not in an app code/doc_id/package_name. ie the code will fail if one of your apps have it.

And again, the purpose of the AAPT functions are not meant to be a final solution to everything, but an example of how YOU could build code from/using it. Remember, there are 600 odd code starting points for you to build from. Not four of five perfect solutions.
[Android Apps and Games] HippoMan:
Yes, I know about the semicolon. I just threw that in as a possible example. My final solution would do this differently.

Given that I can install my own scripts, I will come up with a different way of doing this. I'll just put the display name and the APK path on the same line. Then, I won't need to play any games with line splitting, and I can have sorted output ... and if I want, I could search for the display name in the results and also be presented with the APK path.

---------- Post added at 10:58 ---------- Previous post was at 10:49 ----------

I have always understood that. It's just that I originally wanted to know whether my own desired functionality might have already been embedded somewhere in the app. Then, I started getting down into the weeds, and ...

Yeah, I skimmed, but I am not a very good skimmer. I get lazy and then overlook too much when skimming. :) I'll force myself to do a better job of skimming before I decide to ask any other questions here.

This gives me what I want, and I don't even need to write my own script now ... although I probably will do so, anyway :)

.​
[Android Apps and Games] DiamondJohn:
And don't forget, you can also get the source code / script for the menu build itself, by long-pressing the menu item before it, and then selecting "preview", and then save off that script, and use the user script functionality above;with any additional edits you wish.
[Android Apps and Games] HippoMan:
Yep. That's exactly how I am planning to build my own script. That's how I created the script that I pasted above.

Thanks again for all your help and all your work.

.​
[Android Apps and Games] DiamondJohn:
I was pointing out that and how you can also get the scripts as used for a menu build, as opposed to the AAPT script, which was the more obvious results script; which even has its own button in the toolbar.
[Android Apps and Games] HippoMan:
Understood.

.​
[Android Apps and Games] panni:
Hey,

I'm one of those for whom the detach function for YouTube doesn't stick. I've tried several things that you mentioned, like letting it update once, then install vanced and detach.

I've cleared all of my other detach attempts, but Youtube keeps coming back after one to two days.

Attached is a screenshot of the detach check screen. Only those two particular checks fail. After detaching, all is on passed. What else can I provide you with?

I'm running xiaomi.eu stable on a Mi 9T.

Thank you in advance
[Android Apps and Games] DiamondJohn:
You have not read or followed the instruction in the 2nd post.

Save off the results and attach the file.

Other things that should of came up on reading the posts regarding detach, or steps to help find out what has gone wrong.

1. After detaching, DO NOT VISIT THE YOUTUBE PAGE in the Playstore. The lines you are failing imply you have not followed this precaution. The device is out of my hands, TeMeFI cannot protect you from yourself.

2. Do you have multiple accounts? or anything else funky with you playstore login(s)?

3. If you are "...one of those for whom the detach function for YouTube doesn't stick.", then reading this thread, for people who have followed the instructions, have a single account, then you are the only one, of one of those guys.

4. Run the dynamic SQL as above in https://xdaforums.com/showpost.php?p=83251003&postcount=536 but for verify_apps.db [apk_info] and frosting.db [frosting]. Zip up the results and place on something like filebin.net and PM me the link. do not attach here in this thread.

My money is on point 1 above. As such, I would suggest detach it again, and follow point one to the word.
[Android Apps and Games] AnonVendetta:
Here is a modded version of this app that has all the crap stripped out, but leaves all the useful features:

I removed the silly dancing banana and sound effects, changed main screen background to black, changed Einstein icon to black icon (app icon is still him, but not within the app. he wasnt as smart as many people believe he was, he could barely manage his personal hygiene). And no more "please choose blah blah...i could do this all day". Wait message removed (although you'll still have to wait). File size has been significantly reduced, APK is ultrazipped (highly compressed), zipaligned, signed with my private key.

[MENTION=5417899]DiamondJohn[/MENTION]: It would be nice if you could just not include this stuff to begin, people shouldnt have to mod your apps to get rid of unnecessary stuff. I understand you're trying to have a sense of humor, but to me it's just unnecessary. I'm a minimalist by nature.

Stephen Hawking would be much better for the icon. Way more of a genius than Al was.
[Android Apps and Games] curiousrom:
I disagree with everything you wrote starting with the tone.

I'm grateful for DiamondJohn's app & whatever he wants to do with it is fine with me.

I live in Costa Rica & everybody here loves the Dancing Banana festival.

Sadly it got postponed this year because of the fuzzing virus. :-/

***