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
The following allows you to very easily flip between languages and country on Android. | |
This will IMMEDIATELY cause the change without even needing to shut down the target testing app. | |
(That is, the currently displayed page will reloaded.) | |
You first need to install this APP on the phone: | |
https://play.google.com/store/apps/details?id=net.sanapeli.adbchangelanguage&hl=en | |
Then to flip copy and paste one of the lines below in a terminal. |
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
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
You can add this to your shell profile and then use it as dexcount file. | |
This file should have a classes.dex in order to work, that means it has to be a android lib project or android apk. | |
count(){ | |
mkdir temp >/dev/null | |
cp $1 temp/$1+copy > /dev/null | |
unzip temp/$1+copy -d temp/ > /dev/null | |
cat temp/classes.dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
rm -R temp > /dev/null | |
} |
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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install build-essential curl git | |
git clone git://github.com/creationix/nvm ~/nvm | |
. ~/nvm/nvm.sh | |
nvm install v0.8.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
public class GoogleServiceAuthExampleActivity extends ListActivity { | |
private static final String TAG = GoogleServiceAuthExampleActivity.class.getName(); | |
GoogleServiceAuthenticator authenticator; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
authenticator = new GoogleServiceAuthenticator(this); | |
Account[] accounts = authenticator.getGoogleAccounts(); |