Test-Keys means it was signed with a custom key generated by a third-party developer.
Does it mean my device is rooted?
The fact that you have not been able to apply official firware updates ( which check for root ) indicates that the device may be rooted (in addition ). You can verify in alternate ways (other than apps ) as mentioned here How can I tell if I have root?
https://android.stackexchange.com/questions/176083/does-test-keys-mean-device-is-rooted
private boolean detectTestKeys() {
String buildTags = android.os.Build.TAGS;
return buildTags != null && buildTags.contains("test-keys");
}
This binary is installed when you try to root your phone using apps like kinguser or via fastboot in Android. These files are necessary so that one can root their phone and become the superuser.
private String[] binaryPaths= {
"/data/local/",
"/data/local/bin/",
"/data/local/xbin/",
"/sbin/",
"/su/bin/",
"/system/bin/",
"/system/bin/.ext/",
"/system/bin/failsafe/",
"/system/sd/xbin/",
"/system/usr/we-need-root/",
"/system/xbin/",
"/system/app/Superuser.apk",
"/cache",
"/data",
"/dev"
};
/**
* @param filename - check for this existence of this
* file("su","busybox")
* @return true if exists
*/
private boolean checkForBinary(String filename) {
for (String path : binaryPaths) {
File f = new File(path, filename);
boolean fileExists = f.exists();
if (fileExists) {
return true;
}
}
return false;
}
private boolean checkForSuBinary() {
return checkForBinary("su"); // function is available below
}
If a device has been rooted, more often than not Busybox has been installed as well. Busybox is a binary that provides many common Linux commands.
private boolean checkForBusyBoxBinary() {
return checkForBinary("busybox");//function is available below
}
public static boolean a(Context context) {
return (context.getApplicationContext().getApplicationInfo().flags & 2) != 0; //2 or ApplicationInfo.FLAG_DEBUGGABLE
}
https://medium.com/@deekshithmoolyakavoor/root-detection-in-android-device-9144b7c2ae07
Great. I learned your ways to play the game better.