Huawei enabling ADB via system setting

dhj49er

Well-known member
I recently acquired a Huawei P30 Pro New Edition and after importing my macros from my previous phone, I found the macro that toggles ADB via system settings wasn't toggling the USB Debugging setting.
Somewhat disappointed as I thought I would have to use a UI macro, I started to experiment and found that enabling another setting first, allow_charging_adb, then setting adb_enabled, set USB Debugging.
Also to disable USB Debugging only the allow_charging_adb needs to be disabled
I've attached a screenshot of the macro I use.
I use Nova 7 as my launcher. This has a great feature of allowing Swipe up or down gesture on a home page icon to run a shortcut or app. I have a few categories in Macrodroid that contain macros that Toggle settings.
The shortcut macro is a user prompt action for one of these categories. The second screenshot shows the user prompt after swiping the home screen icon.
The P30 Pro is running Android 10. The system settings may not be available on all Huawei phones, but it's worth checking, especially if you use ADB frequently.
 

Attachments

  • Screenshot_20220413_072849_com.arlosoft.macrodroid.jpg
    Screenshot_20220413_072849_com.arlosoft.macrodroid.jpg
    354.8 KB · Views: 29
  • Screenshot_20220413_072715_com.arlosoft.macrodroid.jpg
    Screenshot_20220413_072715_com.arlosoft.macrodroid.jpg
    321.9 KB · Views: 30
Last edited:

dhj49er

Well-known member
I'm sorry but I no longer have the P30 Pro New Edition phone and don't have access to individual macros from the phone, just backups of all the macros. Unfortunately you currently can't extract a single macro from the backup files.

It is relatively easy to write the macro using the screenshot to guide you. This would also help you gain some experience in creating macros.

Give it try....that's how I started writing my macros.
 

dhj49er

Well-known member
I've assembled some screen shots that show where the elements if the macro are located.

Do you know how to start a macro?

If not read the help guides.

The screenshots should help you create the macro.

Give it ago and post your macro if you need more help.

Good luck.
 

Attachments

  • Screenshot_20221215-080522~2.png
    Screenshot_20221215-080522~2.png
    164.6 KB · Views: 9
  • Screenshot_20221215-080607~2.png
    Screenshot_20221215-080607~2.png
    153.3 KB · Views: 9
  • Screenshot_20221215-080340~2.png
    Screenshot_20221215-080340~2.png
    218 KB · Views: 9
  • Screenshot_20221215-080657~2.png
    Screenshot_20221215-080657~2.png
    186 KB · Views: 7
  • Screenshot_20221215-080853~2.png
    Screenshot_20221215-080853~2.png
    126.2 KB · Views: 8

dhj49er

Well-known member
Sorry but I won't release my backup file, as it contains personal information.
However, I would be very interested in being able to extract a macro from a backup file.
Is this something you can share?
 

Endercraft

Moderator (& bug finder :D)
I would be very interested in being able to extract a macro from a backup file.
Is this something you can share?
It’s a JSON thing but I may be able to explain to you anyway (but you have to know where the macro data starts and ends).
I might share screenshots later when I use my laptop so you know where the data starts and ends, but I have to get a backup file first. Do you happen to have any backup file of any sort ? (you can create one if you want)
 
Top