cfm880@cfm880:~$ adb devices
List of devices attached
93CY18K0U no permissions (missing udev rules? user is in the plugdev group); see [http://developer.android.com/tools/device.html]
cfm880@cfm880:~$ lsusb
Bus 002 Device 002: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0e0f:0008 VMware, Inc. Virtual Bluetooth Adapter
Bus 001 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
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
project art/ | |
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc | |
index b9d51c1125..f034a3db4f 100644 | |
--- a/runtime/mem_map.cc | |
+++ b/runtime/mem_map.cc | |
@@ -504,6 +504,11 @@ MemMap* MemMap::MapFileAtAddress(uint8_t* expected_ptr, | |
DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) | |
<< ((error_msg != nullptr) ? *error_msg : std::string()); | |
flags |= MAP_FIXED; |
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
project frameworks/base/ | |
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java | |
index db5dcc5c264b..404db6dfaf64 100644 | |
--- a/core/java/android/app/Activity.java | |
+++ b/core/java/android/app/Activity.java | |
@@ -741,6 +741,7 @@ public class Activity extends ContextThemeWrapper | |
OnCreateContextMenuListener, ComponentCallbacks2, | |
Window.OnWindowDismissedCallback, | |
AutofillManager.AutofillClient, ContentCaptureManager.ContentCaptureClient { |
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
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
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 | |
function gbk2utf(){ | |
file="$1" | |
echo "处理文件 '$file' ..." | |
iconv -f gb2312 -t UTF-8 -c "$file" > tmp | |
mv -f tmp "$file" | |
} | |
function getdir(){ | |
for element in `ls $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
#!/usr/bin/env bash | |
git_hash=kkkk | |
if [ -z $git_hash ]; | |
then | |
echo "$i 是空字符串" | |
else | |
git reset --hard ${git_hash} | |
fi |
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
#!/usr/bin/env bash | |
devices_info=`adb devices` | |
echo $devices_info | |
devices_info=`echo ${devices_info} | sed 's/^List of devices attached//'` | |
devices_info=(${devices_info}) | |
device_names="" | |
for(( i=0;i<${#devices_info[@]};i++)); | |
do | |
if [ $((i%2)) == 0 ]; then | |
device_names=${device_names}" "${devices_info[i]} |
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
#!/usr/bin/env bash | |
devices_info=`adb devices` | |
echo $devices_info | |
devices_info=`echo ${devices_info} | sed 's/^List of devices attached//'` | |
devices_info=(${devices_info}) | |
device_names="" | |
for(( i=0;i<${#devices_info[@]};i++)); | |
do | |
if [ $((i%2)) == 0 ]; then | |
device_names=${device_names}" "${devices_info[i]} |
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 | |
curl https://api.github.com/users/zhanxiaokai/repos | grep "clone_url" | sed "s/ \"clone_url\": \"/ /g" | sed "s/\",/ /g" > clone_url.txt | |
cat clone_url.txt | while read line | |
do | |
git clone $line | |
done |
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 | |
function replaceDate() { | |
formfat_date="`LC_ALL='C' TZ='Asia/Shanghai' date -u`" | |
date_long="`date +%s`" | |
echo ${formfat_date} | |
echo ${date_long} | |
sed -i "s/ro.build.date=.*/ro.build.date=$formfat_date/g" build.prop | |
sed -i "s/ro.build.date.utc=.*/ro.build.date.utc=$date_long/g" build.prop | |
} |
NewerOlder