Setting SElinux boolean may unlock Amazon tablets - Fire Q&A, Help & Troubleshooting

Guys. Everyone I need your undivided attention please. This might be it. This may be the key we have been seeking. However a once wise man said "these aren't the keys you're looking for" A true geek knows the reference. Now serious business.
Ok I did some research. So this Boolean folder is important. In fact this may be the jem we need.
In /system/bin you have two executables getsebool and setsebool. I'm going to explain this as easy as possible.
An*SELinux boolean*is a single string (hopefully sufficiently interpretable) that changes how SELinux reacts. With*getsebool*you can get a list of booleans and their current value. Changing SELinux booleans can be done through*setsebool*(where you add the desired state of the boolean, such as*on*or*off) or*togglesebool*(which flips the current value of a boolean).
Click to expand...
Click to collapse
Let's play a little game. Unfortunately for this to do anything, you need to be root already i think.
Code:
getsebool -a
This will list any booleans set in the SElinux policy and their values (on or off). On the HD 10, there is one boolean present. At the moment, this device is the only one I have run into that has anything set in the booleans. I own about a dozen different devices (phones and tablets) all of them work and are either rooted or boot loader unlocked (only my Moto E4 isnt). Not a single one of them have anything in the booleans in this folder, except for this HD 10. It is wiped clean on every other device. HD 10 boolean:
Code:
$ su
# getsebool -a
device_unlocked --> off
Here's the fun part:
Code:
# setsebool device_unlocked on
# getsebool device_unlocked
device_unlocked --> on
However there is a problem with changing this value, even being root:
When you do this, the changed value will take effect immediately but only for the duration that the current loaded policy is active. That means, if the system reboots, you loose the changes. Or when you explicitly would reload the SELinux policy, you loose the changes. On the other hand, switching booleans this way is fast and helps you to debug problems.
Click to expand...
Click to collapse
There is a way to change this, running a simple command. However I'm certain the bin file or files have been modified and the commands removed from the policy.
Code:
setsebool -P device_unlocked on
In a normal world, the above command would make the value we set persist upon a reboot. So why alter the policy? That doesn't make sense to me. I know as an OEM you can write said policy, but why go through the massive effort if only to leave this boolean in place? Now given this potential massive discovery, what does this now mean? Did I just do what I think I did? Was this really that easy?
I was not able to find the single log entry of the event on my HD 10. However the Fire 7, even with the custom ROM by @ggow, has the same boolean and value. I did the same steps on that tablet and I was able to get the single log entry. Can we get excited and jump...or cry for joy yet? I am totally lost in this neck of the woods.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
References:
https://wiki.gentoo.org/wiki/SELinux/Tutorials/Using_SELinux_booleans
https://www.thegeekdiary.com/understanding-selinux-booleans/

Related

[C#/VB] System.Windows.Forms extensions for updating properties from other threads.

As developers, we all hate how our code looks like when using multi-threading, and usually, it's a real pain managing all the invoke methods. Even using anonymous methods, it never seemed to be the best way for me.
So, I decided creating a library, that manages everything for you. It checks if InvokeRequired, and if it is, it invokes itself automatically without writing a line of code.
I know, you'll say, we can write a method like this one for ourselves whenever we need it. Just carry on reading to see what's special in this one.
I've written it dynamically, taking in consideration the performance of the code. And it turned out pretty great, as fast as if you had written your own methods, but with cleaner coding.
The library adds an extension called SetProperty() to each control in System.Windows.Forms namespace.
Let's say we have a TextBox called txt, and we want to edit the property txt.Text in it to "Hello!", a normal invoke method would look like this:
Code:
private void UpdateText(){
if(txt.InvokeRequired){
txt.Invoke(delegate{UpdateText();});
}else{
txt.Text = "Hello!";
}
}
Referencing my library, you'll only need to write this:
Code:
txt.SetProperty(TextBoxProperties.Text, "Hello!");
Sounds pretty easy, doesn't it?
This works, for every single control out there. Even if you created a custom one, it will work for you.
A list of the properties of each control is shown as an enumeration with all the details you may need to know in its summary:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
A screenshot showing how the code looks like:
This will definitely avoid any issues you may have with cross thread exceptions, and even represent your code in a real neat way.
You can download it from here.
Please keep both DLL and XML files in the same directory after extracting.
Everything's set, you just have to Add reference to the library to your application, and enjoy!
Just use anyControl.SetProperty() method on the go.
I'll release a documentation later, but any feedback for the moment would be appreciated!
Thank you
Best regards,
ClaudeNegm
reserved
bump

Is it possible to set a task to run between more than one time range?

I think that I know a way to accomplish what I am looking to do but it would require several profiles and several tasks. I'm new at this so I'm still working on wrapping my head around how tasker thinks and what it takes to get from point A to point B. I'm not looking for a step by step how to but more 1) to know if what I am trying to do is even possible 2) some pointers to get me pointed in the right direction if it is.
What I'm trying to accomplish, is a work profile that connects to wifi (that is the easy part) but then between the hours of say, 6 and 8, turn the volume down, turn the volume back up at break, turn the volume back down after break until 11am for lunch, turn it back up at lunch, and then back down for the remainder of the work day. What I am hoping, is that there is a way to create a task that allows me to turn the volume down if the time is between x and x or x and x or x and x.
Create two tasks. Task1 will put your phone on vibrate. Task2 will take phone off vibrate.
Create profiles for the time you want on vibrate calling for task1. On the profile you created, long-press the task and select an exit task. This will be task2.
Do this for all times you want using the same tasks.
Here is an example of how it should look...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thanks! That was exactly what I had done. I was just wondering if inside of the tasks themselves, you could set up time frames to do the specific tasks.. Its probably not an intelligent way to think or go about it.. I was just curious.
pulgoki said:
Thanks! That was exactly what I had done. I was just wondering if inside of the tasks themselves, you could set up time frames to do the specific tasks.. Its probably not an intelligent way to think or go about it.. I was just curious.
Click to expand...
Click to collapse
Well as long as it is all set to specific lengths of time, you could use task/wait and have the task actually running all day. But I don't know what that would do to battery life...
Can't you do it by time and have conditions? For example
IF %TIME > 07.59 And %TIME < 09.00
ELSE %TIME > 08.59 And %TIME < 10.00
ELSE %TIME > 09.59 And %TIME < 11.00
End if
Also just to mention the time stated in that variable seems to be 24hr format, regardless of system settings.

Can't load TWRP....

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What am I mucking up?
Followed Mr.iiwoodstocks guild on Reddit for the TX1254 and I don't know what im failing on....
The IMG is in the fast boot directory I've tried to rename it. Check out the screen shots I took anyone have some insight I've Google's the errors can't find a lot...
Sent from my VK410 using XDA-Developers mobile app
At the command prompt, type dir and press enter. What does the command prompt say the name of the image is?
I'll check when I get home! Haven't had a chance to take another crack at it.
Ultross said:
I'll check when I get home! Haven't had a chance to take another crack at it.
Click to expand...
Click to collapse
A lot of users were having an issue with the "feature" of windows that hides file extensions of known file types. So when you thought your twrp image was named "twrp," it was actually named twrp.img. When you thought it was named "twrp.img," it was actually named twrp.img.img. That's why fastboot doesn't see it. Typing dir at the command prompt will show you the true name. Flash it using the true name, and you'll be golden. I also recommend turning off "hide extensions of known file types" in your folder settings to avoid problems like this in the future.
Yea I have it set up like that on my PC thats locked down But I just reformatted the laptop with 7. Trying it in an hour.
Awesome close this up using dir to figure the true name worked!
Ultross said:
Awesome close this up using dir to figure the true name worked!
Click to expand...
Click to collapse
"Hide extension of known file types" is the most stupid thing Microsoft ever implemented as a default setting.
It's the reason teenage boys (and some men) clicking on "NakedCelebeiry.jpg" don't realize they are REALLY clicking on "NakedCelebeiry.jpg".EXE. Because Microsoft has hidden the file extension and the malware writers put jpg in the TITLE name to fool you. (And malware writers can also change the icon type.)
But if you can see the extension, it can't fool you. It literally is almost the first thing I do on almost any PC I use, even a friend's PC. I change that setting to see known file extensions.

[Request/Thought] Stock FM radio experience port for N960U?

I know it's been discussed before, but according to the N9600 variant getting root recently, the dev @Mentalmuso made up my mind with his WETA thread unsurprisingly the .apk I've been looking for was there but obviously it's unable to install for being a system thing which makes me wonder:
Since the system partition is untouchable without root (which is not in sight) and this apk has to be placed there to work, flashing it somehow is the only option I suppose.
Just for the clarification - I don't like the Next radio experience at all and I'll name the reasons from top to bottom:
1. No record button - this is the most critical for me. The Recforge workaround which I counted on no longer works here.
2. No RDS. There is a built in database that gathers up information on your current location and names the frequencies to the stations in this area. For people outside U.S.A this feature is useless.
3. No swipe for fast navigation across the dial. Inconvenient manual frequency typing forces me to empty the field then type in the desired value, must insert a "."dot for decimal separation.
4. Only odd numbers are displayed. It may as well pick up the even ones properly (since 2016 it should) but still display them as odds.
5. On screen advertisements - I wish to use a service that is already commercial, why do I need such obstacles in the way?
6. Load times - though quite minor flaw but Next radio has a splash screen for at least 2~3 seconds then it takes a few more seconds from the moment you push the operate button until you can hear a sound, compared to the stock operation which takes almost instantly. Also the seek buttons have a small delay in Next radio.
Again, only the miss of record is really bugging me to the point I consider a switch to N9600. If Recforge did it for me (or a sound recorder equivalent) I could live with the rest. Apart from this I'm completely fine unrooted.
Any idea of how to legit flash this .apk or a new way to record that doesn't involve aux and streaming?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Anyone please?
You can search about csc fm radio.

Question Engineering Mode hidden functions...

Ok so the shell launcher is still part of the Engineering App on our phones... can anyone or has anyone figured out how to trigger it?
This is the ONLY root vulnerability that exists for any Tmobile 10Pro / 10T bought after August 2022. Getting access to this shell is critical because it will be a default root, or root permission shell. And because it is for an app in the System partition, it will have exclusive access to the main system partition which will allow the ability to modify tthe build.prop file, at least enough to set ro.adb.secure to 0, and ro.secure to 0.... Then make the same changes to persist.ro.secure to 0 and persist.ro.adb.secure to 0. These commands can be issued with the debug root shell, simply by using the "setprop" command, while running with the authority of the system apps permissions.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Also, ... anyone know what the code is here??? Its not 6776 .... there are several places in the engineering menu that are password or code protected, just like the old Oneplus app... only this time the passcodes needed are numerical.
The only code that i know of is 6776 , but that one does not work for all..
One screen in particular beyond this one is the screen for writing a test message to the "Important" log... (the last bug was related to the log as well... so there might be something here.
to get to this screen run the
*#899# , select Manual Test, and slide to the far right screen. Click on Log test.
the other one pictured below is from
*#36446337# , menu . Select Engineer Network, then hit 'Lock Cell info' ...
lastly i know EVERYONE has been looking for a REAL Full Network unlock.
This code is 16 digits, and is confirmed to FULLY remove the network control of ANY carrier on the 10Pro ... This will disable the carrier policy restriction that keeps T-Mobile owners from flashing different regions, and their device locking.
*#3988691# - Network unlock
This will disable ALL region restrictions on your phone. Please share any info you might have regarding any of these.
If someone can get me thru this network unlock code, I will happily drop detailed instructions on how to leverage Diagnostic mode to enable 5G ONLY mode.... as well as how to enable missing bands, fix your VOLTE.... and Wifi Calling.... pretty much anything you want to access regarding missing features including Dual Sim cards, (as long gas you have the connections on your board!.
Help me... so that i can help everyone!
interesting
@beatbreakee , did you get anywhere with this?
I'm trying to figure out how to remove Operator region, basically switch to generic country region (currently set to Vodafone in the UK).
Used to be able to do it by unlocking secrecy mode, then *#3954391# (which activated a switch of some kind) and then *#391#. This tool you to a menu where you could select your phone's region and carrier (this is on ColorOS).
Codes no longer work. Wondering if it's within the 'Lock Cell Info' section????
Have u pulled the app or unpacked the enginering app from OTA or msmdownload

Categories

Resources