java - Android building using build.sh script -


i need building android using build.sh script. on our build.sh there command looks this:

let's assume appname = "com.newbuild.configuration".

parm1="s/package=\"com.default.packagename\"/package=\""$appname"\"/g" find ../../ -name \androidmanifest.xml -exec sed -i $parm1 {} \; 

correct me if i'm wrong, command means on should find androidmanifest.xml should replace package="com.default.packagename" package="com.newbuild.configuration".

now problem is, have permission (for gcm) , need change package name permission. how can achieve using script? or need create parm this?

from one:

<permission     android:name="com.default.packagename.permission.c2d_message"     android:protectionlevel="signature" /> <uses-permission     android:name="com.default.packagename.permission.c2d_message" /> 

to this:

<permission     android:name="com.newbuild.configuration.permission.c2d_message"     android:protectionlevel="signature" /> <uses-permission     android:name="com.newbuild.configuration.permission.c2d_message" /> 

thanks!

got it:

i added parm modify 2 permissions:

parm2="s/android:name=\"com.default.packagename.permission.c2d_message\"/android:name=\""$appname".permission.c2d_message\"/g" find ../../ -name \androidmanifest.xml -exec sed -i $parm2 {} \; 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -