0

I'm looking to build CyanogenMod ROMs for android, I've followed a tutorial to setup the build environment.

This is the tutorial I followed: http://wiki.cyanogenmod.org/w/Build_for_i9305#Prepare_the_device-specific_code

The only question I have is, instead of executing: cd ~/android/system source build/envsetup.sh

Every time I want to build the ROM, is there a way to run it on boot? I tried to create a script to do it for me and run it in the startup applications but I couldn't get it to work.

#!/bin/bash
cd ~/android/system/
source build/envsetup.sh

It throws this error:

kane@androidvm ~ $ sudo sh ~/android/system/build/envsetup.sh /home/kane/android/system/build/envsetup.sh: 1: /home/kane/android/system/build/envsetup.sh: Syntax error: "(" unexpected

What am I doing wrong?

4

1 回答 1

0

您可以尝试在 ~/.bashrc 中添加您的代码。我认为你总是需要启动一个终端来完成你的工作。然后它将在终端打开时执行。

于 2013-05-04T16:48:25.807 回答