google services has stopped wont stop long enough for me to fix the problem cant even get into my settings

google services keeps looping gives me no time to fix due to it just keeps forcing me back to same looping message cant even get into my settings for long enough to repair because it just throws me back to the same looping error screen

System Settings and sound missing

I had a problem with my left audio front panel and I was trying to fix it. I searched for a solution for my problem in other sites and I execute a code to eliminate the pulse folder. However, the configuration system and the control volum are missing now. I try to install gnome and pavucontrol. But the system returns the same message:”Unable to fetch some archives, maybe run apt-get update or try with –fix-missing”.

Settings class implementation

I have a settings.txt file with the following format:

property=value another_property=value  category.sub_category.property_name=value 

And a Settings class that reads the properties out of this file and uses reflection to assign values to the corresponding fields within the class and it’s subclasses:

public final class Settings {     private Settings(){}      public static void loadSettingsFile(){          String dir = System.getProperty("user.dir") + "/settings.txt";         try {             List<String> lines = Files.readAllLines(Paths.get(dir));             for(String str : lines){                 String[] property = str.split("=");                 if(property.length == 2)                     setProperty(property[0], property[1]);             }         } catch (Exception e) {             System.out.println("Settings file not found");         }     }      public static void setProperty(String name, String value){         try {             @SuppressWarnings("rawtypes")             Class target = Settings.class;             int lastDot = name.lastIndexOf('.');              if(lastDot != -1){                  String classPath = Settings.class.getPackage().getName();                 classPath += ".Settings$  " + name.substring(0, lastDot).replace('.', '$  ');                  target = Class.forName(classPath);                 name = name.substring(lastDot + 1);             }              Field property = target.getField(name);              switch (property.getType().getName()) {             case "boolean":                 property.set(null, value.equals("true"));                 break;             case "int":                 property.set(null, Integer.parseInt(value));                 break;             case "double":                 property.set(null, Double.parseDouble(value));                 break;              default:                 System.out.println("Could not set property '" + name + "' - unsupported field type: " + property.getType().getName());                 return;             }          } catch (NoSuchFieldException | ClassNotFoundException e) {             System.out.println("Can't find or access property: " + name);         } catch (IllegalAccessException | SecurityException e) {             System.out.println("Can't set property '" + name + "' to " + value);             e.printStackTrace();         } catch (Exception e) {             System.out.println("Can't set property '" + name + "' to " + value);         }     }           /*------------------------------        settings fields start here     ------------------------------*/      public static String mode = "training AI";      public static class map{         private map(){}          public static int width = 35;         public static int height = 30;         public static boolean generate_random_walls = false;         public static int random_walls_count = 10;     }      public static class training{         private training(){}          public static String algorithm = "genetic";         public static String custom_ann_file = "default.ann";          public static boolean override_ann_file_settings = false;         public static String sensory_input = "basic";         public static int smell_precision = 1;         public static boolean interfering_outputs = false;          // more settings...     }      // more subclasses containing settings... } 

I find it convenient to be able to access these settings OOP style from anywhere in my program, I prefer it over a Settings.get(String name) solution because that way the IDE shows me what settings there are so I don’t have to remember all their names.

Are there any disadvantages to this solution?

Also I’m not sure about the naming convention, should I make the setProperty(...) method convert property names to match normal Java naming convention or is it ok to have the settings names match the settings file naming convention?

category.sub_category.property_name convert name to: Settings.Category.SubCategory.propertyName 

Remove Backup and Factory reset option from Settings app [duplicate]

This question already has an answer here:

  • Is there a way to disable access to certain Settings components? 4 answers
  • How to delete a date and time tab in setting to prevent user from changing it? 1 answer

I want to remove some features from my settings app (device is rooted)

I used adb shell pm disable ‘com.android.settings/.Settings$ SecuritySettingsActivity’ to disable security settings and it worked. However, I am unable to find the activity name to disable backup and factory reset option.

Here is the AndroidManifest.xml of the settings.apk (I’m using LineageOS)

So far I have tried

adb shell pm disable ‘com.android.settings/.BackupSettingsActivity’

and

adb shell pm disable ‘com.android.settings/.Settings$ PrivacySettingsActivity’

Both of which did absolutely nothing. I am still able to open backup and reset option from settings.

When I try to launch the said activities

adb shell am start -n com.android.settings/.BackupSettingsActivity

It errors out at saying BAD COMPONENT

while these two commands open the back and reset activity that I want to disable

adb shell am start -a android.settings.BACKUP_AND_RESET_SETTINGS

adb shell am start -S ‘com.android.settings/.Settings$ PrivacySettingsActivity’

Migrate UniFi AP to new UniFi Controller (without losing settings)

I was running my UniFi Controller on a Raspberry Pi when my SD card failed. The UniFi AP that was previously connected to that controller is still working normally.

So I’ll have to re-setup a new UniFi Controller and connect the AP to this the controller. How can I do that without losing the settings that are already provisioned on the AP?

The solutions I found online involve backing up settings from the old Controller, but obviously those solutions are not applicable in my case.

Mail.app keeps changing my STMP settings

I’ve setup my email account with Mail.app. However, I cannot send mail.

The reason for this is that whenever I try to send mail, Mail.app always selects a legacy STMP server, which I used to have configured, instead of whichever one selects.

It gets to the point where if the dialogue for selecting an STMP server comes up, and I select a different one, it’ll still use the legacy one. When I click “Edit SMTP server list” I can change the list, however, the very next time I open that list, all my changes are discarded, and the legacy server is back.

How do I nuke Mail.app?