转载:全志问题解决方法

2023-05-16

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/yanzheng1113/article/details/8073812

1,          android上如何增加一个PC可见的盘符

1)在sysconfig1.fex中的luns中设置PC可见的盘数:luns=4
2)在init.rc中建立一个目录:mkdir /mnt/inet 0000 systemsystem
3).在vold.fstab中增加mounts的方法:dev_mount inet /mnt/inetauto    /devices/virtual/block/nandh
4).更改config_evb.mk中:
PRODUCT_PROPERTY_OVERRIDES+= \
       ro.additionalmounts=/mnt/extern_sd;/mnt/usbhost1;/mnt/inet \
       ro.additionalshares=/mnt/extern_sd;/mnt/usbhost1;/mnt/inet \
        ro.udisk.lable=crane-evb

5).更改frameworks/base/services/java/com/android/server/MountService.java中增加头文件:
import java.io.File;及在for (String path: volumesToShare) {
后增加:
  String tmp ="/mnt/inet";
  if(path.equals(tmp))
  {
        File f=newFile("/mnt/sdcard/mpgio.sys");
        if(!f.exists()){
         Slog.e(TAG, "not mount nandh");
         return ;
       }
     Slog.e(TAG, "mount nandhsuccess");
}

2,Android4.0.1显示在切换中有时会出现红色边框

看是否有配置以下属性:
persist.sys.strictmode.visual
此属性值设成0

3,播放电影字幕和菜单重叠

播放外带字幕电影,播放电影且已有字幕出现在屏幕上时触摸屏幕调出子菜单,字幕和菜单重叠,下一条字幕出现时则恢复正常。

修改 Gallery2\src\com\android\gallery3d\app\MediaController.java 在initControllerView  函数最后加 mUpSubPos += 10; 即可

 

4,卡启动时,如何识别到nand并对其进行操作

关于要在卡启动识别到nand,有两种情况:

1. nand上已经有分区;

2. nand是裸片;

 第一种情况下卡启动时nand驱动能够初始化成功,用户可以通过mount命令挂载nand的分区;

 第二种情况下要先给nand一个虚拟的mbr,使得启动时nand能够初始化成功,

可以通过修改nand驱动的源码达到这一目的。

A10平台修改linux-3.0/drivers/block/sun4i_nand/nfd/mbr.c

A1X平台修改linux-3.0/drivers/block/sun5i_nand/nfd/mbr.c

具体改动如下:

int mbr2disks(struct nand_disk* disk_array)

{

         int part_cnt = 0;

         int part_index;

#if 0

         if(_get_mbr()){

                   printk("get mbr error\n" );

                   return part_cnt;

         }

         part_index = 0;

 

         for(part_cnt = 0; part_cnt<MAX_PART_COUNT; part_cnt++)

                   part_secur[part_index] = 0;       

         //查找出所有的LINUX盘符

         for(part_cnt = 0; part_cnt < mbr->PartCount && part_cnt < MAX_PART_COUNT; part_cnt++)

         {

             //if((mbr->array[part_cnt].user_type == 2) || (mbr->array[part_cnt].user_type == 0))

             {

                            PRINT("The %d disk name = %s, class name = %s, disk size = %d\n", part_index, mbr->array[part_cnt].name,

                             mbr->array[part_cnt].classname, mbr->array[part_cnt].lenlo);

                            disk_array[part_index].offset = mbr->array[part_cnt].addrlo;

                            disk_array[part_index].size = mbr->array[part_cnt].lenlo;

                            part_secur[part_index] = mbr->array[part_cnt].user_type;

                            part_index ++;

             }

         }

         disk_array[part_index - 1].size = DiskSize - mbr->array[mbr->PartCount - 1].addrlo;

         _free_mbr();

         PRINT("The %d disk size = %lu\n", part_index - 1, disk_array[part_index - 1].size);

         PRINT("part total count = %d\n", part_index);

#else

         part_index = 1;

         disk_array[0].offset = 0;

         disk_array[0].size = DiskSize;

         part_secur[0] = 0;

#endif

         return part_index;

}

 

红色部分为改动的内容,旧版的SDK需要做适当的修改才可通过编译,

去掉:part_secur[0] = 0;

 

 

6,手机 拨号 apk拨号应用被隐藏

安装了contacts.apk和phone.apk,依然在launcher看不到拨号

frameworks/base/core/res/res/values/config.xml:581:    <bool name="config_voice_capable">true</bool>

该属性为false时,会隐藏拨号,请注意自己的项目中是否覆盖了该属性

 

7,如何修改USB的Pid vid

根据项目需求,我们现需要修改平台的vendor Id & product Id,
在sys_config1.fex里面,有如下字段:

;--------------------------------

;---       USB Device

;--------------------------------

[usb_feature]

vendor_id                = 0x18D1

mass_storage_id          = 0x0001

adb_id                   = 0x0002

 

manufacturer_name        = "USB Developer"

product_name             = "Android"

serial_number            = "20080411"

 

[msc_feature]

vendor_name              = "USB 2.0"

product_name             = "USB Flash Driver"

release                  = 100

luns                     = 2

相信vendor_id便是vid,改变此键值,即可达到改变vid的目的,那pid是怎么修改呢?

android的设置 -> 存储 -> USB计算机连接,有三个选项,分别是:媒体设备(MTP)、
相机(PTP)、USB大容量存储。我分别用这三种模式与电脑连接,得到的pid & vid信息
如下:
媒体设备(MTP) :     vid = 18D1 ;    pid = 0007
相机(PTP)         :     vid = 18D1 ;    pid = 0009
USB大容量存储     :     vid = 18D1 ;    pid = 0003

请问pid根据什么规则变化呢?我该如何配置相应的值?

请参见sys_config1.fex和文件 init.sun5i.usb.rc

媒体设备(MTP):     vid = 18D1 ;    pid = 0007

对应:

on property:sys.usb.config=mtp,adb

    write /sys/class/android_usb/android0/enable 0

    write /sys/class/android_usb/android0/idVendor   18d1

    write /sys/class/android_usb/android0/idProduct   0007

    write /sys/class/android_usb/android0/functions   $sys.usb.config

    write /sys/class/android_usb/android0/enable 1

    start adbd

    setprop sys.usb.state $sys.usb.config

其它类似

8,外部SD卡无法写入

只能读,程序无法写入
Androidmanifest权限声明内容:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">

        <group gid="sdcard_rw"/>

    </uses-permission>  

    <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" >

        <group gid="media_rw"/>

    </uses-permission>

 <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS">

</uses-permission> 

 

看到sd目录和extsd目录的权限相同,都是system,但用户组不一样
sd是sdcard_rw,外部sd是media_rw

可以简单处理,修改一下extsd的用户组到sdcard_rw
修改system/vold/Volume.cpp  542行

if (primaryStorage) {
            // Special case the primary SD card.
            // For this we grant write access to the SDCARD_RW group.
            gid = AID_SDCARD_RW;
        } else {
            // For secondary external storage we keep things locked up.
            gid = AID_MEDIA_RW;
        }



改为

if (1) {
            // Special case the primary SD card.
            // For this we grant write access to the SDCARD_RW group.
            gid = AID_SDCARD_RW;
        } else {
            // For secondary external storage we keep things locked up.
            gid = AID_MEDIA_RW;
        }

9,高清播放器删除最后一张图片时,图片再无法移动问题

改 Gallery2\src\com\android\gallery3d\ui\PhotoView.java 

public void startSlideInAnimation(int direction) {
         ...
        mTransitionMode = direction; 改成  mTransitionMode = TRANS_NONE;
        
}

10,A10的v1.4版本没有声音

配置文件没有加pa_dev的权限导致:
比如crane-evb-v12r:对应目录android4.0.4\device\softwinner\crane-evb-v12r\ueventd.sun4i.rc
里面加pa_dev的权限:
/dev/pa_dev               0777   system     system

 

11,阿拉伯文下高清播放器不能搜索到.avi格式的媒体文件

由于阿拉伯文下 .avi后缀的视频,后缀名被转码后识别不了,需要修改以下地方。
frameworks\base\media\java\android\media\MediaFile.java 

    public static MediaFileType getFileType(String path) {

        int lastDot = path.lastIndexOf(".");

        if (lastDot < 0)

            return null;

        return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase(Locale.ENGLISH));

    }

    public static MediaFileType getFileType(String path) {

        int lastDot = path.lastIndexOf(".");

        if (lastDot < 0)

            return null;

        return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase(Locale.ENGLISH));

    }

public static MediaFileType getFileType(String path) {
     int lastDot = path.lastIndexOf(".");
     if (lastDot < 0)  
         return null;
      return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase(Locale.ENGLISH));
}

12,字体设置为大、超大时,竖屏在解锁界面,解锁的图标显示不全

800x600,lcd_denisty 160

frameworks/base/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml
适当加大72行的android:layout_weight="1"
这样解锁部分的面积会增加,解决这个问题
其他分辨率需要修改其他layout文件夹下的keyguard_screen_tab_unlock.xml

 

13,设置-安全-屏幕锁定-图案界面,在坚屏时不显示取消/下一步

800x600,lcd_denisty 160

packages/apps/Settings/res/layout-sw600dp/choose_lock_pattern_tutorial.xml
把两个layout_marginTop都适当改小

 

14,音效里的Normal和Flat功能反

frameworks/base/media/libeffects/lvm/wrapper/Bundle/EffectBundle.h
gEqualizerPresets数组,名字可以随意修改

 

14,动态壁纸 线性光幕效果有黑块

 将壁纸设为动态壁纸中的“线性光幕效果”时,在主界面旋转屏幕时未显示完整,即往边上拉存在黑块问题。

修改:
android\packages\wallpapers\Basic\src\com\android\wallpaper\nexus\NexusRS.java

    @Override
    public void setOffset(float xOffset, float yOffset, int xPixels, int yPixels) {
        //mXOffset = xOffset; 
        //mScript.set_gXOffset(xOffset);
    }

15,android4.0量产时用户区不能格式化

版本为v1.0,量产配置已经加入erase_flag=1,仍然不能格式化

16,如何修改setting里面各字体对应的大小

感觉setting里面字体大小选择的变化幅度太大,希望小不要太小,特大不要太大,每级变化的幅度缩小点该如何修改

android4.0\packages\apps\Settings\res\values\arrays.xml文件里

<string-array name="entryvalues_font_size" translatable="false">
        <item>0.85</item>
        <item>1.0</item>
        <item>1.15</item>
        <item>1.30</item>
    </string-array>

默认是0.15的梯度改成合适的梯度如

<string-array name="entryvalues_font_size" translatable="false">
        <item>0.90</item>
        <item>1.0</item>
        <item>1.10</item>
        <item>1.20</item>
    </string-array>

17,user模式下gsensor不可用

不能编译成user模式只能ENG模式,user模式下Gsensor不能旋转

mma7660出现过这种情况,原因是sensors.exDroid.so编译出来以后没有安装到/system/lib/hw下可以在build/target/product/generic_no_telephony.mk中加入 sensors.exDroid,再重新编译即可

18,浏览器退出和浏览器为android模式时看在线视频卡

A10
1:在浏览时有时偶尔会退出
2:浏览器用android模式,看在线视频十几分钟左右后会卡,但用ipad模式不会卡

1.              需要具体分析问题,我们其它客户案上浏览正常
2。android模式采用的flash格式播放,而ipad采用的html5。flash由于自身格式和片源分割的关系,在线视频有机率产生不同步或卡顿问题。该问题由flash自身引起,这也是为何flash会逐渐被html5取代的一个方面

19,3g dongle在特定的区域死机

 dongle在信号好的地方可以正常使用,在信号差的地方,连接慢,且使用几分钟后会出现蓝屏、黑屏、死机等现象

3G dongle属于射频产品,对USB线的要求比较高,特别是在信号不强的情况下,使用时使用带有屏蔽处理较好的USB OTG线即可。

20,android4.0.3中camera延时录制是什么功能?

该功能主要是拍摄车水马龙、行云流水等用的;假设录制的正常帧率是15fps,如果设置成延时1s,则代表1s会录制1帧,如果想实际录制的视频有1s的内容(15帧),则实际需要录制15s;一些客户反馈,录制一段视频后,实际播放的时间很短,就是因为这个原因

21,android4.0中如何自动弹出USB盘

修改 frameworks\base\packages\SystemUI\src\com\android\systemui\usb\StorageNotification.java

 //Intent intent = new Intent();

//            Intent intent = new Intent();

//            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);

//            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);

//            setUsbStorageNotification(

//                    com.android.internal.R.string.usb_storage_stop_notification_title,

//                    com.android.internal.R.string.usb_storage_stop_notification_message,

//                    com.android.internal.R.drawable.stat_sys_warning, false, true, pi) ;

//intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);
 //PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
 //setUsbStorageNotification(
 //           com.android.internal.R.string.usb_storage_stop_notification_title,
 //           com.android.internal.R.string.usb_storage_stop_notification_message,
//            com.android.internal.R.drawable.stat_sys_warning, false, true, pi);
         ...
}


void updateUsbMassStorageNotification(boolean available) {
      StorageManager mStorageManager = null;
     if (available)
     {
         if(mContext != null)
         {
              mStorageManager = (StorageManager) mContext.getSystemService(Context.STORAGE_SERVICE);
         }
         else
         {
              Slog.w(TAG, "mContext is null ,getSystemService error !");
         }

         //            Intent intent = new Intent();
         //            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);
         //            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         //            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
         //            setUsbStorageNotification(
         //                    com.android.internal.R.string.usb_storage_notification_title,
         //                    com.android.internal.R.string.usb_storage_notification_message,
         //                    com.android.internal.R.drawable.stat_sys_data_usb,
         //                    false, true, pi);

      if(mStorageManager != null)
            {
         mStorageManager.enableUsbMassStorage();
       } 
    

 //            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);

//            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

//

//            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);

//            setUsbStorageNotification(

//                    com.android.internal.R.string.usb_storage_notification_title,

//                    com.android.internal.R.string.usb_storage_notification_message,

//                    com.android.internal.R.drawable.stat_sys_data_usb,

//                    false, true, pi);

//            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);

//            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

//

//            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);

//            setUsbStorageNotification(

//                    com.android.internal.R.string.usb_storage_notification_title,

//                    com.android.internal.R.string.usb_storage_notification_message,

//                    com.android.internal.R.drawable.stat_sys_data_usb,

//                    false, true, pi);

//            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);

//            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

//

//            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);

//            setUsbStorageNotification(

//                    com.android.internal.R.string.usb_storage_notification_title,

//                    com.android.internal.R.string.usb_storage_notification_message,

//                    com.android.internal.R.drawable.stat_sys_data_usb,

//                    false, true, pi);

//            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);

//            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

//

//            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);

//            setUsbStorageNotification(

//                    com.android.internal.R.string.usb_storage_notification_title,

//                    com.android.internal.R.string.usb_storage_notification_message,

//                    com.android.internal.R.drawable.stat_sys_data_usb,

//                    false, true, pi);

//            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);

//            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

//

//            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);

//            setUsbStorageNotification(

//                    com.android.internal.R.string.usb_storage_notification_title,

//                    com.android.internal.R.string.usb_storage_notification_message,

//                    com.android.internal.R.drawable.stat_sys_data_usb,

//                    false, true, pi);

//            intent.setClass(mContext, com.android.systemui.usb.UsbStorageActivity.class);

//            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

//

//            PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);

//            setUsbStorageNotification(

//                    com.android.internal.R.string.usb_storage_notification_title,

//                    com.android.internal.R.string.usb_storage_notification_message,

//                    com.android.internal.R.drawable.stat_sys_data_usb,

//                    false, true, pi)

     }
else if(!mUmsAvailable || !atLeastOneDeviceMounted())
     {
            setUsbStorageNotification(0, 0, 0, false, false, null);
            if(mStorageManager != null)
            {
              mStorageManager.disableUsbMassStorage();
            }
        }

    
}

22,电池提示无法获取电池使用数据

设置--电池--,里面提示无法获取电池使用数据

android4.0(1.2版本之后,之前没有此功能)
在device\softwinner\crane-xxx\overlay\frameworks\base\core\res\res\xml  目录下, 增加 power_profile.xml
power_profile.xml 内容如下

<?xml version="1.0" encoding="utf-8"?>

<!--

**

** Copyright 2009, The Android Open Source Project

**

** Licensed under the Apache License, Version 2.0 (the "License")

** you may not use this file except in compliance with the License.

** You may obtain a copy of the License at

**

**     http://www.apache.org/licenses/LICENSE-2.0

**

** Unless required by applicable law or agreed to in writing, software

** distributed under the License is distributed on an "AS IS" BASIS,

** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

** See the License for the specific language governing permissions and

** limitations under the License.

*/

-->

 

<device name="Android">

     <item name="none">0</item>

     <item name="screen.on">55</item>

     <item name="bluetooth.active">142</item>

     <item name="bluetooth.on">1</item>

     <item name="bluetooth.at">35690</item>

     <item name="screen.full">115</item>

     <item name="wifi.on">4</item>

     <item name="wifi.active">130</item>

     <item name="wifi.scan">104</item>

     <item name="dsp.audio">75</item>

     <item name="dsp.video">75</item>

     <item name="radio.active">300</item>

     <item name="gps.on">170</item>

     <item name="radio.scanning">70</item>

     <array name="radio.on">

         <value>3</value>

         <value>3</value>

     </array>

     <array name="cpu.speeds">

         <value>1000000</value>

         <value>900000</value>

         <value>800000</value>

         <value>700000</value>

         <value>600000</value>

         <value>500000</value>

         <value>400000</value>

         <value>300000</value>

         <value>200000</value>

         <value>100000</value>

     </array>

     <item name="cpu.idle">10</item>

     <array name="cpu.active">

         <value>840</value>

         <value>760</value>

         <value>680</value>

         <value>520</value>

         <value>440</value>

         <value>360</value>

         <value>280</value>

         <value>200</value>

         <value>120</value>

         <value>40</value>

     </array>

     <item name="battery.capacity">1000</item>

</device>

 

<?xml version="1.0" encoding="utf-8"?>

<!--

**

** Copyright 2009, The Android Open Source Project

**

** Licensed under the Apache License, Version 2.0 (the "License")

** you may not use this file except in compliance with the License.

** You may obtain a copy of the License at

**

**     http://www.apache.org/licenses/LICENSE-2.0

**

** Unless required by applicable law or agreed to in writing, software

** distributed under the License is distributed on an "AS IS" BASIS,

** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

** See the License for the specific language governing permissions and

** limitations under the License.

*/

-->

 

<device name="Android">

     <item name="none">0</item>

     <item name="screen.on">55</item>

     <item name="bluetooth.active">142</item>

     <item name="bluetooth.on">1</item>

     <item name="bluetooth.at">35690</item>

     <item name="screen.full">115</item>

     <item name="wifi.on">4</item>

     <item name="wifi.active">130</item>

     <item name="wifi.scan">104</item>

     <item name="dsp.audio">75</item>

     <item name="dsp.video">75</item>

     <item name="radio.active">300</item>

     <item name="gps.on">170</item>

     <item name="radio.scanning">70</item>

     <array name="radio.on">

         <value>3</value>

         <value>3</value>

     </array>

     <array name="cpu.speeds">

         <value>1000000</value>

         <value>900000</value>

         <value>800000</value>

         <value>700000</value>

         <value>600000</value>

         <value>500000</value>

         <value>400000</value>

         <value>300000</value>

         <value>200000</value>

         <value>100000</value>

     </array>

     <item name="cpu.idle">10</item>

     <array name="cpu.active">

         <value>840</value>

         <value>760</value>

         <value>680</value>

         <value>520</value>

         <value>440</value>

         <value>360</value>

         <value>280</value>

         <value>200</value>

         <value>120</value>

         <value>40</value>

     </array>

     <item name="battery.capacity">1000</item>

</device>

 

<?xml version="1.0" encoding="utf-8"?>

<!--

**

** Copyright 2009, The Android Open Source Project

**

** Licensed under the Apache License, Version 2.0 (the "License")

** you may not use this file except in compliance with the License.

** You may obtain a copy of the License at

**

**     http://www.apache.org/licenses/LICENSE-2.0

**

** Unless required by applicable law or agreed to in writing, software

** distributed under the License is distributed on an "AS IS" BASIS,

** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

** See the License for the specific language governing permissions and

** limitations under the License.

*/

-->

 

<device name="Android">

     <item name="none">0</item>

     <item name="screen.on">55</item>

     <item name="bluetooth.active">142</item>

     <item name="bluetooth.on">1</item>

     <item name="bluetooth.at">35690</item>

     <item name="screen.full">115</item>

     <item name="wifi.on">4</item>

     <item name="wifi.active">130</item>

     <item name="wifi.scan">104</item>

     <item name="dsp.audio">75</item>

     <item name="dsp.video">75</item>

     <item name="radio.active">300</item>

     <item name="gps.on">170</item>

     <item name="radio.scanning">70</item>

     <array name="radio.on">

         <value>3</value>

         <value>3</value>

     </array>

     <array name="cpu.speeds">

         <value>1000000</value>

         <value>900000</value>

         <value>800000</value>

         <value>700000</value>

         <value>600000</value>

         <value>500000</value>

         <value>400000</value>

         <value>300000</value>

         <value>200000</value>

         <value>100000</value>

     </array>

     <item name="cpu.idle">10</item>

     <array name="cpu.active">

         <value>840</value>

         <value>760</value>

         <value>680</value>

         <value>520</value>

         <value>440</value>

         <value>360</value>

         <value>280</value>

         <value>200</value>

         <value>120</value>

         <value>40</value>

     </array>

     <item name="battery.capacity">1000</item>

</device>

 

<?xml version="1.0" encoding="utf-8"?>
     <device name="Android">
     <item name="none">0</item>

<item name="screen.on">55</item>

     <item name="bluetooth.active">142</item>

     <item name="bluetooth.on">1</item>

     <item name="bluetooth.at">35690</item>

     <item name="screen.full">115</item>

     <item name="wifi.on">4</item>

     <item name="wifi.active">130</item>

     <item name="wifi.scan">104</item>

     <item name="dsp.audio">75</item>

     <item name="dsp.video">75</item>

     <item name="radio.active">300</item>

     <item name="gps.on">170</item>

     <item name="radio.scanning">70</item>


<item name="screen.on">55</item>
<item name="bluetooth.active">142</item>
<item name="bluetooth.on">1</item>
     <item name="bluetooth.at">35690</item>
     <item name="screen.full">115</item>
     <item name="wifi.on">4</item>
     <item name="wifi.active">130</item>
     <item name="wifi.scan">104</item>
     <item name="dsp.audio">75</item>
     <item name="dsp.video">75</item>
     <item name="radio.active">300</item>
     <item name="gps.on">170</item>
     <item name="radio.scanning">70</item>
     <array name="radio.on">
         <value>3</value>
         <value>3</value>
     </array>
     <array name="cpu.speeds">
         <value>1000000</value>
         <value>900000</value>
         <value>800000</value>
         <value>600000</value>
         <value>400000</value>
         <value>100000</value>
     </array>
     <item name="cpu.idle">6</item>
     <array name="cpu.active">
         <value>1008</value>
         <value>960</value>
         <value>860</value>
         <value>680</value>
         <value>440</value>
         <value>40</value>
     </array>
     <item name="battery.capacity">1000</item>
</device>

23,android2.3上如何开启U盘自动扫描

插入U盘后在播放器中看不到U盘文件,如何才能打开

需修改
frameworks\base\core\java\android\provider\Settings.java
frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java
packages\providers\MediaProvider\src\com\android\providers\media\MediaScannerReceiver.java
packages\providers\MediaProvider\src\com\android\providers\media\MediaScannerService.java
具体修改如若无法完成,可参考相关补丁包
24,如何降低CPU最高频率

目前系统为动态调频,如何限定最高CPU频率?

降低CPU频率需要作以下两个修改:
1)在lichee\tools\pack\chips\sun5i\configs\android\xxx\sys_config1.fex文件(“xxx”为对应的方案配置文件目录)中修改启动频率:
       [target]boot_clock =1008
    boot_clock为启动的CPU频率,单位为MHz,根据需要自行修改,该值不能大于最高频率;

    2)在lichee\linux-3.0\arch\arm\mach-sun4i\cpu-freq\cpu-freq.h文件中修改CPU的最高频率:
        #define SUN4I_CPUFREQ_MAX       (1008000000)
       SUN4I_CPUFREQ_MAX为CPU允许运行的最高频率,单位是Hz,根据需要自行修改;

25,android4.0在阿拉伯语语言问题

android4.0在阿拉伯语语言系统下,APK程序进入到”设置”--“应用程序“--”储存转移“,点击“移至平板电脑”,出现无法移动的对 话框

 

问题补充 2012/04/27 20:19

在使用google market下载apk时,出现错误的提示框,也是由于 android4.0 在阿拉伯文支持上有问题。

由于android4.0对阿拉伯文支持问题,在调用String.format()方法的时候会出现有乱码的情况。
具体此问题,需要修改
frameworks\base\services\java\com\android\server\MountService.java
将 

public int createSecureContainer(String id, int sizeMb, String fstype,

                                    String key, int ownerUid) {

public int createSecureContainer(String id, int sizeMb, String fstype,

                                    String key, int ownerUid) {

public int createSecureContainer(String id, int sizeMb, String fstype,

                                    String key, int ownerUid) {

public int createSecureContainer(String id, int sizeMb, String fstype,String key, int ownerUid) {
     。。。
String cmd = String.format("asec create %s %d %s %s %d", id, sizeMb, fstype, key, ownerUid);
修改为 String cmd = "asec create "+id+" "+ sizeMb+" "+ fstype+" "+ key+" "+ ownerUid;

即可

26,如何在摄像头录像界面,预览画面跟随录像分辨率变化

例如:在media_profiles.xml文件中,分别设置了720p和480p的录像分辨率:

<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="3000000"
                   width="1280"
                   height="720"
                   frameRate="30" />
           
            <Audio codec="aac"
                   bitRate="128000"
                   sampleRate="44100"
                   channels="2" />
        </EncoderProfile>
       
        <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="1500000"
                   width="640"
                   height="480"
                   frameRate="25" />

            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

在camera.cfg文件中,对应的摄像头配置里面,需根据上面红色字体在
key_support_preview_size = 添加1280x720,640x480 跟录像设置的分辨率一样的预览支持分辨率

27,nexus和galaxy4动态壁纸显示问题

设置好动态壁纸,切换横竖屏,显示出现问题,被拉伸,或缺失

nexus

packages/wallpapers/Basic/src/com/android/wallpaper/nexus/NexusRS.java

69行resize函数
@Override
    public void resize(int width, int height) {
        super.resize(width, height); // updates mWidth, mHeight
        // android.util.Log.d("NexusRS", String.format("resize(%d, %d)", width, height));
    }
改成
@Override
    public void resize(int width, int height) {
        super.resize(width, height); // updates mWidth, mHeight
        createProgramVertex();
        // android.util.Log.d("NexusRS", String.format("resize(%d, %d)", width, height));
    }

galaxy4

packages/wallpapers/Galaxy4/src/com/android/galaxy4/Galaxy4Wallpaper.java

onSurfaceChanged函数改为

@Override
        public void onSurfaceChanged(SurfaceHolder surfaceHolder, int format, int width, int height) {
            super.onSurfaceChanged(surfaceHolder, format, width, height);

            if (mRenderScript != null) {
                mRenderScript.setSurface(surfaceHolder, width, height);
            }

            if (mWallpaperRS == null) {
                mWallpaperRS = new GalaxyRS();
                mWallpaperRS.init(mRenderScript, getResources(), width, height);
                mWallpaperRS.start();
            }

             mWallpaperRS.resize(width, height);
        }

packages/wallpapers/Galaxy4/src/com/android/galaxy4/GalaxyRS.java文件,
添加如下代码

public void resize(int w,int h) {
        mWidth = w;
        mHeight = h;
        createProgramVertex();
    },

28,android4.0修改system/build.prop文件后看不到变化

 第一次烧录后开机,看不到修改后的信息,要在烧录后第2次打开才能看到修改后的内容

原因:是在修改system/build.prop文件后,没有使用make systemimage-nodeps命令
解决方法:修改文件后,使用make systemimage-nodeps命令后,再pack

29,韩文字幕显示会有乱码

 

1.修改 Gallery2\src\com\android\gallery3d\app\MovieViewControl.java,见以下代码红色部分:

    private View.OnClickListener mSubCharSetListener = new View.OnClickListener() {
        public void onClick(View v) {
            mMediaController.setHolding(true);
         mControlFocus = EDITOR_SUBCHARSET;
         
         mDialogTitle.setText(R.string.charset_title);
         mListFocus = 0;
         String currentCharset = mVideoView.getSubCharset();
         String[] CharsetList = mRes.getStringArray(R.array.screen_charset_values);
         for(int i = 0; i < CharsetList.length; i++) {
          if(currentCharset.equalsIgnoreCase(CharsetList[i])) {
           mListFocus = i;
           break;
          }
         }
         
         ArrayAdapter<String> adapter = new ArrayAdapter<String>(mContext,
           R.layout.simple_list_item_single_choice,
           mRes.getStringArray(R.array.screen_charset_entries));
         mListView.setAdapter(adapter);
            mListView.setItemChecked(mListFocus, true);
            mListView.smoothScrollToPosition(mListFocus);
         mListDialog.show();
        }
    };

 

2.修改Gallery2\res\values\arrays.xml,如下:

    <!-- subtitle setting.  The charset of subtitle to show. -->
    <string-array name="screen_charset_values">
     <item>"UTF-8"</item>
     <item>"GBK"</item>
     <item>"Big5"</item>
     <item>"EUC-KR"</item>
     <item>"Shift_JIS"</item>
     <item>"TIS-620"</item>
     <item>"KOI8-R"</item>
     <item>"ISO-8859-5"</item>
     <item>"windows-1251"</item>
     <item>"UTF-16BE"</item>
     <item>"UTF-16LE"</item>
     <item>"ISO-8859-1"</item>
     <item>"windows-1254"</item>
     <item>"ISO-8859-2"</item>
     <item>"windows-1250"</item>
     <item>"ISO-8859-3"</item>
     <item>"ISO-8859-4"</item>
     <item>"ISO-8859-6"</item>
     <item>"windows-1256"</item>
     <item>"ISO-8859-7"</item>
     <item>"windows-1253"</item>
     <item>"ISO-8859-8"</item>
     <item>"windows-1255"</item>
     <item>"ISO-8859-9"</item>
     <item>"windows-1252"</item>
     <item>"windows-1258"</item>
    </string-array>

 

3.修改Gallery2\res\values\strings.xml,如下:

    <!-- Slide show subtitle charset -->
    <string-array name="screen_charset_entries">
     <item>Unicode(UTF-8)</item>
     <item>Simplified Chinese(GBK)</item>
     <item>Traditional Chinese(Big5)</item>
     <item>Korean(EUC-KR)</item>
     <item>Japanese(Shift_JIS)</item>
     <item>Thai(TIS-620)</item>
     <item>Cyrillic(KOI8-R)</item>
     <item>Cyrillic(ISO-8859-5)</item>
     <item>Cyrillic(cp1251)</item>
     <item>Unicode(UTF-16BE)</item>
     <item>Unicode(UTF-16LE)</item>
     <item>Western Europe(ISO-8859-1)</item>
     <item>Western language(cp1254)</item>
     <item>Central Europe(ISO-8859-2)</item>
     <item>Central Europe(cp1250)</item>
     <item>Southern Europe(ISO-8859-3)</item>
     <item>Northern Europe(ISO-8859-4)</item>
     <item>Arabic(ISO-8859-6)</item>
     <item>Arabic(cp1256)</item>
     <item>Greek(ISO-8859-7)</item>
     <item>Greek(cp1253)</item>
     <item>Hebrew(ISO-8859-8)</item>
     <item>Hebrew(cp1255)</item>
     <item>Turkish(ISO-8859-9)</item>
     <item>Turkish(cp1252)</item>
     <item>Vietnamese(cp1258)</item>
    </string-array>


4.简体中文支持,修改Gallery2\res\values-zh-rCN\strings.xml,如下:
    <string-array name="screen_charset_entries">
     <item>"Unicode(UTF-8)"</item>
     <item>"简体中文(GBK)"</item>
     <item>"繁体中文(Big5)"</item>
     <item>"韩文(EUC-KR)"</item>
     <item>"日文(Shift_JIS)"</item>
     <item>"泰文(TIS-620)"</item>
     <item>"西里尔文(KOI8-R)"</item>
     <item>"西里尔文(ISO-8859-5)"</item>
     <item>"西里尔文(cp1251)"</item>
     <item>"Unicode(UTF-16BE)"</item>
     <item>"Unicode(UTF-16LE)"</item>
     <item>"西欧语系(ISO-8859-1)"</item>
     <item>"西欧语系(cp1254)"</item>
     <item>"中欧语系(ISO-8859-2)"</item>
     <item>"中欧语系(cp1250)"</item>
     <item>"南欧语系(ISO-8859-3)"</item>
     <item>"北欧语系(ISO-8859-4)"</item>
     <item>"阿拉伯文(ISO-8859-6)"</item>
     <item>"阿拉伯文(cp1256)"</item>
     <item>"希腊语(ISO-8859-7)"</item>
     <item>"希腊语(cp1253)"</item>
     <item>"希伯来文(ISO-8859-8)"</item>
     <item>"希伯来文(cp1255)"</item>
     <item>"土耳其文(ISO-8859-9)"</item>
     <item>"土耳其文(cp1252)"</item>
     <item>"越南文(cp1258)"</item>
  </string-array>

 播放视频时,记得 在 播放界面 选择 相应的字幕 。例如 韩文 ,在播放界面,选择 "..."后,选择韩文字幕 。

30,修改sys_config1后,如果能不升级整个固件就让其生效

每次升级整个固件太慢,有没有办法部分升级?

1. 在android shell中将/dev/block/nanda mount到某个节点:
    mount -t vfat /dev/block/nanda /mnt/nand
2. 修改sys_config1后build固件,然后在lichee\tools\pack\out\bootfs下找到scrpt.bin和script0.bin
3. 然后用adb连接后,将scritp.bin和script0.bin推到所mount节点的根目录下,替换原有同名文件:
    adb push script*.bin  /mnt/nand/
4. 最后sync重启即可
    adb shell
    sync
    reboot

31,如何修改浏览器默认模式

在android4.0.1/packages/apps/Browser/res/xml/debug_preferences.xml中将
<ListPreference
 39         android:key="user_agent"
 40         android:title="@string/pref_development_uastring"
 41         android:entries="@array/pref_development_ua_choices"
 42         android:entryValues="@array/pref_development_ua_values"
 43         android:defaultValue="3"/>
中修改defaultValue的值,对应如下:
Android  :0
Desktop :1
iPhone:2
iPad :3
Froyo-N1:4
Honeycomb-Xoom:5

追问:BrowserSetting.java文件中需要同步修改,否则会出现显示值和实际值第一次不一致的情况: public int getUserAgent() { if (!isDebugEnabled()) { return 0; } /* modified by Gary. start {{----------------------------------- */ /* 2011-11-29 */ /* modify the default user agent */ return Integer.parseInt(mPrefs.getString(PREF_USER_AGENT, "3")); /* add by Gary. end -----------------------------------}} */ }

32,电量管理不准以及低电不关机

v1.0和v1.1中感觉电池电量不准,在低电情况下,系统也没有自动关机

需确认sys_config1.fex以下几个地方:
1. pmu_battery_rdc的值为100
2. pmu_battery_cap为正确的电池电量
3. pmu_bat_para的放电曲线校正

对于低电系统没有自动关机问题,一般尝试修改pmu_battery_cap:
pmu_bat_para4            = 0
pmu_bat_para5            = 5

33,android4.0 GC0307 Camera曝光调节不正常

调节曝光等级-4比等级-3还亮

把gc0307.c驱动里的这个数组,
static struct regval_list sensor_ev_neg4_regs[ ] = {

     {{0xf0},{0x00}},

     {{0x7a},{0xc0}},                   

     {{0xd1},{0x30}}, 

     {{0xf0},{0x00}},
     {{0x7a},{0x00}},
     {{0xd1},{0x50}},
};
改成
static struct regval_list sensor_ev_neg4_regs[ ] = {

     {{0xf0},{0x00}},

     {{0x7a},{0xc0}},                   

     {{0xd1},{0x30}}, 

     {{0xf0},{0x00}},
     {{0x7a},{0xc0}},
     {{0xd1},{0x30}},
};

34,adb中使用busybox

adb自带的shell使用很不爽,能不能使用busybox

在adb中运行如下命令即可:
busybox sh
要退出busybox模式,输入exit即可

35,如何单独替换内核

有没有办法不升级整个固件,单独替换内核

在android shell中将/dev/block/nanda mount到某个节点:
mount -t vfat /dev/block/nanda /mnt/nand
然后用adb连接后,将bImage直接push到所mount节点的linux目录下,替换bImage:
adb push bImage /mnt/nand/linux
最后sync重启即可
adb shell
sync
reboot

36,竖屏机器在取消“自动选择屏幕”后如何避免变成横屏显示?

文件:
android4.0\frameworks\base\policy\src\com\android\internal\policy\impl\PhoneWindowManager.java
函数:
 public int rotationForOrientationLw(int orientation, int lastRotation) {

....

                default:
                    // For USER, UNSPECIFIED, NOSENSOR, SENSOR and FULL_SENSOR,
                    // just return the preferred orientation we already calculated.
                    if (preferredRotation >= 0 && sensorChanged) {
                        return preferredRotation;
                    }
                    return Surface.ROTATION_270;    //这里修改Surface.ROTATION_0 -> Surface.ROTATION_270


}

37,录像时不能选择分辨率

摄像头录像时,选择分辨率的选项没有

如果想在720p和480p之间选择,在mediaprofile.xml文件中,按如下设置:

<CamcorderProfiles>
       
        <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="3000000"
                   width="1280"
                   height="720"
                   frameRate="30" />
           
            <Audio codec="aac"
                   bitRate="128000"
                   sampleRate="44100"
                   channels="2" />
        </EncoderProfile>
       
        <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="1500000"
                   width="640"
                   height="480"
                   frameRate="25" />

            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="3000000"
                   width="1280"
                   height="720"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="128000"
                   sampleRate="44100"
                   channels="2" />
      </EncoderProfile>
      
      <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="1500000"
                   width="640"
                   height="480"
                   frameRate="25" />

            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile> 


        <ImageEncoding quality="90" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />

        <Camera previewFrameRate="0" />

    </CamcorderProfiles>

38,A13上Goodix TP触摸无效

A10上正常,A13无效

原因:
中断号由A10的EINT21变为A13上的EINT11。

解决方法:
在中断处理函数中把对EINT21的处理变为对EINT11的处理。
goodix_touch.c

static irqreturn_t goodix_ts_irq_handler(int irq, void *dev_id)
{
 struct goodix_ts_data *ts = dev_id; 
 int reg_val; 
 print_int_info("==========------TS Interrupt-----============\n");

 //clear the IRQ_EINT11 interrupt pending
 reg_val = readl(gpio_addr + PIO_INT_STAT_OFFSET);
    
 if(reg_val&(1<<(IRQ_EINT11)))
 { 
  print_int_info("==IRQ_EINT11=\n");
  writel(reg_val&(1<<(IRQ_EINT11)),gpio_addr + PIO_INT_STAT_OFFSET);
  queue_work(goodix_wq, &ts->work);
 }
 else
 {
     print_int_info("Other Interrupt\n");
     return IRQ_NONE;
 }
 return IRQ_HANDLED;
}

39,播放部分音视频文件的时候,声音出现卡顿

在其它机器上不会,DDR频率为360M

由于客户的板子loyout或者制作不是很完善,导致DDR频率为360M时,出现播放视频声音卡顿,把DDR频率降为240M左右解决

40,如何修改蓝牙名称

如果你想修改默认的名字,可以这么做:
文件external/bluetooth/bluez/src/main.c

main_opts.name  = g_strdup("BlueZ");
里面的BlueZ换成你想要的名字即可!
由于没有悬赏分,只能这么回答了,呵呵~~~

41,如何更改android编译选项

比如eng,usr,debug

在相应的device目录下,如crane-evb,打开vendorsetup.sh
将里面
add_lunch_combo crane_evb-eng
最后的eng修改成你希望的模式即可。
如:
add_lunch_combo crane_evb-user
add_lunch_combo crane_evb-userdebug

42,为何通过UsbManager调用getDeviceList获取设备列表总是空的

这个是因为缺少android.hardware.usb.host权限,
http://www.oschina.net/code/download_src?file=android-4.0.1%2Fdata%2Fetc%2Fandroid.hardware.usb.host.xml
下载该文件,放在/system/etc/permisson/下,可以解决

43,低电自动关机重启

低电状态下,自动关机后重启,进不了系统,偶尔能进入系统但是触屏没反应

原因在于源不足以支持系统开机,而此时电池又电量太低,导致不能满足整个系统的开机功耗。解决方法是提高开机的门限电和Android关机门限。
 1:boot阶段开机的门限电压设置方法 :
在sys_config1脚本中
[boot_extend]
vol_threshold = 3500
2:修改Android 低电关机的门限
 BatteryService.java 

     private final void shutdownIfNoPower() {
        // shut down gracefully if our battery is critically low and we are not powered.
        // wait until the system has booted before attempting to display the shutdown dialog.
        if (mBatteryLevel < 5 &&(5为5%即可关机修改 为更大的值,具体值可以根据具体情况而定)

44,sys_config1中power20x是什么意思

power指PMU的PIN

20x意义如下:
201表示axp20_rtc
202表示"axp20_analog/fm"
203表示"axp20_pll"
204表示"axp20_hdmi"

45,A13 wifi关闭后电源没有关断

A13方案的wifi在关闭后电源没有关断,导致休眠唤醒出问题

检查USB WIFI部分的usb_drv_vbus_gpio的配置是否正确
在A13方案中,除使用gpio外,还会用到PMU的LDO,请注意

46,如何修改鼠标的按键定义

鼠标插上以后,左键和右键的功能都是左键的,如何将右键修改为返回

这个是android的标准做法,如果定制,可以修改frameworks/base/services/input/inputreader.cpp文件中的:

 

uint32_t CursorButtonAccumulator::getButtonState() const {
    uint32_t result = 0;
    if (mBtnLeft) {
        result |= AMOTION_EVENT_BUTTON_PRIMARY;
    }
    if (mBtnRight) {
        result |= AMOTION_EVENT_BUTTON_SECONDARY;
    }
    if (mBtnMiddle) {
        result |= AMOTION_EVENT_BUTTON_TERTIARY;
    }
    if (mBtnBack || mBtnSide) {
        result |= AMOTION_EVENT_BUTTON_BACK;
    }
    if (mBtnForward || mBtnExtra) {
        result |= AMOTION_EVENT_BUTTON_FORWARD;
    }
    return result;
}

目前因为下面函数

static bool isPointerDown(int32_t buttonState) {
    return buttonState &
            (AMOTION_EVENT_BUTTON_PRIMARY | AMOTION_EVENT_BUTTON_SECONDARY
                    | AMOTION_EVENT_BUTTON_TERTIARY);
}

 

将鼠标左右键的功能设置成判断鼠标是否点击的操作,所以功能一致,如果需要修改,这需要改一下上面的getButtonState函数中的标志位即可,比如需要将右键改为后退键,只需要

函数中:

  if (mBtnRight) {
        result |= AMOTION_EVENT_BUTTON_SECONDARY;
    }

改为

  if (mBtnRight) {
        result |= AMOTION_EVENT_BUTTON_BACK;
    }

即可。

47,android4.0上如何将一个电阻屏的工程修改为电容屏的?

在android4.0上需要修改些什么才能从电阻屏转化为电容屏?

该部分在发给客户的定制文档中已有说明,针对4.0相关的修改点如下:

1. sys_config1.fex文件:屏蔽掉RTP相关的配置:
[rtp_para]
rtp_used      =0
rtp_screen_size =7
rtp_regidity_level = 7
rtp_press_threshold_enable = 0
rtp_press_threshold = 0x1f40
rtp_sensitive_level = 0xf
rtp_exchange_x_y_flag = 0
配置正确的CTP参数,以ft5x为参考:
[ctp_para]
ctp_used                 =1
ctp_name                 = "ft5x_ts"
ctp_twi_id               = 2
ctp_twi_addr             =0x38
ctp_screen_max_x         = 1024
ctp_screen_max_y         = 768
ctp_revert_x_flag        = 0
ctp_revert_y_flag        = 0
ctp_exchange_x_y_flag    = 0

ctp_int_port             = port:PH21<6>
;ctp_wakeup               = port:PB13<1><1>
ctp_reset                = port:PH20<1>
ctp_io_port              = port:PH21<0>
该部分的参数意义可以查看收到的‘Android定制文档’

2.驱动相关:
正确编译相关驱动,默认已提供敦泰、蕙鼎驱动;
在init.sun4i.rc文件中正确insmod相关驱动:
insmod /system/vendor/modules/sun4i-ts.ko   //注释掉默认的电阻屏驱动 insmod /system/vendor/modules/ft5x_ts.ko     //正确加载使用的驱动

3.其他细节
(1)4.0上需添加一个tp的idc文件,用于参数校正,文件名用驱动的input name即可;
crane_xxx中的sun4i-ts.idc文件改名为ft5x_ts.idc
同时在crane_xxx.mk文件修改拷贝动作:
device/softwinner/crane-xxx/ft5x_ts.idc:system/usr/idc/ft5x_ts.idc
(2) 去掉rtp上用到的触摸校准程序:
crane-xxx.mk中去掉:
PRODUCT_PACKAGES += \
TSCalibration2
使在编译打包时不包含该触摸校准应用;

48,android平台的OMX框架是否有硬件加速

android平台的OMX的解码框架支持硬件加速

49,A13怎么用串口打印信息?

A13调试版本固件支持SD卡输出打印,以及打开JTAG功能的配置方法如下:

1.修改配置文件 sys_config1.fex,支持调试打印从SD0接口输出:
[uart_para]
 uart_debug_port          = 1
 uart_debug_tx            = port:PG3<4><1>
 uart_debug_rx            = port:PG4<4><1>

     修改为:
[uart_para]
uart_debug_port          = 0
uart_debug_tx            = port:PF2<4><1>
uart_debug_rx            = port:PF4<4><1>

 [uart_para0]
uart_used                = 0
uart_port                = 0
uart_type                = 2
uart_tx                  = port:PG3<4><1>
uart_rx                  = port:PG4<4><1>

修改为:
[uart_para0]
uart_used                = 1
uart_port                = 0
uart_type                = 2
uart_tx                  = port:PF2<4><1>
uart_rx                  = port:PF4<4><1>

[mmc0_para]

sdc_used                 = 1

修改为:
[mmc0_para]
sdc_used                 = 0

  同时个改u-boot源文件“lichee\u-boot\include\configs\sun5i_a13.h”,配置打印由uart0输出:
#define CONFIG_CONS_INDEX            2             /* which serial channel for console */
   修改为:
#define CONFIG_CONS_INDEX            1             /* which serial channel for console */

修改配置文件 sys_config1.fex,支持JTAG:
[jtag_para]
jtag_enable              = 0
修改为:
[jtag_para]
jtag_enable              = 0

50,swi entry mismatch,有没有相关资料啊

[       0.212] gpio config
[       0.212] gpio finish
[       0.408] ERROR : swi entry mismatch[       0.408] The input swi number is 16777215, 0x00ffffff
[       0.411] ERROR : swi entry mismatch[       0.414] The input swi number is 16777215, 0x00ffffff

 

问题补充 2012/04/06 17:04

出问题在Jump to Boot1.处,还没有到uboot,我使用的是crane_sdk_v4.0.8-1版本

问题补充 2012/04/06 17:05

我在lunch使用的是evb配置

问题补充 2012/04/11 17:10

fail:/home/sys161117/lichee/tools/pack/out/bootfs/vendor/system/media 0 

问题补充 2012/04/11 17:11

打包的时候有这个错误
fail:/home/sys161117/lichee/tools/pack/out/bootfs/vendor/system/media 0 

问题补充 2012/04/12 09:20

出现这个问题是因为设置了
设置启动就是hdmi显示
http://service.awbase.com:8000/ask/?q-137.html

1.在lichee\tools\pack\chips\sun4i\wboot\bootfs\boot.ini中更改以下
display_device= 3
display_mode  = 4   
2.在sys_config1.fex中更改以下
screen0_output_type      = 3
screen0_output_mode      = 4

51,有没有单独烧写uboot和配置的方式

更新uboot可以直接mount /dev/nanda分区,将u-boot.bin放在/nanda/linux/下,具体方式可以通过adb

追问:你这个是不是必须要到android起来才能操作,我想在boot下或者tf卡上烧写

52,通过 USB充电使用

 机器通过 USB线接电脑充电使用,在玩游戏的过程中耗电量大于充电量,导致没有电流流入电池,反而是电池在耗电,但是机器显示电量百分比一直不会下降,也不会低电提示和低电关机。直到电池电量完全耗尽,机器会强制关机。

该问题为充电下电量处理的问题,在v1.2版本已经修正

53,系统无法启动:key found, jump to fel

打印信息如下:
HELLO! BOOT0 is starting!
boot0 version : .2.2
dram size =512
Succeed in opening nand flash.
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00036000.
The file stored in 0X00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.128] boot1 version : 1.2.6
[       0.128] pmu type = 3
[       0.156] axi:ahb:apb=3:2:2
[       0.156] set dcdc2=1400, clock=1008 successed
[       0.158] key
[       8.370] timeout, but no power key found
[       8.370] key found, jump to fel

 

请检查下按键处的电阻是否有焊接,从打印来看是boot检测到按键,走到升级流程去了

54,windows下如何用adb调试呢?

1.       在 pad上选:“设置”-> "开发人员选项" -> usb 调试,这里勾上。 2.接上windows,若没安装过 adb驱动,则会提示新设备,安装下面目录里面的驱动即可: \tools\\tools_win\USBDriver.rar 3. 用下面的 adb应用程序即可: \tools_win\PlatformTools\platform-tools如:E:\\platform-tools\adb shell

55,MXC622X GSENSOR在android4.0上怎么配置

首先在android4.0X\device\softwinner\crane-xx\BoardConfig.mk中添加如下配置:
# Gsensor board config
# we can use this string : mma7660, mxc622x , bma250
SW_BOARD_USES_GSENSOR_TYPE := mxc622x
SW_BOARD_GSENSOR_DIRECT_X := true
SW_BOARD_GSENSOR_DIRECT_Y := false
SW_BOARD_GSENSOR_DIRECT_Z := false
SW_BOARD_GSENSOR_XY_REVERT := true
注意:修改该文件后,为确保修改后能编译相关文件,
比较快速简便的方法是:进入android4.0x\device\softwinner\common\hardware\目录下,输入find . | xargs touch命令touch该文件夹下的所有文件。

然后在android4.0X\device\softwinner\crane-xx\init.sun4i.rc中添加如下配置:
# gsensor module
     insmod /system/vendor/modules/mecs.ko
     insmod /system/vendor/modules/mxc622x.ko
     chmod 777 /system/bin/memsicd
     mkdir /data/misc/sensors 0777 system system

service memsicd /system/bin/logwrapper /system/bin/memsicd
  class main

最后在android4.0X\device\softwinner\crane-xx\ueventd.sun4i.rc中添加如下配置:
/dev/mxc622x     0777   system     system
/dev/ecompass_ctrl    0777   system     system

在lichee\tools\pack\chips\sun4i\configs\crane\xx\sys_config1.fex文件中,gsensor的配置如下:

[gsensor_para]
gsensor_used             =1
gsensor_name             = "mxc622x"
gsensor_twi_id           = 1
gsensor_twi_addr         =0x15
gsensor_int1             =
gsensor_int2             =

 

56,android 4.0 v1.1版本,编译gps报错

报错信息:

make: *** Notice file: frameworks/base/cmds/svc/NOTICE -- out/target/product/crane-evb-v13/obj/NOTICE_FILES/src//system/framework/svc.jar.txt

没有规则可以创建“out/target/product/crane-evb-v13/obj/lib/gps.exDroid.so”需要的目标“device/softwinner/common/hardware/libhardware/gps//haiweixun/gps.exDroid.so”。停止。

因为编译脚本的改变,所以把android4.03\device\softwinner\common\hardware\libhardware\gps\haiweixun\这个文件名gps.sun4i.so改为gps.exDroid.so再编译就可以了

57,RTL8188 wifi反馈搜索不到中文名的ap;

追踪发现wap_supplicant中得到的SCAN_RESULTS中就没有中文名ap,确认是driver中没有上报该ap;

修改方法:
linux-3.0\drivers\net\wireless\rtl8192cu\include\drv_conf.h
mark掉CONFIG_VALIDATE_SSID这个定义

该定于主要用于搜索到SSID后再进行一次过滤,如果是非ascii字符则放弃掉该ap:
  if(!( (ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e) )){
   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
   ret= _FALSE;
   break;
  }
同RTL沟通,该定于主要用于前期在上层收到非ascii字串后会导致应用程序挂死,目前系统已没有该问题,所以需要该功能的客户可以将该定义注释掉;

58,android canvas无法进行裁剪绘制不规则图形

 我实现的是一个翻书效果的应用,但是进行翻页时报错。
异常信息如下:
unSupportedOperationException
at.android.view.GLES20Canvas.clippath(GLES20Canvas.java:413);
不知道这是什么原因

原因是android4.0默认开启硬件加速,绘制由GLES20Canvas处理,该类的clipPath方法直接抛出了上述异常
解决方法:如果您有应用程序的源代码,可以在需要进行clipPath的view进行
setLayerType(View.LAYER_TYPE_SOFTWARE,mPaint);操作,进行软件渲染
59,AndroidModify_V104修改语言等,还是中文

修改语言,时区,机型等在第一次烧写后是中文的,重新启动或恢复出厂设置后又是修改后的语言(比如英语),
1:能在第一次烧写后就是修改后的语言吗?
2:时区不能随语言的变更而自动改变吗?(或者有对应的说明吗?因为有时候比如印度、意大利等都不太清楚是哪个时区,有个对照表)
3:修改卷标后无效,还是原来的卷标

 

1.  目前还做不到,需要首次启动后再重起才行
2。时区和语言是两个设置项,需单独设置。对于地区和时区的对照可以自行上网查找相关资料
3。请更新到V105测试

 

60,视频老化退出或者停住

v1.0和v1.1在进行视频老化测试的时候,循环播放一晚
视频出现退出播放或者在切换中定住的问题

 

该问题由解码库的bug引起,目前已经确认并解决,后续版本会fix该问题

61,客户反馈,使用新版IC之后仍发现usb host口不能接低速设备;

这个目前是已经支持的,测试过都没问题的。
1.
确定usb host口硬件连接是否和evb板一样。这点一般没问题。

2.
更新 lichee/linux代码到最新的版本。

62,F20的CVBS没有输出

我们现在有个F20的机器,CVBS没有输出,
请问下代码的位置,或者是否有开关没打开

 

 CVBS没有输出有可能是引脚功能没有配置正确,首先确认引脚是否有输出可通过测试程序fb_tv来测,应用在releasexx/test/display/fb下。

确认有输出后,可通过代码更改引脚的功能定义,修改文件名为: linux-v2.6.36.4\drivers\video\sun3i\disp\de_bsp\de\disp_tv.c中的Disp_TVEC_Init(void)函数,默认为:

gdisp.screen[0].dac_source[0] = DISP_TV_DAC_SRC_COMPOSITE;

gdisp.screen[0].dac_source[1] = DISP_TV_DAC_SRC_Y;

gdisp.screen[0].dac_source[2] = DISP_TV_DAC_SRC_PB;

gdisp.screen[0].dac_source[3] = DISP_TV_DAC_SRC_PR;

将对应的dac更改在DISP_TV_DAC_SRC_COMPOSITE就可以了。

 

63,android 2.3.4 v2.05版本,播放视频待机唤醒后,视频显示反了

 显示屏旋转180度方案上

 

在android2.3.4\frameworks\base\media\CedarX-Projects\CedarXAndroid\Gingerbread\CedarXPlayer.cpp文件中的status_t CedarXPlayer::prepare_l()这个函数中,添加针对屏反方案的控制
例如:

status_t CedarXPlayer::prepare_l() {
 if (mFlags & PREPARED) {
     return OK;
 }

 mIsAsyncPrepare = false;
 
 if(mScreenID == 0) { //master screen
  mPlayer->control(mPlayer, CDX_CMD_SET_VIDEO_ROTATION, 2, 0);
 }
 
 if(mPlayer->control(mPlayer, CDX_CMD_PREPARE, 0, 0) != 0){
  return UNKNOWN_ERROR;
 }

 finishAsyncPrepare_l(0);

 return OK;
}

64,android4.0,如何预装apk?

可参考android2.3.4的做法:
1.
在目录/android2.3.4/device/softwinner/crane-evb/apk  下有一些apk。
2.
然后crane_evb.mk文件中有语句:
# pre-installed apks
#PRODUCT_COPY_FILES += \
# $(call find-copy-subdir-files,*.apk,$(LOCAL_PATH)/apk,system/preinstall) 

在android4.0上同样的在./device/softwinner/crane-xxx建个目录apk,同时修改相应的crane_xxx.mk,在里面添加
# pre-installed apks
#PRODUCT_COPY_FILES += \
# $(call find-copy-subdir-files,*.apk,$(LOCAL_PATH)/apk,system/preinstall) 

这样就可以预装apk了。

64,android4.0.10 wifi无法连接

 E/CommandListener(   82): Failed to open /proc/sys/net/ipv6/conf/wlan0/use_tempa
ddr: No such file or directory
E/WifiStateMachine(  175): Unable to change interface settings: java.lang.Illega
lStateException: Unable to communicate with native daemon to set ipv6privacyexte
nsions - com.android.server.NativeDaemonConnectorException: Cmd {interface ipv6p
rivacyextensions wlan0 enable} failed with code 400 : {Failed to set ipv6 privac
y extensions (No such file or directory)}
E/WifiHW  (  175): Supplicant not running, cannot connect
E/WifiHW  (  175): Supplicant not running, cannot connect
E/WifiHW  (  175): Supplicant not running, cannot connect
E/WifiHW  (  175): Supplicant not running, cannot connect
E/WifiHW  (  175): Supplicant not running, cannot connect
E/WifiStateMachine(  175): Failed to setup control channel, restart supplicant
D/WifiHW  (   82): Enter: wifi_get_fw_path function, fw_type=0,
E/SoftapController(   82): iface:wlan0, fname: WL_FW_RELOAD - function not suppo
rted
E/SoftapController(   82): Softap fwReload - failed: -1
E/WifiStateMachine(  175): Failed to reload STA firmware java.lang.IllegalStateE
xception: Error communicating to native daemon
D/CommandListener(   82): Setting iface cfg
D/CommandListener(   82): Trying to bring down wlan0
D/CommandListener(   82): broadcast flag ignored
D/CommandListener(   82): multicast flag ignored
E/CommandListener(   82): Failed to open /proc/sys/net/ipv6/conf/wlan0/use_tempa
ddr: No such file or directory
D/NetworkManagementService(  175): rsp <213 00:92:c3:a2:be:7f 0.0.0.0 0 [down br
oadcast multicast]>
D/NetworkManagementService(  175): flags <[down broadcast multicast]>
E/WifiStateMachine(  175): Unable to change interface settings: java.lang.Illega
lStateException: Unable to communicate with native daemon to set ipv6privacyexte
nsions - com.android.server.NativeDaemonConnectorException: Cmd {interface ipv6p
rivacyextensions wlan0 enable} failed with code 400 : {Failed to set ipv6 privac
y extensions (No such file or directory)}
^C

 

如果是用的rtl8192wifi的话,参考下面修改

1.   BoardConfig.mk文件:

# Wifi related defines

#BOARD_WPA_SUPPLICANT_DRIVER := WEXT

#WPA_SUPPLICANT_VERSION      := VER_0_8_X

# Wifi chipset select

BOARD_WIFI_VENDOR := realtek

ifeq ($(BOARD_WIFI_VENDOR), realtek)

    WPA_SUPPLICANT_VERSION := VER_0_8_X

    BOARD_WPA_SUPPLICANT_DRIVER := NL80211

    BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl

    BOARD_HOSTAPD_DRIVER        := NL80211

    BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_rtl

 

    SW_BOARD_USR_WIFI := rtl8192cu

    BOARD_WLAN_DEVICE := rtl8192cu

  endif

2.    init.sun4i.rc文件:

#add for realtek wifi

service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf

              socket wpa_wlan0 dgram 660 wifi wifi

              group wifi inet

              disabled

              oneshot

65,android 2.3.4 v2.05版本,摄像头预览颜色偏蓝

   显示屏旋转180度方案上

 

在 CameraHardware.cpp
在void CameraHardware::setOveralyRotation(V4L2BUF_t * pV4L2Buf, int preview_width, int preview_height)
添加的这个函数中,把blit_para.src_image.pixel_seq    = G2D_SEQ_VUVU;          /* not use now */
和blit_para.dst_image.pixel_seq    = G2D_SEQ_VUVU;          /* not use now */
改为blit_para.src_image.pixel_seq    = G2D_SEQ_NORMAL;          /* not use now */
和blit_para.dst_image.pixel_seq    = G2D_SEQ_NORMAL;          /* not use now */

 

66,android 4.0.10进土豆网,只能看今日热点,其它的视频看不了?

1 、修改device/softwinner对应产品目录下的Boardconfig.mk,在文件后面添加一行代码  USE_OPENGL_RENDERER := true;

2、修改device/softwinner对应产品目录下的crane_xxxx.mk文件中增加PRODUCT_PROPERTY_OVERRIDES特性 hwui.render_dirty_regions=false

例如:PRODUCT_PROPERTY_OVERRIDES += \
 persist.sys.usb.config=mass_storage,adb \
 ro.product.firmware=0.3 \
 hwui.render_dirty_regions=false

 

修改完后重新编译即可

67,编译crane_sdk_v4.0.8-1到命令pack过不去

cp: cannot stat `/system/build.prop': No such file or directory
cp: cannot stat `/system/media/bootanimation.zip': No such file or directory

 

检查在你的产品目录下是否存在这两个文件,build.prop是属性配置脚本,bootanimation.zip是开机动画

`/system/build.prop'这个文件在系统编译完成之后一定存在,请确认是否正常编译完成~

`/system/media/bootanimation.zip'开机动画可能不存在,但不会引起打包失败~

68,android4.0 AndroidModify_V105_2012_0307

只能该bootlogo和开机logo , 动画,语音,国家,地区,型号改不了。

 

修改后,第一次启动后要重启才能生效

69,android 2.3.4 v2.05版本,系统不能恢复出厂设置

在system/vold/volume.cpp中,用下面程序替换这个函数 formatVol
int Volume::formatVol() {   
 if (getState() == Volume::State_NoMedia) {       
  errno = ENODEV;       
  return -1;   
 
 } else if (getState() != Volume::State_Idle) {
        errno = EBUSY;       
        return -1;   
 }   
        if (isMountpointMounted(getMountpoint())) {   
      SLOGW("Volume is idle but appears to be mounted - fixing");       
         setState(Volume::State_Mounted);       
   // mCurrentlyMountedKdev = XXX       
         errno = EBUSY;      
    return -1;   
    }   
        bool formatEntireDevice = (mPartIdx == -1);   
        char devicePath[255];   
        dev_t diskNode = getDiskDevice();   
        dev_t partNode = MKDEV(MAJOR(diskNode), (formatEntireDevice ? 1 : mPartIdx));   
        setState(Volume::State_Formatting);   
        int ret = -1;   
  // Only initialize the MBR if we are formatting the entire device   
        if (formatEntireDevice) {       
         sprintf(devicePath, "/dev/block/vold/%d:%d",
   MAJOR(diskNode), MINOR(diskNode));
         SLOGI("init mbr %s (%s)", getLabel(), devicePath);       
         if (initializeMbr(devicePath)) {           
         SLOGE("Failed to initialize MBR (%s)", strerror(errno));           
         goto err;      
          }   
         }
         getDeviceNodes(&partNode, 1);   
         sprintf(devicePath, "/dev/block/vold/%d:%d",MAJOR(partNode), MINOR(partNode));   
         if (mDebug) {      
          SLOGI("Formatting volume %s (%s)", getLabel(), devicePath);   
            }   
     
    if (Fat::format(devicePath, 0)) {       
          SLOGE("Failed to format (%s)", strerror(errno));       
          goto err;   
    }   
          ret = 0;
err:   
   setState(Volume::State_Idle);   
   return ret;
}

70,android系统上有屏闪现象

android2.3和android4.0都有

 

目前android2.3.4 v2.05系统上发现客户上是背光电路少了滤波电容,将该电容接上,问题改善。

 

71,出现“加密失败”,是什么原因,怎么解决?

 在第一次升级后起来,此时断电,在重新开机,会显示“加密失败”。

什么加密?具体什么环境,请描述全面一点

72,更新android2.3的最新2.0.5的时候报错

在外部服务器上更新最新的2.3版本2.0.5,使用git pull后提示出错
具体信息是很多内容出现conflict

 

由于最近的一次patch操作发布有点问题,导致版本有回退
所以在git pull报错的时候可以通过如下步骤解决:
git reset --hard HEAD^
git pull

 

73,android 4.0 v1.0版本,摄像头录像时会退出

提示相关的打印信息是:


D/SurfaceView(  637): pckname = com.android.camera
D/CameraHardware(   87): new_preview_format : yuv420sp
D/CameraHardware(   87): new_picture_format : jpeg
D/dalvikvm(  637): GC_CONCURRENT freed 142K, 6% free 7531K/8007K, paused 2ms+2ms

D/dalvikvm(  637): GC_FOR_ALLOC freed 32K, 7% free 7652K/8199K, paused 20ms
I/dalvikvm-heap(  637): Grow heap (frag case) to 7.962MB for 331516-byte allocat
ion
D/dalvikvm(  637): GC_FOR_ALLOC freed <1K, 8% free 7976K/8583K, paused 20ms
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
E/MediaProfiles(  637): The given camcorder profile camera 0 quality 1001 is not
 found
W/dalvikvm(  637): threadid=13: thread exiting with uncaught exception (group=0x
409da1f8)
E/AndroidRuntime(  637): FATAL EXCEPTION: Thread-70
E/AndroidRuntime(  637): java.lang.RuntimeException: Error retrieving camcorder
profile params

 

主要是在media_profiles.xml文件中,从android4.0 v1.0开始,添加了timelapse功能,比如之前有一段是这样配置的:

<EncoderProfile quality="high" fileFormat="mp4" duration="60">
            <Video codec="h264"
                   bitRate="1000000"
                   width="640"
                   height="480"
                   frameRate="30" />

            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="44100"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="low" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="300000"
                   width="320"
                   height="240"
                   frameRate="30" />

            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />

        </EncoderProfile>


没有配置timelapse功能,所以在v1.0版本上开始录像时会报上面的错误,导致摄像头程序退出。在上面那一段下面添加下面一段就可以解决该问题了:

<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="1000000"
                   width="640"
                   height="480"
                   frameRate="30" />

            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="44100"
                   channels="1" />
        </EncoderProfile>
 
 <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="300000"
                   width="320"
                   height="240"
                   frameRate="30" />

            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />

        </EncoderProfile>

 

74,如何在4.0系统上配置卡的uart输出

修改device下的对应平台目录的pactage.sh,修改如下
---    ./pack -c sun4i -p crane -b evb-v13
+++ ./pack -c sun4i -p crane -b evb-v13 -d card0

 

75,v1.0版本提示init:no such service "wpa_supplicant"

升级v1.0后,wifi不可用,提示:
init:no such service "wpa_supplicant"

 

因为v1.0中讲原来在crane-common的init.rc中的wifi服务移动到各平台
的init.sun4i.rc,因此需要在平台的rc中添加wifi服务:
# wifi related service
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 \
    -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin    class main
    socket wpa_wlan0 dgram 660 wifi wifi
    group system wifi inet
    disabled
    oneshot

 

76,android 4.0升级到v1.0 蓝牙不能用

看打印信息,提示权限问题,但是,在init.sun4i.rc里面又有设置权限

 在init.sun4i.rc中,由于更新到v1.0版本,在设置bluetooth相关权限之前,添加了这一段:
# wifi related service
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 \
 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
 class main
    socket wpa_wlan0 dgram 660 wifi wifi
    group system wifi inet
    disabled
    oneshot

所以导致bluetooth的权限设置不成功。把这段放到设置权限的后面,即可解决该问题。

 

 

 

77,android4.0摄像头界面,点设置会退出

客户板子上只有一摄像头,但是在camera.cfg文件里面配置成了两个,改成一个摄像头的配置就好了

 

78,Music与Gallery菜单不识别U盘文件

放在U盘里面的文件,在music等应用中看不到

主要因为目前不是默认扫描U盘等USB host设备所致。
若要设置默认扫描,则可以进行如下修改:
frameworks\base\packages\settingsprovider\res\values\Defaults.xml内的
“def_is_scan_usb_host”变量的值由“false”改成“true”。

 

79,为什么背光调节调到最亮变黑了?

a10+android4.0 系统:

 pwm那里有点问题.调整pwm时发现调到最高,应该是输出高电平,但是现在却直接变低电平了.

这是因为客户那边屏的datasheet不对,导致屏的参数设置不对。
刚开始是:
lcd_pwm_freq             = 14200

后来改为:
lcd_pwm_freq             = 210000

之后问题就不存在了。

 

80,usb_drv_vbus_gpio可以从PH3 改为 PH2吗?

 在layout一个新板时用到USB2, evb上是:
usb_drv_vbus_gpio        = port:PH3<1><0><default><0>

可以改为PH2吗?目前PH2没别的功能用的

可以,只要PH2没有被占用。

 

81,如何让超清播放器中的缩略图保持原始宽高比

现在的缩略图会被拉伸

 

修改packages/apps/Gallery2/src/com/android/gallery3d/data/UriImage.java文件约210行处

 if (mType == MediaItem.TYPE_MICROTHUMBNAIL) {
                bitmap = BitmapUtils.resizeDownAndCropCenter(bitmap,
                        targetSize, true);
            } else {
                bitmap = BitmapUtils.resizeDownBySideLength(bitmap,
                        targetSize, true);
            }

改为
 if (false) {
                bitmap = BitmapUtils.resizeDownAndCropCenter(bitmap,
                        targetSize, true);
            } else {
                bitmap = BitmapUtils.resizeDownBySideLength(bitmap,
                        targetSize, true);
            }



修改packages/apps/Gallery2/src/com/android/gallery3d/data/ImageCacheRequest.java文件约70行

if (mType == MediaItem.TYPE_MICROTHUMBNAIL) {
                bitmap = BitmapUtils.resizeDownAndCropCenter(bitmap,
                        mTargetSize, true);
            } else {
                bitmap = BitmapUtils.resizeDownBySideLength(bitmap,
                        mTargetSize, true);
            }
改为

if (false) {
                bitmap = BitmapUtils.resizeDownAndCropCenter(bitmap,
                        mTargetSize, true);
            } else {
                bitmap = BitmapUtils.resizeDownBySideLength(bitmap,
                        mTargetSize, true);
            }

 

82,android2.3的2.0.5版本出现开机花屏问题

该问题确认为发布时文件修改导致,造成lcd0_ch0的时钟无法设置,只能采用boot的设置值
因此某些屏上就出现了花屏现象,后续版本或补丁会修复此事

 

83,系统在关机后一定时间内自动启动

目前支持RTC唤醒系统的功能,但这一部分官方发布的linux内核还存在bug,导致在关机时RTC唤醒了系统,从而重启;

现在提供一个临时的解决方法,禁掉RTC中断功能,彻底的解法还在处理中;

临时解决方法的弊端:闹钟功能无法正常使用,无论是开机状态、待机状态等等;

更新rtc-sun4i.c文件(留意前面有‘+’号的更新):
diff --git a/drivers/rtc/rtc-sun4i.c b/drivers/rtc/rtc-sun4i.c
index 4ee00e9..85b46e3 100755
--- a/drivers/rtc/rtc-sun4i.c
+++ b/drivers/rtc/rtc-sun4i.c
@@ -112,6 +112,7 @@ static void __iomem *sunxi_rtc_base;
 static int sunxi_rtc_alarmno = NO_IRQ;
 static int losc_err_flag   = 0;
 
+#ifdef F23_ALARM
 /* IRQ Handlers, irq no. is shared with timer2 */
 static irqreturn_t sunxi_rtc_alarmirq(int irq, void *id)
 {
@@ -159,6 +160,7 @@ static void sunxi_rtc_setaie(int to)
                break;
        }      
 }
+#endif
 
 /* Time read/write */
 static int sunxi_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm)
@@ -403,6 +405,7 @@ static int sunxi_rtc_settime(struct device *dev, struct rtc_time *tm)
        return 0;
 }
 
+#ifdef F23_ALARM
 static int sunxi_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm)
 {
        struct rtc_time *alm_tm = &alrm->time;
@@ -527,6 +530,7 @@ static int sunxi_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
 
        return 0;
 }
+#endif
 
 static int sunxi_rtc_open(struct device *dev)
 {             
@@ -544,18 +548,26 @@ static const struct rtc_class_ops sunxi_rtcops = {
        .release                        = sunxi_rtc_release,
        .read_time                      = sunxi_rtc_gettime,
        .set_time                       = sunxi_rtc_settime,
+#ifdef F23_ALARM
        .read_alarm                     = sunxi_rtc_getalarm,
        .set_alarm                      = sunxi_rtc_setalarm,
+#endif
 };
 
 static int __devexit sunxi_rtc_remove(struct platform_device *pdev)
 {
-       struct rtc_device *rtc = platform_get_drvdata(pdev);   
+       struct rtc_device *rtc = platform_get_drvdata(pdev);  
+
+#ifdef F23_ALARM
     free_irq(sunxi_rtc_alarmno, rtc);
+#endif
+
     rtc_device_unregister(rtc);
        platform_set_drvdata(pdev, NULL);
-      
+
+#ifdef F23_ALARM      
        sunxi_rtc_setaie(0);
+#endif
 
        return 0;
 }
@@ -621,6 +633,8 @@ static int __devinit sunxi_rtc_probe(struct platform_device *pdev)
                ret = PTR_ERR(rtc);
                goto err_out;
        }
+
+#ifdef F23_ALARM
        ret = request_irq(sunxi_rtc_alarmno, sunxi_rtc_alarmirq,
                          IRQF_DISABLED,  "sunxi-rtc alarm", rtc);
        if (ret) {
@@ -628,10 +642,20 @@ static int __devinit sunxi_rtc_probe(struct platform_device *pdev)
                rtc_device_unregister(rtc);
                return ret;
        }
+#endif
 
        sw_rtc_dev = rtc;
-       platform_set_drvdata(pdev, rtc);//<C9><E8><D6><C3>rtc<BD>?<CA><FD><BE><DD>?pdev<B5><C4>?<D3><D0><CA><FD><BE><DD>
+       platform_set_drvdata(pdev, rtc);
       
+       /*clear the alarm count value!!!*/
+       writel(0x00000000, sunxi_rtc_base + SUNXI_RTC_ALARM_DD_HH_MM_SS_REG);
+       /*clear the alarm irq when init*/                              
+    writel(0x00000000, sunxi_rtc_base + SUNXI_ALARM_EN_REG);//0x114
+    /*clear the alarm irq*/
+    writel(0x00000000, sunxi_rtc_base + SUNXI_ALARM_INT_CTRL_REG);//0x118
+    /*Clear pending count alarm*/
+       writel(0x00000003, sunxi_rtc_base + SUNXI_ALARM_INT_STATUS_REG);//0x11c
+                              
        return 0;
       
        err_out:
@@ -696,3 +720,4 @@ MODULE_DESCRIPTION("Sochip sunxi RTC Driver");
 MODULE_AUTHOR("ben");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:sunxi-rtc");

 

在C版A10软件上替换附件中的同名文件,否则会出现关机自动重启问题

    Android2.3替换lichee\linux-2.6.36\drivers\rtc\sun4i下的rtc-sw.c

Android4.0替换lichee\linux-3.0\drivers\rtc下的rtc-sun4i.c

 

84,如何修改:设置--显示--重力感应坐标系?

 问一下,现在客户要求设置--显示--重力感应坐标系-- 里面,默认选择的是“默认坐标系”,而不是“特殊坐标系”,要改哪里?

修改位置:
android4.0:
framework/base/packages/settingprovider/res/values/default.xml
<!-- Default for Accelerometer coordinate -->
    <string name="def_accelerometer_coordinate">default</string>

android2.3.4:
android2.3.4\device\softwinner\crane-common\overlay\frameworks\base\packages\SettingsProvider\res\values\default.xml

 

85,a10 NAND支持列表中:使用前请联系原厂更新固件,什么意思?

由于支持列表不断在更新,且以最新软件为准
如果固件不够新则可能没法支持所有列表中的型号

 

86,android2.3.4有mkfs.sh,android4.0.3对应文件在哪?

 2.3.4的时候,有个mkfs.sh可以确定copy哪个驱动到系统里面,4.0.3好像没看到这个文件,是在哪里copy的?

 

 4.0是用extract-bsp来做拷贝工作的, 见脚本

\device\softwinner\common\vendorsetup.sh
cp -rf $LINUXOUT_MODULE_DIR modules/modules

会拷贝这目录下所有的文件:
\lichee\out\android\lib\modules\3.0.8+

如果想新添加一个驱动,就可以把驱动放进上面目录

 

87,低电充电时,触摸屏容易误点或跳点

不充电时也会有,但充电时更明显

 

主要因触摸屏被干扰导致,充电时更明显是因为充电源的干扰相对较大。
此问题主要从两个方面解决:
1

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

转载:全志问题解决方法 的相关文章

  • pixhawk2飞控接头型号

    BM04B GHS TBT BM05B GHS TBT BM06B GHS TBT
  • 多种视觉SLAM方案对比

    点击上方 小白学视觉 xff0c 选择加 34 星标 34 或 置顶 重磅干货 xff0c 第一时间送达 本文转自 新机器视觉 在SLAM研究中 xff0c 我们通常需要在各数据集上测试各个方案的性能情况 如下主要对表1中6个视觉SLAM方
  • 激光雷达核心技术及行业格局梳理

    点击上方 小白学视觉 xff0c 选择加 34 星标 34 或 置顶 重磅干货 xff0c 第一时间送达 引言 xff1a 车载摄像头是ADAS 的核心传感器 车载摄像头搭载颗数稳步提升 根据 Yole 数据 xff0c 2018 年全球平
  • 2 ROS1通讯编程基础(2)

    2 ROS1通讯编程基础 2 3 配置文件的解读2 3 1 CMakeList txt解读2 3 1 1 find package的配置2 3 1 2 messages services and actions的配置2 3 1 3 动态重配
  • Rviz 使用Arbotix控制机器人运动

    需求 控制机器人模型在 rviz 中做圆周运动 实现流程 安装 Arbotix创建新功能包 xff0c 准备机器人 urdf xacro 文件添加 Arbotix 配置文件编写 launch 文件配置 Arbotix启动 launch 文件
  • VINS问题整理

    VINS的初始化过程 xff1f 首先进行纯视觉SfM xff1a 把滑窗填满 xff0c 然后选择枢纽帧 xff08 和最后一帧有足够的视野重叠保证计算的位姿精度 xff0c 并且和最后一帧有足够的视差保证三角化地图点的精度 xff09
  • 两台ubuntu电脑如何搭建局域网以及通信

    两台ubuntu电脑如何搭建局域网以及通信 功能 xff1a 用自己的电脑代替设备中的电脑进行数据处理 xff0c 以及将最后的结果传给设备电脑 需要做的内容的 xff1a 首先用网线将自己的pc与设备连接起来 1 将自己的笔记本ip地址手
  • PC偏振控制器、锁模激光器技术、AOM声光调制器、相位噪声、锁相环、光耦合器类型

    1 PC 偏振控制器 xff08 1 xff09 什么叫做偏振光 xff1f polarized light 光是一种电磁波 xff0c 电磁波是横波 xff0c 它具有偏振性 xff0c 具有偏振性的光则称为偏振光 具体体现 xff1a
  • 小梅哥——38译码器

    三八译码器 xff0c 即是 3 种输入状态翻译成 8 种输出状态 真值表 代码展示 module decoder 3 8 a b c out input a 输入端口a input b 输入端口b input c 输入端口c output
  • 基本RS触发器(SR锁存器)

    一 前言 SR锁存器 Set Reset Latch 是静态存储单元当中最基本 xff0c 也是电路结构最简单的一种 xff0c 通常由两个或非门或者与非门组成 其中S表示Set xff0c R表示Reset 则S D称为置位端或置1输入端
  • 01-RTOS

    对于裸机而言 xff0c 对于RTOS而言 即 xff1a 对于裸机 xff0c 打游戏意味着不能回消息 回消息意味着不能打游戏 对于RTOS 打游戏和裸机的切换只需要一个时间片节拍 1ms 从宏观来看 就是同时进行的两件事 xff08 但
  • uORB笔记

    不同的类调用同一函数orb subscribe ORB ID vehicle gps position xff0c 来订阅GPS信息是 xff0c 该函数返回的值不同 xff0c 也就是说每个订阅者针对同一主题 xff0c 在调用函数orb
  • STM32 SystemInit()函数学习总结

    拿到程序后如何看系统时钟 xff1f User文件夹 system stm32f4xx程序 xff0c 先找systemcoreclock 系统时钟 xff09 但是这里这么多个系统时钟应该如何选择 点击魔法棒 xff0c 然后点击C C
  • FPGA IP核之PLL四种输出模式的理解

    一 源同步模式 使得进入管脚时的数据和上升沿的相位关系与到达芯片内部第一级寄存器时数据和上升沿的相位关系保持不变 xff08 通过调整内部的布局布线延时做到的 xff0c 用于数据接口 xff0c 特别是高速的情况下 xff09 详细理解
  • FPGA_边沿监测理解

    一 简易频率计设计中为什么一定要获取下降沿 gate a 实际闸门信号 gate a stand 将实际闸门信号打一拍之后的信号 gate a fall s 下降沿标志信号 cnt clk stand Y值 xff0c 即在实际闸门信号下
  • HAL库 STM32 串口通信

    一 实验条件 将STM32的PA9复用为串口1的TX xff0c PA10复用为串口1的RX STM32芯片的输出TX和接收RX与CH340的接收RX和发送TX相连 xff08 收发交叉且PCB上默认没有相连 xff0c 所以需要用P3跳线
  • 全局变量和局部变量

    一 C语言由四种地方可以定义变量 在函数外部定义的是全局变量 xff08 这里的函数包括main函数 xff09 在头文件中定义的是全局变量 在函数或语句块内部定义的是局部变量 函数的参数是该函数的局部变量 全局变量 xff0c 在定义位置
  • 单片机中断

    蓝桥杯单片机之中断 1 中断含义及过程 中断是指CPU在处理A事情时 xff0c 发现B请求CPU立刻去处理 xff08 中断发生 xff09 xff0c 于是CPU去处理B xff08 中断服务 xff09 xff0c 处理完B后又再次回
  • AprilTag的使用、相关问题及解决方法

    使用棋盘格标定相机 安装标定功能包 span class token function sudo span span class token function apt get span span class token function i
  • 对接海康综合安防管理平台经验总结

    前言 xff1a 因业务需要对接海康威视的综合安防管理平台获得下属所管理的摄像头 xff0c 根据摄像头code获得监控视频流信息 1 详情可以浏览海康开放平台 xff0c 在官网上有对应的接入指南以及开放的API接口 前提是本地已部署了海

随机推荐

  • 【环境配置】Visual Studio opencv配置

    需求 在Visual Studio环境中编写C 43 43 代码 xff0c 同时可以调用OpenCV的相关代码 1 安装OpenCV 访问 opencv 官网下载对应平台的库文件 注意 xff1a Visual Studio和OpenCV
  • MySQL常见用法

    文章目录 一 时间类1 1 DATE SUB 函数1 2 NOW CURDATE CURTIME DATE 函数1 3 实战 二 统计类三 字符类3 1 LOCATE 函数3 2 concat 函数3 3 concat ws 函数3 4 g
  • 牢记公式,ardupilot EKF2就是纸老虎(四)!

    版权声明 xff1a 本文为博主原创文章 xff0c 转载请附上博文链接 xff01 四 一睹EKF2芳容 因为篇幅过长 xff0c 写的一些公式会乱码 xff0c 没办法只能把 牢记公式 xff0c ardupilot EKF2就是纸老虎
  • Java Optional使用

    文章目录 Optional一 Optional 简介二 创建 Optional 实例2 1 empty 方法2 2 of 方法2 3 ofNullable 方法 三 Optional的使用3 1 访问 Optional 对象的值3 1 1
  • 正则表达式:基础详解以及在Java中的使用

    文章目录 一 正则表达式1 1 正则表达式中的特殊字符1 2 正则表达式所支持的合法字符1 3 方括号表达式1 4 边界匹配符1 5 三种模式的数量表示符 二 应用2 1 String 类2 2 Pattern 类和 Matcher 类 一
  • Python学习:关键字global和nonlocal的用法说明

    一 global global关键字用来在函数或其他局部作用域中使用全局变量 1 1 如果局部要对全局变量修改 xff0c 而不使用global关键字 count 61 0 def global test count 43 61 1 pri
  • Python:flask框架下前后端的数据交互

    文章目录 前提 一 前端发送数据 xff0c 后端接受数据1 1 路由传参数 数据 1 2 表单提交 二 后端发送数据 xff0c 前端接受数据 前提 后端 xff1a python 的 flask 框架 前端 xff1a html css
  • Python关于None的报错:'NoneType' object is not iterable和cannot unpack non-iterable NoneType object

    文章目录 一 TypeError 39 NoneType 39 object is not iterable xff08 类型错误 xff1a 39 NoneType 39 对象不是可迭代的 xff09 二 TypeError cannot
  • Git:合并分支----git merge命令应用的三种情景

    文章目录 一 git merge 命令应用的三种情景1 1 快进 无冲突 1 2 非 快进 xff0c 修改不同文件 无冲突 1 3 非 快进 xff0c 修改相同文件 有冲突 一 git merge 命令应用的三种情景 1 1 快进 无冲
  • Git:远程分支----git fetch命令的使用

    git fetch 命令的使用 从远程主机克隆 Git 的 clone 命令会为你自动将远程主机命名为 origin xff0c 拉取它的所有数据 xff0c 创建一个指向它的 master 分支的指针 xff0c 并且在本地将其命名为 o
  • Git:移除文件----git rm命令的使用

    文章目录 一 git rm 命令使用1 1 rm 命令1 2 git rm 命令1 3 git rm f 命令1 4 git rm cached 命令 一 git rm 命令使用 Git 本地数据管理 xff0c 大概可以分为三个区 xff
  • 【OpenMv小车】OpenMv追小球的小车之pid调用

    pid py gt gt https github com wagnerc4 flight controller blob master pid py openmv 官网 xff1a http book openmv cc project
  • 【深入理解C++】函数模板作为成员函数

    文章目录 1 普通类的成员函数模板2 类模板的成员函数模板 1 普通类的成员函数模板 不管是普通类还是类模板 xff0c 它们的成员函数都可以是函数模板 xff0c 称为成员函数模板 xff0c 但不可以是虚函数 xff0c 否则编译器报错
  • QGroundControl开发之使用自定义mavlink

    工具 对QGC进行二次开发时 xff0c 常常会遇到想使用自定义mavlink的情况 xff0c 但不像APM那样编译命令会根据xml文件自动生成mavlink协议 QGC似乎不能自动生成mavlink协议 xff08 之前试过似乎不能自动
  • 字符串连接 (c语言)

    题目描述 将给定的字符串连接起来 书中的算法描述如下 xff1a 图 xff1a 字符串连接算法 输入描述 三对字符串 xff0c 每对字符串占一行 xff0c 用空格隔开 每个字符串只包含数字和英文字母大小写且长度不超过100 输出描述
  • STM32—UART中断收发 Day4

    软件 xff1a STM32CubeMX xff0c MDK ARM 硬件 xff1a 蓝桥杯物联网Lora开发板 xff0c 板载芯片STM32L071 一 STM32CubeMX配置 1 先在连接 xff08 Connectivity
  • 虚拟机出现command XXX is available in /bin/ls问题

    问题 xff1a 使用本地的shell命令时候 The command could not be located because 39 usr bin bin 39 is not included in the PATH environme
  • 全志lichee的pack命令

    全志lichee目录打包命令流程 pack 将打包命令传进去build sh脚本里面 查看buildsh里面的脚本命令 其实里面的脚本还是较为简单地的 xff0c 仅仅是作为一个过渡 xff0c 然后就跑进去buildroot script
  • Linux_kernel驱动之GPIO子系统

    前言 xff1a gpio子系统的内容在drivers gpio文件夹下 xff0c 主要文件有 xff1a devres c xff1a devres c是针对gpio api增加的devres机制的支持gpiolib c xff1a g
  • 转载:全志问题解决方法

    版权声明 xff1a 本文为博主原创文章 xff0c 遵循 CC 4 0 BY SA 版权协议 xff0c 转载请附上原文出处链接和本声明 本文链接 xff1a https blog csdn net yanzheng1113 articl