韌館-LearnHouse

執行CTS一直遇到 AAPT_PARSER_FAILED

運行CTS會發現有些測項會出現類似以下的error message:

Early failure resulting in no testRunStart. Results might be inconsistent:
com.android.tradefed.targetprep.TargetSetupError[AAPT_PARSER_FAILED|520050|DEPENDENCY_ISSUE]: AaptParser failed for file CtsContentTestCases.apk. The APK won't be installed [XXXX AA]

代表你的aapt2版本太舊,需要到官網下載最新版本取代
https://maven.google.com/web/index.html#com.android.tools.build:aapt2
Read more...

2023年7 月 posted by admin in 程式&軟體 and have No Comments

[轉]Android SELinux詳解

資料來源:http://www.vaststargames.com/read.php?tid=168

此篇寫得很完整且易懂,為了預防之後失聯,因此在這裡備份

Read more...
2023年5 月 posted by admin in 文獻參考 and have No Comments

[轉]打patch(補丁)時的常見錯誤

資料來源:https://onestraw.github.io/linux/apply-patch-to-linux-kernel/

當patch命令應用一個補丁檔案時,它會用不同的方法驗證補丁檔案的完整性。
patch命令做的兩個完整性檢查:
檢查檔案是不是一個有效的補丁檔案;
檢查修改的bits附近的程式碼是否匹配補丁檔案中相應位置上下文;

Read more...
2023年2 月 posted by admin in 文獻參考 and have No Comments

[轉][Android]兩個APP如何實作IPC呼叫

資料來源:https://givemepass.blogspot.com/2015/11/aidl_27.html

為了預防哪天該網站的重要資料失聯,因此在這裡備份一下,以下為該網誌的內容:

如果想要透過另外一個Process幫你執行程式, 你可以利用AIDL去跟Process溝通,
如何使用AIDL中有簡單介紹一下AIDL,
但是其實有很多細節並沒有說明, 所以這邊來實作非同步的範例。
更多的AIDL可以參考[官網]。

Read more...
2022年11 月 posted by admin in 程式&軟體 and have No Comments

[轉]linux系統上source、sh、bash、./的區別

最近在寫shell script來做自動化,才發現原來source和sh是大大的不同,要謹慎使用,不然會一直鬼打牆...

資料來源:https://www.cnblogs.com/pcat/p/5467188.html
在linux裡,source、sh、bash、./都可以執行shell script文件,那它們有什麼不同嗎?
1、source

source a.sh

在當前shell內去讀取、執行a.sh,而a.sh不需要有"執行權限"
source命令可以簡寫為"."

. a.sh

注意:中間是有空格的。
Read more...

2022年8 月 posted by admin in 程式&軟體 and have No Comments

[Android]JNI呼叫C/C++函式傳遞Int Array參數與返回Array值

上層Java呼叫C/C++的函式

public native void 2DArrayInput(int[][] inputData);
public native int[] returnArray(int[] inputData2);

二維int陣列傳值:

public final static int[][] inputData = {
                                       {0x0226,0x00}
                                      ,{0x0227,0x40}
                                      ,{0x0228,0x00}
                                    };
JniTest jnitest = new JniTest();
jnitest.2DArrayInput(inputData);

Read more...

2022年7 月 posted by admin in 程式&軟體 and have No Comments