ブログトップ 記事一覧 ログイン 無料ブログ開設

のねの日記 - human brain programing Twitter

2015-03-27

pa_gapps-modular-pico-5.1-20150315-signedのupdater-scriptのbin

| 14:34 | pa_gapps-modular-pico-5.1-20150315-signedのupdater-scriptのbinを含むブックマーク pa_gapps-modular-pico-5.1-20150315-signedのupdater-scriptのbinのブックマークコメント

pa_gapps-modular-pico-5.1-20150315-signedのupdater-scriptのbin

続きを読む

updater-script

| 14:17 | updater-scriptを含むブックマーク updater-scriptのブックマークコメント

gapps-L-3-17-15.zipのupdater-script

続きを読む

2015-03-25

Android Device Monitorでマスクしたいときの方法

| 13:16 | Android Device Monitorでマスクしたいときの方法を含むブックマーク Android Device Monitorでマスクしたいときの方法のブックマークコメント

Android Device Monitorのログでマスクしたいときの設定方法

by Log tag:

^(?!.*QSEECOMD|WifiStateMachine|wpa_supplicant)

Filter tags in LogCat (in Android Eclipse Plug-In)

logging - Filter tags in LogCat (in Android Eclipse Plug-In) - Stack Overflow

valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission denied

| 11:07 | valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission deniedを含むブックマーク valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission deniedのブックマークコメント

#chown -R shell.shell /data/local/Inst
#cd /data/local/Inst/bin
#./valgrind
# su shell
$ ./valgrind
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission denied
$ whoami
whoami: unknown uid 2000

ユーザーをSHELLにしてみたけどダメだった。

Valgrind cannot execute memcheck tool on Android OS?

permissions - Valgrind cannot execute memcheck tool on Android OS? - Stack Overflow
root@hammerhead:/ # chown -R 10001.10001 /data/local/Inst
root@hammerhead:/ # cd /data/local/Inst
root@hammerhead:/data/local/Inst # cd bin
root@hammerhead:/data/local/Inst/bin # su 10001
u0_a1@hammerhead:/data/local/Inst/bin $ ./valgrind
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission denied
1|u0_a1@hammerhead:/data/local/Inst/bin $ ll
-rwxr-xr-x u0_a1    u0_a1       41112 2015-03-25 10:39 callgrind_annotate
-rwxr-xr-x u0_a1    u0_a1       12016 2015-03-25 10:39 callgrind_control
-rwxr-xr-x u0_a1    u0_a1       32170 2015-03-25 10:39 cg_annotate
-rwxr-xr-x u0_a1    u0_a1       10418 2015-03-25 10:39 cg_diff
-rwxr-xr-x u0_a1    u0_a1       55800 2015-03-25 10:39 cg_merge
-rwxr-xr-x u0_a1    u0_a1       24401 2015-03-25 10:39 ms_print
-rwxr-xr-x u0_a1    u0_a1      385332 2015-03-25 10:39 valgrind
-rwxr-xr-x u0_a1    u0_a1      494524 2015-03-25 10:39 valgrind-di-server
-rwxr-xr-x u0_a1    u0_a1      445512 2015-03-25 10:39 valgrind-listener
-rwxr-xr-x u0_a1    u0_a1      446724 2015-03-25 10:39 vgdb
u0_a1@hammerhead:/data/local/Inst/bin $ whoami
whoami: unknown uid 10001
1|u0_a1@hammerhead:/data/local/Inst/bin $


libの中の実行権限をつけたところ、動くようになった。

root@hammerhead:/ # chown 10000.10000 /data/local/Inst
root@hammerhead:/ # cd /data/local/Inst/bin
root@hammerhead:/data/local/Inst/bin # ./valgrind
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission denied
1|root@hammerhead:/data/local/Inst/bin # ll
-rwxr-xr-x u0_a0    u0_a0       41112 2015-03-25 10:39 callgrind_annotate
-rwxr-xr-x u0_a0    u0_a0       12016 2015-03-25 10:39 callgrind_control
-rwxr-xr-x u0_a0    u0_a0       32170 2015-03-25 10:39 cg_annotate
-rwxr-xr-x u0_a0    u0_a0       10418 2015-03-25 10:39 cg_diff
-rwxr-xr-x u0_a0    u0_a0       55800 2015-03-25 10:39 cg_merge
-rwxr-xr-x u0_a0    u0_a0       24401 2015-03-25 10:39 ms_print
-rwxr-xr-x u0_a0    u0_a0      385332 2015-03-25 10:39 valgrind
-rwxr-xr-x u0_a0    u0_a0      494524 2015-03-25 10:39 valgrind-di-server
-rwxr-xr-x u0_a0    u0_a0      445512 2015-03-25 10:39 valgrind-listener
-rwxr-xr-x u0_a0    u0_a0      446724 2015-03-25 10:39 vgdb

root@hammerhead:/data/local/Inst/bin # su 10000
u0_a0@hammerhead:/data/local/Inst/bin $ ./valgrind
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission denied
1|u0_a0@hammerhead:/data/local/Inst/bin $
(略)

====libの実行権をつける====
u0_a0@hammerhead:$ cd /data/local/Inst/lib
u0_a0@hammerhead:/data/local/Inst/lib $ ll
drwxrwxr-x u0_a0    u0_a0             2015-03-25 17:24 pkgconfig
drwxrwxr-x u0_a0    u0_a0             2015-03-25 17:26 valgrind
u0_a0@hammerhead:/data/local/Inst/lib $ cd valgrind
u0_a0@hammerhead:/data/local/Inst/lib/valgrind $ ll
(略)
-rw-rw-rw- u0_a0    u0_a0    19003828 2015-03-25 10:39 memcheck-arm-linux
(略)
u0_a0@hammerhead:/data/local/Inst/lib/valgrind $ cd ..
u0_a0@hammerhead:/data/local/Inst/lib $ chmod -R 775 ./valgrind
u0_a0@hammerhead:/data/local/Inst/lib $ cd ./valgrind
u0_a0@hammerhead:/data/local/Inst/lib/valgrind $ ll
-rwxrwxr-x u0_a0    u0_a0    19003828 2015-03-25 10:39 memcheck-arm-linux
u0_a0@hammerhead:/data/local/Inst/lib/valgrind $ cd ..
u0_a0@hammerhead:/data/local/Inst/lib $ cd ..
u0_a0@hammerhead:/data/local/Inst $ cd bin
u0_a0@hammerhead:/data/local/Inst/bin $ ./valgrind
./valgrind
valgrind: no program specified
valgrind: Use --help for more information.
1|u0_a0@hammerhead:/data/local/Inst/bin $ whoami
whoami
whoami: unknown uid 10000
1|u0_a0@hammerhead:/data/local/Inst/bin $

android valgrind build

09:21 | android valgrind buildを含むブックマーク android valgrind buildのブックマークコメント

ビルド環境

・valgrind-3.10.1

・android-ndk-r10d

・ubuntu 14.04

続きを読む

2015-03-24

android valgrind その2

12:02 | android valgrind その2を含むブックマーク android valgrind その2のブックマークコメント

>adb shell
shell@hammerhead:/ $ su
shell@hammerhead:/ # chmod 777 /data/local
shell@hammerhead:/ # chmod 777 /data/local/Inst
shell@hammerhead:/ # mkdir /data/local/Inst
shell@hammerhead:/ # chmod 777 /data/local/Inst
shell@hammerhead:/ # mkdir /data/local/Inst/bin
shell@hammerhead:/ # chmod 777 /data/local/Inst/bin
shell@hammerhead:/ # exit
shell@hammerhead:/ $ exit
>adb root
>adb push ./out/target/product/hammerhead/system/bin/valgrind /data/local/Inst/bin/valgrind
333 KB/s (13656 bytes in 0.040s)
>adb shell
/system/bin/sh: ./valgrind: can't execute: Permission denied
root@hammerhead:/data/local/Inst/bin # chmod 777 /data/local/Inst/bin/valgrind
root@hammerhead:/ # cd /data/local/Inst/bin/
root@hammerhead:/data/local/Inst/bin # ./valgrind
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory

android valgrind

11:36 | android valgrindを含むブックマーク android valgrindのブックマークコメント

AOSPのoutフォルダ

~/LP501r1_debug/android/out/target/product/hammerhead/system/lib/valgrind$ ll
total 39668
drwxrwxr-x 2 user user    4096  3月 24 11:22 ./
drwxrwxr-x 8 user user   12288  3月 24 11:21 ../
-rwxrwxr-x 1 user user 5625000  3月 24 11:21 cachegrind-arm-linux*
-rwxrwxr-x 1 user user 5817620  3月 24 11:21 callgrind-arm-linux*
-rw-rw-r-- 1 user user    1285  3月 24 11:22 default.supp
-rwxrwxr-x 1 user user 5751968  3月 24 11:21 drd-arm-linux*
-rwxrwxr-x 1 user user 5846212  3月 24 11:21 helgrind-arm-linux*
-rwxrwxr-x 1 user user 5612724  3月 24 11:21 massif-arm-linux*
-rwxrwxr-x 1 user user 6026428  3月 24 11:21 memcheck-arm-linux*
-rwxrwxr-x 1 user user 5563512  3月 24 11:21 none-arm-linux*
-rwxrwxr-x 1 user user    5220  3月 24 11:21 vgpreload_core-arm-linux.so*
-rwxrwxr-x 1 user user  124048  3月 24 11:21 vgpreload_drd-arm-linux.so*
-rwxrwxr-x 1 user user   91284  3月 24 11:21 vgpreload_helgrind-arm-linux.so*
-rwxrwxr-x 1 user user   29844  3月 24 11:21 vgpreload_massif-arm-linux.so*
-rwxrwxr-x 1 user user   70908  3月 24 11:21 vgpreload_memcheck-arm-linux.so*
Ubuntu1404lts:~/LP501r1_debug/android$ find ./out -name *valgrind*
./out/target/product/hammerhead/symbols/system/bin/valgrind
./out/target/product/hammerhead/symbols/system/lib/valgrind
./out/target/product/hammerhead/system/bin/valgrind
./out/target/product/hammerhead/system/lib/valgrind
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-ppc32.o
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-s390x.o
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-amd64.o
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-x86.P
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-s390x.P
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-arm64.P
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-ppc32.P
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-ppc64.P
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-ppc64.o
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-arm64.o
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-amd64.P
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-x86.o
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-arm.P
./out/target/product/hammerhead/obj/STATIC_LIBRARIES/libcoregrind-arm-linux_intermediates/coregrind/m_gdbserver/valgrind-low-arm.o
./out/target/product/hammerhead/obj/EXECUTABLES/valgrind_intermediates
./out/target/product/hammerhead/obj/EXECUTABLES/valgrind_intermediates/valgrind
./out/target/product/hammerhead/obj/EXECUTABLES/valgrind_intermediates/LINKED/valgrind

skiaをコンパイルしたときのclangのワーニング

| 09:30 | skiaをコンパイルしたときのclangのワーニングを含むブックマーク skiaをコンパイルしたときのclangのワーニングのブックマークコメント

clang 3.5をubuntu14.04にインストールした。

include $(CLEAR_VARS)
LOCAL_CLANG=true             <=== この行を追加した。

LOCAL_FDO_SUPPORT := true

LOCAL_ARM_MODE := thumb
external/skia/src/images/SkImageDecoder.cpp:25:7: warning: field 'fDitherImage' will be initialized after field 'fUsePrefTable' [-Wreorder]
    , fDitherImage(true)
      ^
1 warning generated.

ubuntu 14.04 clan 3.5

09:24 | ubuntu 14.04 clan 3.5を含むブックマーク ubuntu 14.04 clan 3.5のブックマークコメント

sudo ln -s /usr/bin/clang-3.5 /usr/bin/clang
sudo ln -s /usr/bin/clang++-3.5 /usr/bin/clang++
sudo ln -s /usr/bin/scan-build-3.5 /usr/bin/scan-build
14.04 - clang and clang++ not found after installing the clang-3.5 package - Ask Ubuntu
scan-build -V -k --status-bugs -o analyze_out --use-analyzer=/usr/bin/clang --use-cc=clang --use-c++=clang++ make -B -C '~/LP501r1_debug/android' all_modules ONE_SHOT_MAKEFILE=' external/skia/Android.mk'
scan-build 
-V 
-k 
--status-bugs 
-o analyze_out 
--use-analyzer=/usr/bin/clang 
--use-cc=clang --use-c++=clang++ 
make -B -C '~/LP501r1_debug/android' all_modules ONE_SHOT_MAKEFILE=' external/skia/Android.mk'

skiaをコンパイルしたときのgccでのワーニング

09:00 | skiaをコンパイルしたときのgccでのワーニングを含むブックマーク skiaをコンパイルしたときのgccでのワーニングのブックマークコメント

mmm -B ./external/skia 2>&1 | tee make_skia.log

In file included from external/skia/src/images/SkImageDecoder.cpp:9:0:
external/skia/include/core/SkImageDecoder.h: In constructor 'SkImageDecoder::SkImageDecoder()':
external/skia/include/core/SkImageDecoder.h:480:29:
  warning: 'SkImageDecoder::fDitherImage' will be initialized after [-Wreorder]
     bool                    fDitherImage;
                             ^

[-Wreorder]は、初期化の順番についての警告

クラス内メンバ変数の初期化順序には規約がある

クラス内メンバ変数の初期化順序には規約がある ? 二流プログラマの三流な日常
external/skia/src/pdf/SkPDFGraphicState.cpp: In member function 'void SkPDFGraphicState::populateDict()':
external/skia/src/pdf/SkPDFGraphicState.cpp:217:46:
 warning: passing 'SkPaint::Cap' chooses 'int32_t {aka int}' over 'size_t {aka unsigned int}' [-Wsign-promo]
         insertInt("LC", fPaint.getStrokeCap());
                                             ^
  • Wsign-promo (C++のみ)

オーバーロード解決に際して、 無符合型もしくは列挙型から有符合型への整数拡張が、 (その有符合型と)同サイズの無符合型への整数拡張よりも優先されて選択される場合に警告を出力します。 以前のバージョンのg++は無符合性を維持するよう試みますが、 C++標準は現在の振る舞いを義務づけています。

Using and Porting the GNU Compiler Collection (GCC) - GCCコマンド・オプション
external/skia/src/opts/SkBlitMask_opts_arm_neon.cpp: In function 'void SkBlitLCD16OpaqueRow_neon(SkPMColor*, const uint16_t*, SkColor, int, SkPMColor)':
external/skia/src/opts/SkBlitMask_opts_arm_neon.cpp:177:75: warning: 'vcolB' may be used uninitialized in this function [-Wmaybe-uninitialized]
         vdst.val[NEON_B] = SkBlend32_neon8(vcolB, vdst.val[NEON_B], vmaskB);
                                                                           ^

GCC -Wuninitialized / -Wmaybe-uninitialized issues

c++ - GCC -Wuninitialized / -Wmaybe-uninitialized issues - Stack Overflow