How to enable Install Via USB in Xiaomi Redimi Note 4? - android

I want to test the android app using android studio on Xiaomi Redimi Note 4 (MIUI Global 8.5) Phone. When i try to click the Install Via USB, it says the device is temporarily restricted 3-3 error. I have enabled USB Debugging.
I tried using VPN from google but it didn't worked. I also installed Plex VPN and tried to connect to China - Shanghai Server, but it says VIP plan and purchase it. I couldn't purchase it.
I couldn't find any solution to solve this error. Excepting solution from here..

Automated way
first of all download this .ovpn file.
Then download on your phone OpenVpn app.
Open the app, click on OVPN Profile, select the file previously downloaded and press import, then press add.
Now you have added the vpn connection with his relative settings, now switch on the button referred to the vpn connection in the section "OVPN profiles".
Manual way Open your vpn settings -> add a new vpn.
Fill these fields:
-Name: something
-Type: L2TP/IPSec PSK
-Server address: 49.4.1.77
-Pre-shared key: vpn
-Select show advanced options
-Forwarding routes: 0.0.0.0/0
-Username: vpn
-Password: vpn
The .ovpn file and the server address points to a chinese vpn that you can find on https://www.vpngate.net/en/
Please remember to tell to the other users if this answer helped you!

Related

Download the ssl certificate from website on Android device

Server's website is only accessible from my Android device (because a VPN connection is needed to access it).
My MacBook cannot connect to the website because the VPN connection is only available on the
phone.
How to download the SSL certificate from the website?
Below, I will demonstrate how to do this for google.com, but it will work for any website accessible on the phone
Connect an Android device to your computer (make sure USB debugging is on).
Open Google Chrome on your computer and go to chrome://inspect to show a list of debug-enabled WebViews on your device.
Click "Inspect".
Select "Security" and click on "View Certificate" as shown in the picture.
Now, drag the certificate icon (you could also drag a root CA certificate or an intermediate one) to your Desktop.
Done.

Install Trust Bundle Certificate on Android without Root or Warnings

I am having the most difficult time figuring out how to get a cell phone that will trust my local domain certificates without being very difficult or expensive.
Android devices tested up to 8.0 give a warning like: "Certificate authority installed by an unknown third party" or "Network May Be Monitored" on boot.
Is it possible to remove this message without rooting the phone? I need to set up always on VPN and SIP calling for the local pbx along with internal web sites. Android is the only offering with a native SIP client. But the warning causes too much trouble =/
The following worked for me in Android 8.
First transfer copy of the cert file to phone.
If using mkcert, the file location is found via CLI: mkcert -CAROOT
Then install the cert file in Android settings, the location of which varies per device and Android version.
In my phone it was in: Android Settings / General / Lock screen & security / Encryption & credentials / Install from storage
You might have to restart the phone. Also might have to click TRUST on the cert in Android settings.
Then enable Firefox secret settings by tapping multiple times on the Firefox logo in the About page, then in secret settings enable "Use third party CA certificates".
Voila!

How to intercept mobile traffic on Android?

I have a device (videocamera) with Android inside.
I have root access via ADB to the OS of the videocamera.
The camera sends data to the internet using a SIM card.
Is there a way to redirect the mobile traffic to a proxy, so that I could research it?
1) Seems that an apk like ProxyDroid may help, but it lacks the command line interface.
2) I tried redirecting the traffic using Access Point Name (APN), but is did not help.
The common tool for this is Charles Proxy, but you'd need to be able to install certificates on the host device.

debugging the android application in Visual Studio Xamarin to see the response from web api

Debug in Xamarin Visual Studio
How to debug the android application in Visual Studio Xamarin to see the response from web api? I am using Xamarin Visual Studio, ad making some http web api calls. the application is showing some random value which is not exactly the expected response from web api. In android studio it is possible to debug and figure out where the problem is. my question is, can we as well debug in Xamarin Visual studio. because when I put the debugger points the application doesn't just stop at the debugger, and I can not figure what exactly the problem is.
I would recommend installing Fiddler. Once you have that installed, fire it up and configure it to proxy as per the default configuration.
Then in your Android device or emulator configure the Wi-Fi to point at Fiddler on port 8888.
Once you have done this you will be able to see all the requests and responses in the Fiddler UI. The steps to perform this on the device or emulator are:
Swipe down from the top of the screen and tap the Settings icon.
Tap Wi-Fi.
Tap and hold your current Wi-Fi network. Select Modify Network
Tap the Show advanced options box.
Tap the Proxy settings dropdown and select Manual.
Type the IP address and port (usually 8888) of the Fiddler server.
Tap Save.
To verify this configuration, go to http://ipv4.fiddler:8888/. You should see the Fiddler Echo Service webpage, and the traffic should appear in Fiddler.

How do I configure Charles Proxy and Android so that I can view HTTPS sessions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
This post was edited and submitted for review 6 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I want to view HTTPS sessions on my Android phone using Charles Proxy. I need to see the raw request/response contents for debugging my app. I've configured Charles by adding the host and port under "Proxy Settings" -> SSL Tab. When I run the app, all SSL calls seems to disappear quickly from the Charles. Does any one has any idea how to configure Charles Proxy and my Android device so they'll work together? Charles documentation doesn't have information for Android devices.
for the Android7
refer to:
How to get charles proxy work with Android 7 nougat?
for the Android version below Android7
From your computer, run Charles:
Open Proxy Settings: Proxy -> Proxy Settings, Proxies Tab, check "Enable transparent HTTP proxying", and remember "Port" in heart.
SSL Proxy Settings:Proxy -> SSL Proxy Settings, SSL Proxying tab, Check “enable SSL Proxying”, and add . to Locations:
Open Access Control Settings: Proxy -> Access Control Settings. Add your local subnet to authorize machines on you local network to use the proxy from another machine/mobile.
In Android Phone:
Configure your mobile: Go to Settings -> Wireless & networks -> WiFi -> Connect or modify your network, fill in the computer IP address and Port(8888):
Get Charles SSL Certificate. Visit this url from your mobile browser:
http://charlesproxy.com/getssl
In “Name the certificate” enter whatever you want
Accept the security warning and install the certificate. If you install it successful, then you probably see sth like that:
In your phone, Settings -> Security -> Trusted credentials:
Done.
then you can have some test on your mobile, the encrypted https request will be shown in Charles:
Edit - this answer was for an earlier version of Charles. See #semicircle21 answer below for the proper steps for v3.10.x -- much easier than this approach too... :-)
For what it's worth here are the step by step instructions for this. They should apply equally well in iOS too:
Open Charles
Go to Proxy > Proxy Settings > SSL
Check “Enable SSL Proxying”
Select “Add location” and enter the host name and port (if needed)
Click ok and make sure the option is checked
Download the Charles cert from here: Charles cert >
Send that file to yourself in an email.
Open the email on your device and select the cert
In “Name the certificate” enter whatever you want
Click OK and you should get a message that the certificate was installed
You should then be able to see the SSL files in Charles. If you want to intercept and change the values you can use the "Map Local" tool which is really awesome:
In Charles go to Tools > Map Local
Select "Add entry"
Enter the values for the file you want to replace
In “Local path” select the file you want the app to load instead
Click OK
Make sure the entry is selected and click OK
Run your app
You should see in “Notes” that your file loads instead of the live one
Thanks for #bkurzius's answer and this update is for Charles 3.10+. (The reason is here)
Open Charles
Go to Proxy > SSL Proxy Settings...
Check “Enable SSL Proxying”
Select “Add location” and enter the host name and port (if needed)
Click ok and make sure the option is checked
Go to Help > SSL Proxying > Install Charles Root Certificate on a Mobile Device or Remote Browser..., and just follow the instruction. (use the Android's browser to download and install the certificate.)
In “Name the certificate” enter whatever you want
Click OK and you should get a message that the certificate was installed
See here:
http://jaanus.com/blog/2012/02/12/debugging-http-on-an-android-phone-or-tablet-with-charles-proxy-for-fun-and-profit/
You would need to install the charles.crt certificate to your device.
I wasted 1 day finding the issue , my system was not asking connection "allow" or "reject". i though it was due to some certiifcate issue .
tried all methods mentioned above but none of them worked . in the end i found "Firewall was real culprit ". if firewall settings is ON , they will not allow charles to connect with your laptop via proxy IP . make them off and all things will work smoothly .Not sure if that was relevent answer but just want to share.
The top rated answers are working perfect (a bit old but still working), but I just want to mention that since Android N we all can configure your apps in order to have diff trust SSL certificates (for release , debug only and so on), including Charles SSL Proxy certificate (if you download the Charles certificate and put .pem file in your raw folder). More info can be found here: https://developer.android.com/training/articles/security-config.html
Also the official Charles documentation can be useful to setup this : https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/
Hope this will help to setup Charles inside your app project not on every single Android device.
For the newer emulator it might be helpful to launch from command line using:
emulator -netdelay none -netspeed full -avd <emulator_name> -http-proxy http://<ip-address>:8888
Make sure you follow #User9527's advice above as well for the rest of the setup
I figured the issue. Its because Charles 3.7 has some bugs for Android devices. I updated to Charles 3.8 Beta version and seems to working fine for me.
For me the issue was the IP address that charles was telling me to route to in my proxy settings was incorrect. To solve I ended up going to ifconfig in the terminal and the trying the different IP addresses (listed next to inet) at port 8888 for the current active connections

Categories

Resources