2014年3月24日 星期一

[程式] Ubuntu Environment Setup & Flash Image Notes

  • Network
    a. Download igb-5.0.6.tar.gz from Asus Webstorage & Unzip it
    b. Install & Update
        $ cd igb-5.06/src/
        $ sudo make install
        $ sudo modprobe igb
    c. Proxy (Optional)
        In "Network proxy"
            Manual proxy configuration
            Same proxy for all protocols
            Http proxy: oa-proxy.local port:80
        Configuration for apt-get update or "Update Manager"
            $ gksudo gedit /etc/apt/apt.conf
            Add Acquire::http::proxy "http://<host name>\<user name>:<password>@oa-proxy.local:80";

  • JDK
    Download jdk-6u45-linux-x64.bin file from Asus Webstorage &
    Follow the steps in the reference links showed below.
    REF:
    http://doc.athento.com/xwiki/bin/view/Athento+Platform.Installation+Guide/How+to+install+and+configure+Oracle+JDK#.Uy_XuknyUY9
    https://sites.google.com/site/stevenattw/linux/installjava

  • $PATH
    Follow the steps in the reference link showed below.
    ATTENTION: 某些方法所設定的$PATH 並不適用於 sudo/root
    REF:
    http://rritw.com/a/caozuoxitong/Linux/20110907/127313.html

  • Git
    Error: "fatal: git 1.7.2 or later required"
    Follow the steps in the reference link showed below.
    REF:
    http://colinchu.pixnet.net/blog/post/96105218-git-%E7%89%88%E6%9C%AC%E5%A4%AA%E8%88%8A

  • Make
    $ source build/envsetup.sh
    $ lunch
        ... choose aosp-grouper-userdebug
    $ make -j16
        (# after j represent how many threads used)

  • Make & Push .apk
    • Get "LOCAL_PACKAGE_NAME"
      於該 app 資料夾下 ex. <branch name>/packages/apps/<app name>
      $ cat Android.mk
          ... check "LOCAL_PACKAGE_NAME"
    • Make to get .apk
      回到該 branch 資料夾
      $ source build/envsetup.sh
      $ lunch
          ... choose aosp-grouper-userdebug
      $ make <LOCAL_PACKAGE_NAME> -j16
    • Connect device & Use adb to confirm the connection
      $ adb devices
      (if fails, check the steps showed on the bottom of this page)
    • Push .apk to device
      $ cd out/target/product/grouper/system/app
      $ adb push <LOCAL_PACKAGE_NAME>.apk /system/app
      (if fails, check the steps showed on the bottom of this page)

  • Others
    • When copy & paste the content of document, make sure 全形/半形
    • While fails to update, assure log-in status by linking a page with browser
    • Do not use sudo to make
    • Try "make clean" and then make again while failing making

  • Error
    • [ E ]
      When "sudo apt-get update" or click "check" in Update Manager, Error:
      "W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY <16 chars>"
      [ S ]
      $ gpg --keyserver keyserver.ubuntu.com --recv <last 8 chars>
      $ gpg --export --armor <last 8 chars> | sudo apt-key add -

      REF:
      http://stream-recorder.com/forum/w-gpg-error-http-ppa-launchpad-net-t6741.html?s=c1d13012227123577761fefdae59df9f&amp;

    • [ E ]
      During "repo init ssh://<server name>/ ... /manifest.git -b <branch name>"
      being asked for <user name>@<server name>'s password
      or get "Permission denied (publickey)"
      [ S ]
      o. Check whether have the access right => if not, contact the people in charge of the server/branch
      o. Make sure the names of "the server in the command" and of "the server REPO URL defined in" are included in ~/.ssh/config
      o. Try Kyle_Tsai instead of kyle_tsai

    • [ E ]
      During make, Error:
      Traceback (most recent call last):
        File "../../base/android/jni_generator/jni_generator.py", line 1065, in <module>
          sys.exit(main(sys.argv))
        File "../../base/android/jni_generator/jni_generator.py", line 1061, in main
          options.optimize_generation)
        File "../../base/android/jni_generator/jni_generator.py", line 996, in GenerateJNIHeader
          jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, namespace)
        File "../../base/android/jni_generator/jni_generator.py", line 507, in CreateFromClass
          stderr=subprocess.PIPE)
        File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
          errread, errwrite)
        File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
          raise child_exception
      OSError: [Errno 2] No such file or directory
      make: *** [out/target/product/grouper/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Error 1
      [ S ]
      $ sudo update-alternatives --install "/usr/bin/javap" "javap" "/usr/lib/jdk/jdk1.6.0_45/bin/javp" 1

      REF:
      https://groups.google.com/forum/#!topic/android-building/HOTDDDsXLmM
      http://www.codinginahurry.com/2010/12/29/how-to-setup-up-a-new-jdk-with-update-alternatives/

    • [ E ]
      After push <LAUNCHER>.apk, launcher fails on devices
      [ S ]
      Check whether these is <LAUNCHER>.odex and remove it if it exists because it would make the action push failure.

    • [ E ]
      When "sudo apt-get install ", get error message
      The following packages have unmet dependencies:
      git : Depends: git-man (> 1:1.X.X.X) but it is not going to be installed
      E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
      [ S ]
      $ sudo apt-get -f install
      $ sudo apt-get autoremove

    • [ E ]
      When "make clean", get error message
      ... *** BUILD_FINGERPRINT cannot contain spaces: "... on ARM ...".  Stop.
      [ S ]
      $ source <filename>
      $ lunch

沒有留言:

張貼留言