`
sillycat
  • 浏览: 2540029 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

GCM(5)Working with MAVEN and Android OS Upgrade 2.3.7

 
阅读更多

GCM(5)Working with MAVEN and Android OS Upgrade 2.3.7

The latest GCM API is working fine with Android Studio and gradle. I love it. But I still need to figure out how to working and build with my old maven.

First of all, I met this Error Message
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.4.0:generate-sources (default-generate-sources) on project Localpoint_Android_SDK: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.4.0:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1]

Solution:
>sudo ln -s /opt/android-sdk/build-tools/19.0.1/aapt /opt/android-sdk/platform-tools/aapt
>sudo ln -s /opt/android-sdk/build-tools/19.0.1/lib /opt/android-sdk/platform-tools/lib
>sudo ln -s /opt/android-sdk/build-tools/19.0.1/aidl /opt/android-sdk/platform-tools/aidl

Then I can use command as follow:
>mvn clean assembly:single

Enable Google Play Service
Get the Maven Android SDK Deployer from here https://github.com/mosabua/maven-android-sdk-deployer
>mvn clean install

And configure the android.repo and URL in pom.xml and settings.xml
>mvn deploy 

One more thing, this command should be execute under maven 3.1.1 or above.

Add the Google Play Service in pom.xml as follow
        <dependency>
            <groupId>com.google.android.gms</groupId>
            <artifactId>google-play-services</artifactId>
            <version>13.0.0</version>
            <type>jar</type>
        </dependency> 
        <dependency>
            <groupId>android.support</groupId>
            <artifactId>compatibility-v4</artifactId>
            <version>19.0.0</version>
        </dependency> 

Error Message:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

Solution:
Delete the android-support-v4.jar under lib directory.

Error Message:
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

Solution:
/opt/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values
Check the value from this file version.xml

I add this in the AndroidManifest.xml file as follow:
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="4030500" />

But at last I found even I delete these lines, the error message did not show up anymore. 

2. Building environment
Gradle eclipse plugin
http://www.gradle.org/docs/current/userguide/eclipse_plugin.html

Since I am using STS, I can easily install the gradle plugin there.

3. Upgrade my old Android OS from 2.2 to 2.3.7
Go and install the HTC Sync Manager
http://www.htc.com/www/software/htc-sync-manager/
Change the connection type of HTC to HTC Sync

Go and find this fine from HTC Android 2.3 (Gingerbread) Upgrade for HTC Desire

But my phone is old HTC G7 desire abrova, it can not find the HTC Sync. So I give other this way, and I will try other method.

Install the OS from ROM
First of all, install the get root software on my MAC system, the tool is getting from here http://www.unrevoked.com/#desire 

Then use command line to disable app2sd
>adb shell
>pm setInstallLocation 0
>reboot

Then, turn off the android device, hold the button ’start’, ‘low volumn’ to start my phone into recover mode.

Choose ‘RECOVERY’ (Use Home button or Power button to select)

Download the right update.zip, and use ADB command to upload it to sdcard
>adb push /Users/carl/data/update.zip /sdcard/update.zip

Choose ‘install zip from sdcard’ (Use Home button or Power button to select)

But sometimes, I got these errors.
Error Message:
assert failed: file_getprop(“/system/build.prop”.”ro.build.fingerprint”) == “google/passion/passion:2.3.4/GRJ22/121341:user/release-keys” || file_getprop(“/system/build.prop”.”ro.build.fingerprint”) == “google/passion/passion:2.3.5/GRK39F/189904:user/release-keys”
E:Error in /sdcard/update.zip
(Status 7)
Installation aborted.

Solution:
This is my configuration file from the /system/build.prop
ro.build.fingerprint=hkcsl_cht/htc_bravo/bravo/bravo:2.2/FRF91/274424:user/release-keys
ro.product.device=bravo

So that means my device is HTC Desire bravo, I get the wrong update.zip file. So I come to this website
http://download.cyanogenmod.org/?device=bravo

I find the version http://mirror.slc.cyanogenmod.org/jenkins/3075/cm-7.2.0.1-bravo.zip

I rename it to update.zip and upload there, try again. Everything went well this time. Just reboot the system to enjoy the new OS.



References:
http://sillycat.iteye.com/blog/1998911

Tips
https://github.com/donnfelker/android-bootstrap/issues/46
http://reviews.cnet.co.uk/mobile-phones/how-to-update-htc-desire-to-android-2-3-gingerbread-50004625/
http://android.958shop.com/detail/35405.html
http://gfans.bryan.tw/2010/09/22/801
http://true-android.blogspot.com/2013/11/update-htc-desire-to-android-237.html

分享到:
评论
1 楼 sillycat 2014-01-10  
Another Customer ROM
http://en.miui.com/download-15.html

相关推荐

    gcm-server-repository, 用于Android推送通知的gcm服务器 Maven 库.zip

    gcm-server-repository, 用于Android推送通知的gcm服务器 Maven 库 用于Google-Cloud-Messaging服务器库的 Maven 存储库这允许使用 Maven 管理Google库。 Android SDK提供的gcm-server.jar,由服务器用来向Android...

    Android推送服务(GCM)

    5. 注销 GCM(Unregistering from GCM):Android 应用注销 GCM 服务。 编写 Android 应用使用 GCM 要使用 GCM 服务,需要在 Android 应用中进行以下操作: 1. 创建清单文件(Creating the Manifest):在 ...

    android gcm

    标题中的“android gcm”指的是Android Google Cloud Messaging(GCM),这是谷歌提供的一项服务,允许开发者向Android设备发送消息,通常用于实现应用的通知推送功能。GCM是云到设备(Cloud-to-Device)的消息传递...

    android-GCM开发代码

    Android GCM(Google Cloud Messaging)是谷歌提供的一种用于在服务器和Android设备之间进行实时消息传递的服务。这个"android-GCM开发代码"压缩包显然包含了实现GCM功能的源代码,而不是预编译的jar包,这意味着你...

    android 推送 GCM

    ### Android 推送 GCM详解 #### 一、概述 Google Cloud Messaging for Android(简称GCM)是一项由Google推出的全新推送服务,旨在替代原有的Cloud to Device Messaging(C2DM)。这项服务为开发者提供了从服务器...

    使用GCM实现Android消息推送

    **使用GCM实现Android消息推送** 谷歌云消息(Google Cloud Messaging,简称GCM)是谷歌为开发者提供的一种跨平台消息推送服务,允许开发者向Android、iOS甚至Web应用发送消息。在Android开发中,GCM是实现后台消息...

    AES GCM_AESGCM解密算法_AES-GCM_GCM_

    AES GCM(Advanced Encryption Standard Galois/Counter Mode)是一种基于AES(高级加密标准)的块密码模式,用于提供数据的保密性和完整性。在GCM模式下,AES不仅用于加密,还用于生成消息认证码(MAC),从而实现...

    Android利用GCM推送消息

    在Android开发中,Google Cloud Messaging(GCM)是Google提供的一种免费的服务,允许开发者通过服务器向Android设备发送消息,实现远程消息推送。本教程将详细讲解如何在Android应用中利用GCM实现消息推送,并结合...

    androidGCM包

    5. **多平台支持**:除了Android,GCM还可以与其他平台如iOS、Chrome和Web应用协同工作。 6. **消息类型**:GCM支持多种消息类型,包括普通消息(数据消息)、通知消息以及-collapse_key用于替换先前消息的功能。 ...

    GCM源码.rar_AES GCM_GCM源码_appropriateaod_gcm加密_加密之GCM

    在Android系统中,Appropriate AoD(Appropriate for On-Device)是针对设备本地存储安全的一种加密方案,GCM模式在其中扮演了重要角色。下面我们将深入探讨AES-GCM的工作原理、特点以及在Android环境中的应用。 ...

    aes-gcm-master_aes的gcm模式加解密_AES-GCM_AESGCM_GCM_

    AES-GCM(Advanced Encryption Standard Galois/Counter Mode)是一种基于AES(高级加密标准)的块密码模式,用于提供数据的保密性和完整性。在网络安全和数据保护领域,它被广泛应用于加密通信、存储加密以及安全...

    Android消息推送之GCM客户端完整实现

    5. **处理消息**:创建一个继承自BroadcastReceiver的类,重写onReceive()方法,用于接收GCM推送的消息。在AndroidManifest.xml中注册这个receiver,并指定intent-filter,包括ACTION_BOOT_COMPLETED以处理设备启动...

    android-gcm-client.7z

    《Android GCM客户端详解》 在移动应用开发领域,Android Google Cloud Messaging(GCM)是Google提供的一项服务,用于在Android设备与服务器之间实现高效、可靠的消息传递。本压缩包"android-gcm-client.7z"包含的...

    AES_GCM_SIV_256_GCM源码_GCM_AES_

    SIV(Synthetic Initialization Vector)则是一个更安全的AEAD(Authenticated Encryption with Associated Data)模式,它能够防止重放攻击,并且对密钥的使用更为安全。 GCM模式结合了CTR(Counter Mode)的高效...

    微星945GCM5_V2主板说明书

    微星945GCM5_v2主板说明书,提供给有需要的童鞋。

    Android代码-FakeGapps

    Used in combinaton with µg GmsCore to enable Google Cloud Messaging (GCM) and much more. This tutorial describes only the installation process to get GCM working. The also available Google Play Store...

    AES GCM算法源码

    **AES GCM 算法源码解析** AES(Advanced Encryption Standard)是高级加密标准,是一种广泛应用的块密码,以其高效、安全著称。GCM(Galois/Counter Mode)是AES的一种加密模式,它提供了数据加密以及消息认证代码...

    aes128加密算法的GCM工作模式详解

    ### AES128加密算法的GCM工作模式详解 #### 引言 本文档主要介绍了一种名为Galois/Counter Mode(GCM)的高级加密标准(AES)的工作模式。GCM是一种高效的、可认证的加密技术,适用于高速硬件加密场景以及软件实现...

Global site tag (gtag.js) - Google Analytics