常見問題

常見需求

設(shè)備問題

攝像頭

-攝像頭翻轉(zhuǎn):

  1. 在\device\sprd\pike2{sp7731e_1h10}\camera\sensor_config.xml中(7731在默認(rèn)目錄,其他的在incar目錄下,如:sprdroid1_q\incar\project\s9863a1h10__s8631vg_2g\device\sprd\sharkl3\s9863a1h10\camera\sensor_config.xml)修改對應(yīng)的攝像頭的Orientation如
        <SlotId>0</SlotId>
        <SensorName>ov2680</SensorName>
        <Facing>BACK</Facing>
        <Orientation>90</Orientation>
        <Resource_cost>50</Resource_cost>
        <TuningParameter>
            <TuningName>ov2680</TuningName>
        </TuningParameter>
      </CameraModuleCfg>

改成:

<CameraModuleCfg>
        <SlotId>0</SlotId>
        <SensorName>ov2680</SensorName>
        <Facing>BACK</Facing>
        <Orientation>270</Orientation>
        <Resource_cost>50</Resource_cost>
        <TuningParameter>
            <TuningName>ov2680</TuningName>
        </TuningParameter>
      </CameraModuleCfg>

2.如果修改失敗,檢查是否保存了修改的文件或者
rm -rf out/target/product/sp7731e_1h10/vendor/etc/sensor_config.xml 刪除原有已經(jīng)編譯出來的配置文件避免腳本不再編譯,重新編譯

-攝像頭打不開:
在\bsp\kernel\kernel4.14\arch\arm\boot\dts\sp7731e-1h10-native.dts:

    status = "okay";
    clock-frequency = <400000>;
    sensor_main: sensor-main@37 {
        compatible = "sprd,sensor-main";
        reg = <0x37>;
        clock-names = "clk_src", "sensor_eb",
            "clk_96m", "clk_76m8",
            "clk_48m", "clk_26m";
        clocks  = <&mm_clk CLK_SENSOR0>,
            <&mm_gate CLK_MSENSOR0_EB>,
            <&pll CLK_TWPLL_96M>,
            <&pll CLK_TWPLL_76M8>,
            <&pll CLK_TWPLL_48M>,
            <&ext_26m>;
        vddio-supply = <&vddcamio>;
        vddcama-supply = <&vddcama>;
        vddcamd-supply = <&vddcamd>;
        vddcammot-supply = <&vddcammot>;
        reset-gpios = <&ap_gpio 37 0>;
        power-down-gpios = <&ap_gpio 38 0>;
        host = "dcam0";
        sprd,phyid = <0>;
        csi = <&csi0>;
    };

改成:

    sensor_main: sensor-main@37 {
        compatible = "sprd,sensor-main";
        reg = <0x37>;
        clock-names = "clk_src", "sensor_eb",
            "clk_96m", "clk_76m8",
            "clk_48m", "clk_26m";
        clocks  = <&mm_clk CLK_SENSOR0>,
            <&mm_gate CLK_MSENSOR0_EB>,
            <&pll CLK_TWPLL_96M>,
            <&pll CLK_TWPLL_76M8>,
            <&pll CLK_TWPLL_48M>,
            <&ext_26m>;
        vddio-supply = <&vddcamio>;
        vddcama-supply = <&vddcama>;
        vddcamd-supply = <&vddcamd>;
        vddcammot-supply = <&vddcammot>;
        reset-gpios = <&ap_gpio 37 0>;
        power-down-gpios = <&ap_gpio 39 0>;
        host = "dcam0";
        sprd,phyid = <0>;
        csi = <&csi0>;
    };

        compatible = "sprd,sensor-sub";
        reg = <0x21>;
        clock-names = "clk_src","sensor_eb",
            "clk_96m", "clk_76m8",
            "clk_48m", "clk_26m";
        clocks = <&mm_clk CLK_SENSOR0>,
            <&mm_gate CLK_MSENSOR0_EB>,
            <&pll CLK_TWPLL_96M>,
            <&pll CLK_TWPLL_76M8>,
            <&pll CLK_TWPLL_48M>,
            <&ext_26m>;
        vddio-supply = <&vddcamio>;
        vddcama-supply = <&vddcama>;
        vddcamd-supply = <&vddcamd>;
        vddcammot-supply = <&vddcammot>;
        reset-gpios = <&ap_gpio 37 0>;
        power-down-gpios = <&ap_gpio 39 0>;
        host = "dcam0";
        sprd,phyid = <0>;
        csi = <&csi0>;
    };

改成

        compatible = "sprd,sensor-sub";
        reg = <0x21>;
        clock-names = "clk_src","sensor_eb",
            "clk_96m", "clk_76m8",
            "clk_48m", "clk_26m";
        clocks = <&mm_clk CLK_SENSOR0>,
            <&mm_gate CLK_MSENSOR0_EB>,
            <&pll CLK_TWPLL_96M>,
            <&pll CLK_TWPLL_76M8>,
            <&pll CLK_TWPLL_48M>,
            <&ext_26m>;
        vddio-supply = <&vddcamio>;
        vddcama-supply = <&vddcama>;
        vddcamd-supply = <&vddcamd>;
        vddcammot-supply = <&vddcammot>;
        reset-gpios = <&ap_gpio 37 0>;
        power-down-gpios = <&ap_gpio 38 0>;
        host = "dcam0";
        sprd,phyid = <0>;
        csi = <&csi0>;
    };

-閃光燈打不開:bsp\kernel\kernel4.14\arch\arm\boot\dts\sp7731e-1h10-overlay.dts
刪除

                compatible = "sprd,flash-wd3124da";
                flash-ic = <3124>;
                flash-torch-en-gpios = <&ap_gpio 12 0>;
                flash-en-gpios = <&ap_gpio 13 0>;
            };

-打包失敗:
1.添加ddr和spl的固件
2.添加u_boot:\out\target\product\sp7731e_1h10\u-boot-sign.bin

-編譯失敗:缺失文件:{\Sprd\NV_Manager\SC7731E}android 10.0\s706-7731E_in_dclass_W20.08.3_band_auto_nv+modem_android10.0_200318下的文件復(fù)制到{incar}\build\buid_pac\out目錄下
-屏幕不亮(未配置相關(guān)宏)
1.sprdroid1_q\incar\config{s9863a1h10__p30g_2g}\ProjectConfig.mk
2.INCAR_LCD_MODUEL=INCAR_LCD_9863A_HJC_HX8279_MIPI_FHD 選擇對應(yīng)的

-SO庫找不到:
1.system\core\init\selinux.cpp (不需要過GMS)

bool IsEnforcing() {
    {
        return false;//直接屏蔽掉
        int fd(open("/mboot/selinux", O_RDONLY | O_CLOEXEC | O_BINARY));
        if (fd != -1) {
            char v = 0xff;
            if (read(fd, &v, 1) < 0)
                PLOG(ERROR) << "Failed to read /mboot/selinux";
            close(fd);
            LOG(WARNING) << "/mboot/selinux is " << v;
            return v == '1';
        }
    }
    if (ALLOW_PERMISSIVE_SELINUX) {
        return StatusFromCmdline() == SELINUX_ENFORCING;
    }
    return true;
}

2.Y:\sprdroid1_q\device\sprd\pike2\common\rootdir\root\init.cali.rc:

     start vendor.modem_control
     start vendor.refnotify
     start console
+    start system_suspend

3.如果需要過GMS 抓log看權(quán)限:
-vendor\prebuilt_apps\preloadapp\Android.mk
LOCAL_DEX_PREOPT := false
-查看日志的vac,找到閃退的包名,查看是哪個文件需要添加權(quán)限

-\device\sprd\pike2\common\sepolicy/{} u:r:untrusted_app_27是27的就改27的 25的就改25的

-調(diào)TP
1.先確定平臺
2.找到對應(yīng)的ProjectConfig.mk:\incar\config{}\ProjectConfig.mk
3.找到對應(yīng)的兩個值INCAR_PROJECT_CONFIG = 和INCAR_TOUCH_MODUEL =
4.\bsp\kernel\kernel4.14\drivers\input\touchscreen\gslX680\gslX680_ts.c

5.
image.png

6.定位到對應(yīng)的.h文件發(fā)給驅(qū)動工程師

-問題點(diǎn):

image.png
:![45D8]{@E1E2MENKKUG_B4]I.png](https://upload-images.jianshu.io/upload_images/6296697-6d194691d982e17c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

1.packages\apps\Launcher3\src\com\android\launcher3\states\RotationHelper.java
2.public static boolean getAllowRotationDefaultValue() { // If the device was scaled, used the original dimensions to determine if rotation // is allowed of not. Resources res = Resources.getSystem(); int originalSmallestWidth = res.getConfiguration().smallestScreenWidthDp * res.getDisplayMetrics().densityDpi / DENSITY_DEVICE_STABLE; return true; }

-修復(fù)sd卡不能熱插拔:Y:bsp\kernel\kernel4.14\drivers\mmc\core\core.c

void mmc_power_off(struct mmc_host *host)
{
    if (host->ios.power_mode == MMC_POWER_OFF)
        return;

    mmc_pwrseq_power_off(host);

    host->ios.clock = 0;
//  host->ios.vdd = 0; //注釋這一行

    host->ios.power_mode = MMC_POWER_OFF;
    /* Set initial state and call mmc_set_ios */
    mmc_set_initial_state(host);

    /*
     * Some configurations, such as the 802.11 SDIO card in the OLPC
     * XO-1.5, require a short delay after poweroff before the card
     * can be successfully turned on again.
     */
    mmc_delay(1);
}```
-人臉識別解鎖圖像倒轉(zhuǎn)
![image.png](https://upload-images.jianshu.io/upload_images/6296697-3756f55bf72b2269.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)



最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末廓块,一起剝皮案震驚了整個濱河市禾进,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌帕棉,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,311評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件宋欺,死亡現(xiàn)場離奇詭異蛤织,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)不翩,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,339評論 2 382
  • 文/潘曉璐 我一進(jìn)店門兵扬,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人口蝠,你說我怎么就攤上這事器钟。” “怎么了妙蔗?”我有些...
    開封第一講書人閱讀 152,671評論 0 342
  • 文/不壞的土叔 我叫張陵傲霸,是天一觀的道長。 經(jīng)常有香客問我,道長昙啄,這世上最難降的妖魔是什么穆役? 我笑而不...
    開封第一講書人閱讀 55,252評論 1 279
  • 正文 為了忘掉前任,我火速辦了婚禮梳凛,結(jié)果婚禮上耿币,老公的妹妹穿的比我還像新娘。我一直安慰自己韧拒,他們只是感情好掰读,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,253評論 5 371
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著叭莫,像睡著了一般蹈集。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上雇初,一...
    開封第一講書人閱讀 49,031評論 1 285
  • 那天拢肆,我揣著相機(jī)與錄音,去河邊找鬼靖诗。 笑死郭怪,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的刊橘。 我是一名探鬼主播鄙才,決...
    沈念sama閱讀 38,340評論 3 399
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼促绵!你這毒婦竟也來了攒庵?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 36,973評論 0 259
  • 序言:老撾萬榮一對情侶失蹤败晴,失蹤者是張志新(化名)和其女友劉穎浓冒,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體尖坤,經(jīng)...
    沈念sama閱讀 43,466評論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡稳懒,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,937評論 2 323
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了慢味。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片场梆。...
    茶點(diǎn)故事閱讀 38,039評論 1 333
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖纯路,靈堂內(nèi)的尸體忽然破棺而出或油,到底是詐尸還是另有隱情,我是刑警寧澤感昼,帶...
    沈念sama閱讀 33,701評論 4 323
  • 正文 年R本政府宣布装哆,位于F島的核電站罐脊,受9級特大地震影響定嗓,放射性物質(zhì)發(fā)生泄漏蜕琴。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,254評論 3 307
  • 文/蒙蒙 一宵溅、第九天 我趴在偏房一處隱蔽的房頂上張望凌简。 院中可真熱鬧,春花似錦恃逻、人聲如沸雏搂。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,259評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽凸郑。三九已至,卻和暖如春矛市,著一層夾襖步出監(jiān)牢的瞬間芙沥,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 31,485評論 1 262
  • 我被黑心中介騙來泰國打工浊吏, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留而昨,地道東北人。 一個月前我還...
    沈念sama閱讀 45,497評論 2 354
  • 正文 我出身青樓找田,卻偏偏與公主長得像歌憨,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子墩衙,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,786評論 2 345