This file contains hidden or 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
ip link add link eth0 name eth0.$VLAN_ID type vlan id $VLAN_ID | |
eg. ip link add link eth0 name eth0.100 type vlan id 100 -> Add eth0.100 interface |
This file contains hidden or 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
Ethernet:- | |
- Make ethernet_bw.sh file. | |
- Copy below code snippet in file. | |
#!/bin/sh | |
INTERVAL="1" # update interval in seconds | |
while true | |
do | |
R1=`cat /sys/class/net/eth0/statistics/rx_bytes` | |
T1=`cat /sys/class/net/eth0/statistics/tx_bytes` |
This file contains hidden or 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
Open the following file from Android framework. | |
- /android/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java | |
- Go to "doKeyguardLocked(Bundle options)" function. | |
- Add below code at appropriate place. | |
+final boolean disableLockScreenForever = SystemProperties.getBoolean("keyguard.disable", true); | |
+if(disableLockScreenForever){ |
This file contains hidden or 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
Open the following file from Android framework. | |
- /android/frameworks/base/services/java/com/android/server/ConnectivityService.java | |
- Add below code at appropriate place. | |
// the set of network types that can only be enabled by system/sig apps | |
List mProtectedNetworks; | |
+// Wifi/Eth coexist strategy V0.3 | |
+private NetworkInfo mSecondaryNetworkInfo = null; |
This file contains hidden or 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
Open the following file from Android framework. | |
- /android/frameworks/base/services/java/com/android/server/wm/WindowManagerService.java | |
- Go to "computeForcedAppOrientationLocked" function. | |
- Add below code at appropriate place. | |
int req = getOrientationFromWindowsLocked(); | |
if (req == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) { |
This file contains hidden or 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
static final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | |
static SecureRandom rnd = new SecureRandom(); | |
String randomString( int len ){ | |
StringBuilder sb = new StringBuilder( len ); | |
for( int i = 0; i < len; i++ ) | |
sb.append( AB.charAt( rnd.nextInt(AB.length()) ) ); | |
return sb.toString(); | |
} |
This file contains hidden or 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 add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get -y update | |
sudo apt-get install -y openjdk-8-jdk | |
This file contains hidden or 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 currently running services | |
dumpsys -l | |
Print memory information | |
dumpsys meminfo | |
Print all crashed logs | |
dumpsys dropbox --print | |
Provide all netstat entries |
This file contains hidden or 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
0 = Success | |
1 = Operation not permitted | |
2 = No such file or directory | |
3 = No such process | |
4 = Interrupted system call | |
5 = Input/output error | |
6 = No such device or address | |
7 = Argument list too long | |
8 = Exec format error | |
9 = Bad file descriptor |
This file contains hidden or 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
Checking API: checkapi-last | |
out / target / common / obj / PACKAGING / public_api.txt: 23556: error 12: Class android.telephony.gsm.SmsMessage changed static qualifier | |
prebuilts / sdk / api / 19.txt: 23513: error 9: Removed public constructor SmsMessage () | |
prebuilts / sdk / api / 19.txt: 23514: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength | |
prebuilts / sdk / api / 19.txt: 23515: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength | |
prebuilts / sdk / api / 19.txt: 23516: error 9: Removed public method android.telephony.gsm.SmsMessage.createFromPdu | |
prebuilts / sdk / api / 19.txt: 23517: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayMessageBody | |
prebuilts / sdk / api / 19.txt: 23518: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayOriginatingAddress | |
prebuilts / sdk / api / 19.txt: 23519: error 9: Removed public method android.telephony.gsm.SmsMessage.getEmailBody | |
prebuilts / sdk / api / 19.txt: 23520: e |