reference
adb modify mobile proxy mode_userwyh's blog-CSDN blog_adb shell settings put global http_proxy
Mobile phone simulator installs certificate and captures packets
Android phone uses adb to add system certificate method - Programmer Sought
Set device proxy (requires ROOT
Set proxy:
adb shell settings put global http_proxy proxy IP address: port number
like:
adb shell settings put global http_proxy 127.0.0.1:8888
Remove proxy:
adb shell settings delete global http_proxy
adb shell settings delete global global_http_proxy_host
adb shell settings delete global global_http_proxy_port
fast copy
settings delete global http_proxy
settings delete global global_http_proxy_host
settings delete global global_http_proxy_port
Note: After removing the proxy, the phone needs to be restarted to take effect. The setting proxy can be set multiple times, and it will take effect immediately.
If the device has no del method:
Use (from: adb connect Xiaoyao Simulator, and automatically set and clear proxy - Lin Yufeng - Blog Garden )
settings put global http_proxy :0
Or (from: Android adb settings remove proxy_wuyahui0124505's blog - CSDN blog )
The solution is to find settings.db in sqlite and delete the proxy information in the database (Root is required)
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> select * from global;
-
sqlite> delete from global where name="global_http_proxy_host";
-
sqlite> delete from global where name="global_http_proxy_port";
-
sqlite> delete from global where name="http_proxy";
Then restart the device: reboot
Install the certificate on the Android device
OpenSSL needs to be installed. You can go directly to openSSL-Windows to install it.
First download the fiddler root certificate FiddlerRoot.cer from http://127.0.0.1:8888
1. Convert the root certificate to pem format:
openssl x509 -inform der -in FiddlerRoot.cer -out burp.pem
2. View the information of the PEM certificate
openssl x509 -subject_hash_old -in burp.pem
Copy the name in the result, and rename the pem file to: name.0 in the hash result (eg: 269953fb.0)
3. Install the certificate: adb push 269953fb.0 /system/etc/security/cacerts/ (copy the file to the corresponding certificate directory)
4. Modify the file permission to 644
adb shell
cd /system/etc/security/cacerts/
chmod 644 269953fb.0
ls -la
Confirm whether the permission is readable and writable by the current user (644 permission-rw-r--r--)
(permission number meaning: read r=4, write w=2, execute x=1, 644 is (4+2) (4 ) (4), namely [current user] read and write permissions, [group user] read permissions, [other] read permissions.)
About how to completely uninstall Fiddler
Unable to install FIDDLE, prompting that FIDDLE exists, but cannot find it
打开Fiddle,提示“Machine-wide Progress Telerik Fiddler installation has been found at ...Please, use that one or uninstall it ...”
Solution steps:
1. Windows button + R
2. Enter regedit + Enter + Yes
3. Enter the registration form
4. Delete the following:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fiddler2"
"HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Fiddler2"