Posts

Showing posts with the label Advance Android

How To Create a Scaling Image View in Android

Custom Scaling Image View Images comes in all shapes and sizes. If the Android apps tried to render a big resolution image, some device may throw an error like Android canvas is trying to draw large bitmap error. The solution is to load large bitmap efficiently by loading the lower resolution version in the memory. We will resize the image. Below is a code example of scaling image view. It scale down the bitmap base on its measured width in the app UI. Feel free to modify the code to fit into your project solutions.

How To Unit Test Android ViewModel With LiveData & Kotlin Coroutines

Image
In this blog posts, I will show you a project that demonstrate unit testing for ViewModel with LiveData with Kotlin Coroutines that follows a basic MVVM or MVI Architecture. We will write a unit tests for a ViewModel that makes a network call to validate if its behaving as expected or not. The implementation is already in my Bitbucket. Checkout this commit  You should go through the project and come back here. The project follows a basic MVVM architecture and has the full unit test implementation. Basically the unit tests mock, spy and observe the object and its dependencies and we'll use assertions and verifications methods. We never really uses production data in unit-tests. We never really uses actual objects in unit tests. Unit tests as its name implies `unit` is a test of smaller parts of a large system. Your project must be testable to begin with. The objects or classes in your system must be mockable. If not you should do some re-work. You can do some research on how to w...

How To Debug Android Applications Without Using Android Studio IDE | Introduction To Java Debug Wire Protocol

With Android Studio IDE, the debugging of an Android apps is much easier. But if you have decided to develop an Android apps without using any IDE then this blog posts will be helpful for you. See here w hy would anyone wants to develop Android apps or modules without Android Studio? Disclaimer:  This guide is provided "as is" with no warranties with regard to the accuracy and completeness of the information provided herein. I expect you to have an inquisitive mind to try things out, and the patience to first google and try to find answers to simple questions. Introduction to JDB (Java Debugger) JDWP is a very useful tools for debugging Java applications or any JVM-like applications. Since Android programs is basically a Java, we can use then the JDB to debug our Android applications. How To Use The JDB Let's get it to the point and straight to the process of using the JDB. Make sure you have the JDB ...

Security Vulnerability Scanner for iOS and Android

Image
  "Test if your Mobile App has any security flaws and fixes it before it damages your business reputation." Mobile usage is rising, so Mobile apps. The latest research shows that 38% of iOS and 43% of Android APP had high-risk vulnerabilities. If you are the owner, the developer, then you should do all it takes to secure your mobile app. There is plenty of security vulnerability scanner for the website, and the following should help you to find the security flaws in Mobile apps. 0001 Quixxi Quixxi is an intelligent and integrated end-to-end mobile app security solution​. This powerful tool is for developers to protect and monitor any mobile app in minutes.​ You can upload your Android or iOS application file here . 0002 ImmuniWeb ImmuniWeb is an online app scanner to test application against OWASP mobile top 10 vulnerabilities. It performs static and dynamic security tests and provides an actionable report. You can upload your  Android or iOS applicat...

CTF Practice - Reverse Engineering Android Apps 101

Image
Introduction On this blog we will crack some real world unsecured Android applications. For educational purpose only! Disclaimer:  This guide is provided "as is" with no warranties with regard to the accuracy and completeness of the information provided herein. I am not responsible for any bad outcomes you or anyone may have because you followed this guide. I expect you to have knowledge of some programming language (Java, Kotlin, C/C++, C#), an inquisitive mind to try things out, and the patience to first google and try to find answers to simple questions. Environment : OpenJDK 8 Android Studio SDK Visual Studio Code IDE with APKLab Reverse Engineering Android Apps - DEX Bytecode The goal of this exercise is to crack a real world Android apps to bypass the verification code to become a premium user. Step 0x1 Download the Apk . Step 0x2 Decompile the APK with Visual Studio Code. Step 0x3 Examine the manifest. We see that it only have one activity. Step 0x4 Look for if-else co...

The Importance Ethical Hacking | Penetration Testing | Finding Security Loopholes

Image
For educational purpose only! Disclaimer:   This guide is provided "as is" with no warranties with regard to the accuracy and completeness of the information provided herein. I am not responsible for any bad outcomes you or anyone may have because you followed this guide. You should  think like and act as an adversary to protect your own system . Image by Jae Rue from Pixabay What Is Ethical Hacking? Hackers can bypass security, gain illegal access to perform malicious activities. It is illegal. Ethical hacking is a legal variations of hacking. Companies can hire them to find security weakness in their systems before it falls into the wrong hands. Types Of Hackers White hat hackers This is the ethical hackers. Grey hat hackers Black hat hackers Suicide hackers Types of Ethical Hacking Network hacking Database hacking Website hacking Computer and mobile hacking Email hacking The Importance Of Ethical Hacking The main purpose of ethical hacking is to help companies to find the...

How To Use The New Android 7.0 Signature Scheme V2 For More Protection Against Unauthorized Alteration To APK Files

Image
Android 7.0 introduces APK Signature Scheme v2, a new app-signing scheme that offers faster app install times and more protection against unauthorized alterations to APK files. If your app is still using the V1 signature scheme then a hacker can easily tamper the digital signature of your APK files using the nkstool. Click here to learn how . If you're using the V2 signature then the nkstool won't work, it will run with error like this: The nkstool will look for the file called ***.RSA which contains your digital signature. If you are using the V2 signature scheme then that RSA file is no longer needed and it will not be included in your release package. Enable V2 Signature To use this new signature scheme, simply set minSdkVersion to api 24 or set the v2SigningEnabled to true in your module gradle build.   android {     ...     defaultConfig { ... }     signingConfigs {       release {         storeFile fil...