[Fire HD 8 and HD 10 Android Development] Datastream33:
Alright, my fellow Linux people... I'm so excited to announce that a new version of Fire Toolbox (V4.0) and Toolbox Installer (V2.0) are now available for download! We got a lot to talk about, so let's get started!

Disclaimer: I will be taking text from the Windows release post if needed, as I don't think it's necessary to repeat myself when it comes to some of these improvements/additions. I hope that's ok with you.

Toolbox Installer V2.0​

The Installer has received a big upgrade over it's 1.0 counterpart, and brings so many needed changes/improvements to the tablet. So without further ado, let's jump right into it!

Package Manager Detection​

In the past the Installer would look for the presence of a single file within the /etc/ directory... and that file was a release/version file (for example, a distro based on Debian could have a file named /etc/debian_version). If that file was found then the Installer would be able to determine what package manager that specific distro used. Of course I didn't think about the fact that not every distro would include this file... which lead to the Installer not being able to determine what package manager to use. Not ideal or reliable in the slightest.

I looked elsewhere, and eventually came across the os-release file. The file contained exactly what we were looking for... like (distro base) information which could be used to determine what package manager to use. Of course this method isn't 100% perfect as the os-release file can only be found in distros that use systemd as their init system... but due to the fact that a large majority of the most popular distros use systemd it shouldn't be that big of a problem. Of course, I'm open to suggestions if you have a better soluton!

Python Externally Managed Detection​

So, something I never really considered when first creating the Installer... is externally managed environments are now becoming a standard, almost. PEP 668 talks all about it, if you're interested. Basically, your distro maintainers can flag the base Python installation as "externally managed" and prevent the use of tools such as PiP (Python's package manager) from being used to modify the environment... which if done incorrectly could lead to a broken distro. So, when marked as "externally managed" we are required to use a Python Virtual Environment.

Most distros are externally managed and some are not... so we'd need some sort of detection to determine if a virtual environment should be used for the Toolbox or not. Thankfully, when a distro maintainer sets the "externally managed" flag, it creates a file named "EXTERNALLY-MANAGED" in the base Python installation... and this is the marker file the Installer looks for when determining if it should use one.

Integrated MsgBox​

Instead of including a binary file that the Installer can call for displaying messages, the msgbox function is now integrated directly into the Installer. This was done to reduce the amount of time it takes before the message appears, and to prevent the "This resource is busy" error message from occurring.

Installer Settings​

Settings can be accessed by clicking the gear icon next to the "Next" button on the first panel. A new window will appear, and in that window, there are two tabs with their own set of options:

Configuration​

Currently this tab has two available options:​

Use Virtual Environment

This setting governs whether or not the Installer should use a virtual environment for installing pip modules.

Skip Dependency Checks

Skips checking for missing pip modules, and repo packages. Basically forces the Installer to install the bundled Toolbox version even if all the dependencies aren't satisfied (could result in a broken Toolbox install).

About​

In this tab you'll find information about the Toolbox Installer - such as the current Installer version, and bundled Toolbox version (what version of the Toolbox the Installer will install). Below that you'll see the distro information - such as package manager install command, like (distro base), the Pillow/PIP/TKinter repo packages, and lastly whether or not PiP is managed externally. If you come across any problems while using the Installer please provide the information found here so that it may be used to troubleshoot issues with the Installer and your distro.​

​

Know Issues and Future Plans​

The Installer is by no means perfect, and things are still subject to change. While so much care has been placed into improving the Installer experience there are still some things that I think still need improvements such as the installation of repo packages/pip. Currently, the Installer will inform you of the missing packages, provide a command to them, and then close. I'd like to improve the Installer so that it restarts itself instead of just closing.

I plan on adding a section to the Installer right before the Dependency check where you can select the "mode" you'd want the Installer to use. The two mods will be "Sudo" and "Manual". If Sudo is selected, the Installer will ask for your sudo password and when your password is required - such as installing repo packages or creating the virtual environment - it can then use that password without having to ask for it again. The Manual mode on the other hand will not ask for the password, and when something needs to be installed it will provide you with instructions on how to perform that specific task manually through the Terminal. What do you guys think about this idea?

Catching Up with the Windows Version​

Screen Capturing​

As with the Windows version, it's now possible to edit a screenshot after taking it in the Screen Capturing tool. However, it's handled a little differently then in it's Windows counterpart. As you all know, Windows has Paint which ships with every version of Windows so the Toolbox took advantage of that and just simply loaded your screenshot into Paint for editing. However, because virtually every distro is different there is no universal raster graphics editor that the Toolbox can simply load the screenshot into. So, we turned to cloud solutions... and came across (not really... I've been using it for some time) Photopea... which just so happens to have an API that we can send the screenshot to.​

Settings​

Finally got around to adding a few favorites to the Startup tab:​

Kill ADB on Exit - Terminates the ADB process when the Toolbox closes.

Close on Disconnect - Closes the Toolbox when the tablet is disconnected from the PC.

The Read-All Notification Center​

Ah, now this next feature is something I've been meaning to add in for some time now. We finally have a read-all notifications button, hoorah! So, instead of pressing the previous button "<" 13+ more times or so all you need to do is hit that double-checkmark button next to the message counter and poof... all those messages are now marked as read. Should reduce the amount of frustration caused when dealing with past messages. Very nice, yes?

Google Services and Battery Optimizations​

As I'm sure many of you are aware, Google Services and FireOS don't really pair well with each other... especially on FireOS 8. Apps seem to crash for no reason, app notifications aren't delivered, and apps complain about your tablet missing Play Services even when its already installed. Well, thanks to the help of @gdroid666, we've discovered that a lot of these issues can be tracked back to Play Services not running in the background. Due to Battery Optimizations, FireOS would kill Play Services and prevent it from running in the background. This would cause apps to bug out and crash. So starting in tonight's update, Play Services will now be whitelisted from battery optimizations on install ensuring it's able to run in the background for those apps that need it. Also, don't worry... if you'd like to whitelist your Play Services there will be a new option in the Google Services (Manage) subtool that will turn off those optimizations for you, so there's no need to uninstall and re-install.

Toolbox Updater and the "Incompatible" Updates​

Hey, remember those times when updates were released, but wouldn't show up in the Updater so you had no idea they were released? Well, that problem will be no more! I'm happy to announce that the Updater has been adjusted so that those updates will now show up, and will also present a button that will take you to the update's download page. Of course, if you don't want the update and find it annoying, you can force the Updater to skip it... preventing it from being shown in the future. Pretty neat aye? Now that's what I call an update(r) I can get behind!

Changelog​

Interested in everything that's changed? Well don't worry, I got you covered... here's the full changelog:

Scam Sites and Ensuring Your Download is Legit​

It has come to my attention that there are some scam sites out there claiming to be the "official" website for Fire Toolbox. Please do NOT download anything from these sites! They could distributing malware, or bundling it with the Toolbox. I do NOT run any other websites (besides the two wordpress websites - Datastream33, aftb), and I do NOT post Toolbox updates or builds anywhere else except right here on XDA. So starting tonight, I will be sharing the SHA256 checksums for both Python 3.10 and Python 3.11 builds (should of done this a long time ago, but better late then never right?). Once you've downloaded either the Python 3.10 or Python3.11 build, I'd strongly suggest checking the SHA256 checksum and ensuring the file's checksum matches the checksum posted here before installing.

In order to get the SHA256 checksum for the builds once downloaded, open a new Terminal instance, and execute the sha256sum command while also passing the file path as the first parameter. Example:

sha256sum ~/Downloads/FTB_V4.0_Installer_Python3.10.7z

You should get the SHA256 checksum as output. Now compare that value to the checksum provided in the SHA256 Hashes table below. If the sha256sum output matches the one from the table then the file is safe. However, if they don't match try downloading the file again and re compare until it does match. Ensure you ONLY download the file from this post or the Downloads section of the OP.

Downloads​

Version​

Python Version​

Installer​

V4.0 (Beta)​

3.10.x​

Download​

V4.0 (Beta)​

3.11.x​

Download​

NOTICE: You must obtain the correct version for your installed Python version. Run python3 -V in the Terminal to get the installed python version for your distro.

SHA256 Hashes​

Filename	SHA256 Hash
FTB_V4.0_Installer_Python3.10.7z	0f03ba9ae7a3da38f96cc5d5281bc984c308690fb7d60f2b20a88e0119d6aec8
FTB_V4.0_Installer_Python3.11.7z	7b4d9e9b022bd0a25186eb968562984daa3d1f3bfff7ed4dfb9ca47c272ffd43

MacOS, and Chromebook Support​

I've had a few folks reach out and ask if it's possible to run the Toolbox on macOS or a Chromebook. Unfortunately, I do not have a Mac nor do I know anyone that has one. It was also be considered piracy if I ran macOS in a VM... so It's with a sad heart that i confirm that the Toolbox may never run on macOS. As for Chromebooks, I believe it's possible to run Linux programs by enabling developer mode. I've tried setting up ChromeOS in a VM and wasn't able to get a stable environment for testing. If anyone has any ideas on how to set it up for running the Toolbox please do not hesitate to let me know! Thanks!

Reporting Issues​

Even though I feel like a large majority of distros shouldn't have too much problems with the Toolbox, I think it's safe to say that it may struggle to run on some. It's impossible to account for every distro as they're all different and setup differently then one another... but that doesn't mean we can't still try, right? Please, if you come across any issues with the Toolbox (or Installer) on your distro please share info regarding your distro (such as what it is, what version of Python it runs, what its based on, etc) with us so we can look into resolving those issues as quickly as possible. Thank you!

Closing Thoughts​

Again, I'd like to sincerely apologize for taking so long to get this build out to you guys. You've all been very patient and supportive, and I'd like to thank you all so much! As always, you guys are legends!

Of course I have to give a shoutout to a wonderful friend of mine... @blaacksheep. He's probably sick and tired of reading this by now.. but I have to give credit where credit is due. He is the sole reason why Toolbox V4.0 and the Installer are so stable right now! He has informed me of so many bugs and issues that were overlooked and thankfully prevented me from releasing some pretty broken tools/subtools. I kept telling him I wanted to release it and he hit me with the cold water and helped me see that it wasn't quite ready yet. He's always been looking out for everyone and just wanted you all to get the best experience you deserved. THANKS my friend, you are an absolute legend!

Phew, that was a long one! Felt like I was writing a novel. Anyway, thank you all for taking the time to read this post. I really do appreciate it!

I hope everyone is having a great Saturday, and an even better weekend! Stay safe folks, and until next time... Peace!