This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public int numIslands(char[][] grid) { | |
if(grid.length == 0) return 0; | |
int numIslands = 0; | |
for (int i = 0; i < grid.length; i++) { | |
for (int j = 0; j < grid[i].length; j++) { | |
char currentPoint = grid[i][j]; | |
if(currentPoint == '1') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for a binary tree node. | |
* public class TreeNode { | |
* int val; | |
* TreeNode left; | |
* TreeNode right; | |
* TreeNode(int x) { val = x; } | |
* } | |
*/ | |
class Solution { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all packages available on device | |
adb shell pm list packages | |
# Get the apk path for a given package. e.g. "com.whatsapp" | |
adb shell pm path com.whatsapp # stdout -> package:/data/app/com.whatsapp-QFa1SvnqTnITvgcxOiQj5A==/base.apk | |
# Download the apk | |
adb pull /data/app/com.whatsapp-QFa1SvnqTnITvgcxOiQj5A==/base.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# decompile apk | |
java -jar apktool.jar -f d source_apk.apk -o destination_project --frame-path frameworks | |
# rebuild decompiled apk | |
java -jar apktool.jar -f b destination_project -o destination_apk.apk --frame-path frameworks | |
# sign rebuit apk | |
java -jar uber-apk-signer.jar --debug -a destination_apk.apk --overwrite --allowResign | |
# install it | |
adb install -r destination_apk.apk | |
apktool -> https://ibotpeaches.github.io/Apktool/install/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./gradlew clean build generateRelease | |
apply plugin: 'maven' | |
def groupId = project.PUBLISH_GROUP_ID | |
def artifactId = project.PUBLISH_ARTIFACT_ID | |
def version = project.PUBLISH_VERSION | |
def pomName = project.NAME | |
def pomDescription = project.DESCRIPTION | |
def pomWebsite = project.WEBSITE | |
def localReleaseDest = "${buildDir}/release/${version}" |