Ubuntu使用小技巧

来源:互联网 发布:linux目录结构 编辑:程序博客网 时间:2024/05/22 10:23

【找回消失的IBus图标】ibus-daemon -drx
方法一:在终端中输入:
killall ibus-daemon
ibus-daemon -d

方法二:在终端中输入:
gconftool --type boolean -s /desktop/ibus/panel/show_icon_on_systray true
gconftool --type boolean -s /desktop/ibus/panel/show true
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

无法输入中文:
在.profile末尾添加:
export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
在.bashrc末尾添加:
export XIM=xim
export XIM_PROGRAM=xim
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus

无法切换输入法时:在输入框右键-input Methods-选择ibus
【ibus设置】ibus-setup
卸载:sudo apt-get remove fcitx*
查看是否卸载:sudo dpkg --get-selections | grep fcitx


sudo apt-get autoremove  要移除的软件包名
sudo apt-get install  要安装的软件包名
要安装 .deb 套件包时:
sudo dpkg -i package_file.deb
要反安装 .deb 套件包时:
sudo dpkg -r package_name
【安装Google输入法】sudo apt-get install ibus-googlepinyin
想要按下Ctrl+Alt +A 来实现区域截图依次打开 系统设置 > 键盘 > 快捷键 > 自
定义快捷键 > +,在【name】输入 screenshot , 【command】输入
gnome-screenshot -a ,点击【apply】确定后,再点击disable 禁用,接着就同
时按下 Ctrl+Alt +A 就可以成功设置截图快捷键了
ksnapshot截图:ksnapshot -region
【alt+table无效】
sudo apt-get install compizconfig-settings-manager
系统工具-首选项-compizConfig配置管理: 点击左边窗口管理,把右边Static
Application Switcher那个勾打上


反编译命令:
./apktool d AfwTestSystemUtil.apk ./Recompile/AfwTestSystemUtil
sh dex2jar/dex2jar.sh AfwTestSystemUtil.apk

adb shell pm list packages列出包名
直接打开终端目录:nautilus .
打开home目录:nautilus
/local2/Tools/Programs/ADT-bundle/android-sdk-linux/tools /hierarchyviewer 查找布局文件


adb bugreport > xxx.log从开机之后详细的dumpsys,dumpstate和logcat信息,是
一份完整的日志记录。对分析用户行为,异常信息,系统状态有很 大的参考作用
【dumpsys [options]】
             meminfo 显示内存信息
             cpuinfo 显示CPU信息
             account 显示accounts信息
             activity 显示所有的activities的信息
             window 显示键盘,窗口和它们的关系
             wifi 显示wifi信息
adb shell dumpsys alarm
adb shell dumpsys activity | tee activitylist显示activity相关的信息
(ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities))
(Running activities (most recent first):)
adb shell dumpsys window
adb shell dumpsys statusbar显示状态栏相关的信息
adb shell dumpsys meminfo package_name or pid使用程序的包名或者进程id显
示内存信息
adb shell dumpsys statusbar grep notification=Notification可以找出状态栏
通知的包名,进而找到是哪个应用

adb shell input text "test003205@th.do-afw.com"
adb shell input text "qn5v2dn4"

adb shell wm density 480
查询分辨率
adb shell getprop ro.sf.lcd_density
adb shell getprop persist.sys.google.enabled

【获取和设置信息】
adb shell getprop persist.sys.isToolStart
adb shell setprop persist.sys.isToolStart false

adb shell getprop persist.sys.google.enabled
adb shell setprop persist.sys.google.enabled 0
adb shell dumpsys window w | findstr \/ | findstr name=,运行后会获取到
当前应用的包名
adb shell pm list package -f packageName,运行后会获取到对应的apk文件路径
adb shell pm disable com.google.android.googlequicksearchbox 禁用Google APP

查看cpu信息,可以监控应用cpu的使用,以调整优化代码
adb shell
top -m 5 -t


【查看CU号】adb shell getprop | grep -i cu
文件夹右下角有锁:sudo chmod -R 777 路径(文件夹或文件)
【查找文件】find -name "*.jar"      grep -i "framework" -r .
查找:find . -name "Jrd_moduleName*"
查找并删除:find . -name "Jrd_moduleName*.xml" | xargs rm -rf


【生成jar包】ran.zhou@aclgcl-ubnt:/local2/sourceCode/Pixi35V2.0/out
/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes $ jar
cvf r2g.jar ./tct/*
无法remount,修改方法:adb shell setenforce 0
adb kill-server
adb start-server


【查询Activity】
adb logcat -b all | grep -i activity


adb reboot bootloader;sudo ./out/host/linux-x86/bin/fastboot flash system out/target/product/idol4/system.img;sudo ./out/host/linux-x86/bin/fastboot flash boot
out/target/product/idol4/boot.img;sudo ./out/host/linux-x86/bin/fastboot flash userdata out/target/product/idol4/userdata.img;sudo ./out/host/linux-x86/bin/fastboot reboot


设置旋转值
adb shell settings put system accelerometer_rotation 1



0 0
原创粉丝点击