Imx6q Andriod

(1)解决 repo sync error: Exited sync due to fetch errors

        (a)这个是repo android源码时遇到的问题,如下解决方法亲测可行:

      (b) $ repo sync -f –j10

           -f or --force-broken flag allows it to recover from network error and more important recover on broken/missing objects.

          -jN use N threads。

<------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------>

1.uboot 

(a)  make mx6q_sabresd_android_config

(b)  mx6sabreandroid_common.h        改成:#define CONFIG_ANDROID_MAIN_MMC_BUS 3

(c)  setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=24M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale mem=1024M androidboot.selinux=disabled androidboot.dm_verity=disabled

(d)

2.kernel

(a) cp .config  arch/arm/configs/imx6_android_defconfig

(b)mv  ~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8   ~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6

(c)    set_bit(BTN_TOUCH,input_dev->keybit);
        set_bit(EV_KEY, input_dev->evbit);
        set_bit(EV_ABS, input_dev->evbit);

不设置这些android getenvent 无法正确读出输入事情。

3.安装软件

(a) geany 安装


4.文件系统

(a).su: must be suid to work properly错误

     修改busybox权限,chmod 4755 busybox

(b) mount -t ext4 -o rw,remount  /dev/block/mmcblk3p5  /system

(c) adb push a.txt  /sdcard/

(d) getevent 查看input输入事情

(e)andriod  进入界面,触摸屏识别成为鼠标

(1).  查看 /proc/bus/input/devices  获得触摸屏名字

(2).  mv  /system/usr/idc/HannStar_P1003_Touchscreen.idc   /system/usr/idc/触摸屏名字.idc

修改idc 文件内容如下:

# This is an internal device

device.internal = 1

touch.deviceType = touchScreen
touch.orientationAware = 0
keyboard.layout = qwerty
keyboard.characterMap = qwerty2
cursor.mode = navigation
cursor.orientationAware = 0

(3). chmod 777  /system/usr/idc/触摸屏名字.idc

(4). reboot

(5) 使用https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.14.52_1.1.0_ga/drivers/input/touchscreen/ft5x06_ts.c#L524

      驱动程序

(6)增加BTM_TOUCH 

     参考网站:https://github.com/boundarydevices/linux-imx6/commit/6c26119

(7) 修改 不能触摸屏数量为5,需要屏蔽触摸5个事情

(f) 查看完整android 启动信息

(1) logcat -v time

(g)EXT4-fs error (device mmcblk3p4): htree_dirblock_to_tree:913: inode #389: block 8523: comm Thread-73: bad entry in directory: rec_len is smaller than minimal - offset=0(53248), inode=4278190080, rec_len=0, name_len=0

(1) boot 分区出了问题

(h)快速打包system.img 

    (1) make snod

(j)修改系统时间

(1)#date -s 20110120         //设置本地日期为 2011年01月20号,这样会把具体时间设置成空00:00:00
(2)#date -s 12:23:23         //设置本地时间,不会对日期做更改
(3)#date -s "12:12:23 2011-01-20"   //设置日期和具体时间

(k)修改屏幕分辨率

(1) busybox vi /system/build.prop

(2) setprop ro.sf.lcd_density 480


在device/fsl/sabresd_6dq/init.rc:97:    setprop ro.sf.lcd_density 160 下有设置

(L) androidboot.selinux=disabled androidboot.dm_verity=disabled

setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 \
video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=256M androidboot.console=ttymxc0 \
consoleblank=0 androidboot.hardware=freescale cma=384M androidboot.selinux=disabled androidboot.dm_verity=disabled

5.android studio

(a) Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决

    在gradle.properties 文件里面添加 android.useDeprecatedNdk=true 后重新编译即可

   参考网站:http://blog.csdn.net/u014657752/article/details/48106081

(b)  JNI 使用

    参考网站:http://blog.csdn.net/yanbober/article/details/45309049

    参考网站:http://www.shangxueba.com/jingyan/2901837.html

   区别:在jnitest.c里面加jni.h

(c) 使用Android Studio 查看 android 源码

    参开网站:http://blog.adisonhyh.com/blog/2015/09/01/shi-yong-android-studio-yue-du-android-yuan-ma/

(d) 实现Android Studio JNI开发C/C++使用__android_log_print输出Log。

http://www.android100.org/html/201506/16/154033.html


(e) 使用tcp 传输数据

      http://www.cnblogs.com/devinzhang/archive/2012/10/04/2711763.html


(f) 使用android studio 设置JDK版本

     project->other Settings->Default Project Structure

(g)












  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值