• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [GUIDE] Setting Up your Android Environment

I have partially answered my own question with research. It's brain draining to read all of the Android.mk files and the vendor.sh files and where they lead me.

I still haven't found out how to include pre-built .apks. I'll figure that out later.

If you have prebuilt apks, you can just drop them into a folder in the device tree (device/motorola/triumph); I would recommend using the prebuilt folder in that tree.

then you should be able to add a line in the triumph.mk file in there to copy the apk into the final location in the rom. If it will be going into /system/app, then you probably don't have to to anything else. If you are putting it into /data/app, then you'll probably have to modify the edify script in the releasetools folder in the device tree to copy stuff to /data and set the proper permissions during the flash.
 
If you have prebuilt apks, you can just drop them into a folder in the device tree (device/motorola/triumph); I would recommend using the prebuilt folder in that tree.

then you should be able to add a line in the triumph.mk file in there to copy the apk into the final location in the rom. If it will be going into /system/app, then you probably don't have to to anything else. If you are putting it into /data/app, then you'll probably have to modify the edify script in the releasetools folder in the device tree to copy stuff to /data and set the proper permissions during the flash.

I can do that:D
 
Can believed now my laptop acting dumb can not run the environment ....after was working good can't run anything no permission terminal doesn't recognize files dumping everything installing Ubuntu 11.something now....running windows cmd maybe easy?
 
Omg how embarrassing. I'm already stuck.. what am I doing wrong? I made a new directory for the gingerbread area and ran these:
Code:
leviathan@leviathanubuntu:~$ repo
error: repo is not installed.  Use "repo init" to install it here.
leviathan@leviathanubuntu:~$ mkdir ~/bin
mkdir: cannot create directory `/home/leviathan/bin': File exists
leviathan@leviathanubuntu:~$ PATH=~/bin:$PATH
leviathan@leviathanubuntu:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19933  100 19933    0     0  46025      0 --:--:-- --:--:-- --:--:-- 62096
leviathan@leviathanubuntu:~$ chmod a+x ~/bin/repo
leviathan@leviathanubuntu:~$ cd androidgingerbread
leviathan@leviathanubuntu:~/androidgingerbread$ repo init -u https://github.com/mantera/android.git -b gingerbread
fatal: cannot make .repo directory: Permission denied
leviathan@leviathanubuntu:~/androidgingerbread$
Why am I getting a permission denied?
 
Omg how embarrassing. I'm already stuck.. what am I doing wrong? I made a new directory for the gingerbread area and ran these:
Code:
leviathan@leviathanubuntu:~$ repo
error: repo is not installed.  Use "repo init" to install it here.
leviathan@leviathanubuntu:~$ mkdir ~/bin
mkdir: cannot create directory `/home/leviathan/bin': File exists
leviathan@leviathanubuntu:~$ PATH=~/bin:$PATH
leviathan@leviathanubuntu:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19933  100 19933    0     0  46025      0 --:--:-- --:--:-- --:--:-- 62096
leviathan@leviathanubuntu:~$ chmod a+x ~/bin/repo
leviathan@leviathanubuntu:~$ cd androidgingerbread
leviathan@leviathanubuntu:~/androidgingerbread$ repo init -u https://github.com/mantera/android.git -b gingerbread
fatal: cannot make .repo directory: Permission denied
leviathan@leviathanubuntu:~/androidgingerbread$
Why am I getting a permission denied?

Just a guess use sudo -i first I think u have to have root access to get permission corrrect me if I'm wrong I'm still new myself but I'm learning
 
Omg how embarrassing. I'm already stuck.. what am I doing wrong? I made a new directory for the gingerbread area and ran these:
Code:
leviathan@leviathanubuntu:~$ repo
error: repo is not installed.  Use "repo init" to install it here.
leviathan@leviathanubuntu:~$ mkdir ~/bin
mkdir: cannot create directory `/home/leviathan/bin': File exists
leviathan@leviathanubuntu:~$ PATH=~/bin:$PATH
leviathan@leviathanubuntu:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19933  100 19933    0     0  46025      0 --:--:-- --:--:-- --:--:-- 62096
leviathan@leviathanubuntu:~$ chmod a+x ~/bin/repo
leviathan@leviathanubuntu:~$ cd androidgingerbread
leviathan@leviathanubuntu:~/androidgingerbread$ repo init -u https://github.com/mantera/android.git -b gingerbread
fatal: cannot make .repo directory: Permission denied
leviathan@leviathanubuntu:~/androidgingerbread$
Why am I getting a permission denied?

I would guess that maybe you already have a .repo directory in there that maybe doesn't have the correct permissions?

Since you haven't really started yet, if it were me, I'd just dump all of the directories and start over to make sure that I didn't miss a step. That's what it really sounds like is that you missed a step or did a step out of order.
 
Can believed now my laptop acting dumb can not run the environment ....after was working good can't run anything no permission terminal doesn't recognize files dumping everything installing Ubuntu 11.something now....running windows cmd maybe easy?

You can't build Android in Windows. I wish you could but you can't. You need Linux or Mac.
 
Omg how embarrassing. I'm already stuck.. what am I doing wrong? I made a new directory for the gingerbread area and ran these:
Code:
leviathan@leviathanubuntu:~$ repo
error: repo is not installed.  Use "repo init" to install it here.
leviathan@leviathanubuntu:~$ mkdir ~/bin
mkdir: cannot create directory `/home/leviathan/bin': File exists
leviathan@leviathanubuntu:~$ PATH=~/bin:$PATH
leviathan@leviathanubuntu:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  SpeedSpeed
100 19933  100 19933    0     0  46025      0 --:--:-- --:--:-- --:--:-- 62096
leviathan@leviathanubuntu:~$ chmod a+x ~/bin/repo
leviathan@leviathanubuntu:~$ cd androidgingerbread
leviathan@leviathanubuntu:~/androidgingerbread$ repo init -u https://github.com/mantera/android.git -b gingerbread
fatal: cannot make .repo directory: Permission denied
leviathan@leviathanubuntu:~/androidgingerbread$
Why am I getting a permission denied?

Use
Code:
sudo chown -Rv (user name) (root folder for the build)
The. Capital. R is for recursive, the v is for verbose. If you own the files, then you can do anything with them.
 
Use
Code:
sudo chown -Rv (user name) (root folder for the build)
The. Capital. R is for recursive, the v is for verbose. If you own the files, then you can do anything with them.

Thank you! Okay, I've got my folder named mtriumphcm7 synced up with mantera's gingerbread repo and parts of whyzor's gingerbread repos using g60madman's instructions. Now if I wanted to sync up with cm7 updates, how would I go about doing that?
EDIT: I decided to just replace repo init -u https://github.com/mantera/android.git -b gingerbread
with
repo init -u https://github.com/CyanogenMod/android.git -b gingerbread
then just run repo sync again; does that work? >_<

Also, which folder do I go to to add/remove apps before the ROM is built?
EDIT: Oh is it the folder packages/apps? How do I add apps in here? They aren't in .apk form huh.. man I feel noobish. How do I add apk apps in here? >_<
 
Okay I ran into a problem. I decided to just go with the flow and figure this all out. I did the n00b way and used Android Kitchen. I was finally able to build the ROM but I got this error when installing:

Installing update...
mount() expects 4 args, got 3
E: Error in /sdcard/exupdate.zip
(Status 7)
Installation aborted.

Any ideas? May the problem lie in the updater-script?

EDIT: Here's what my updater-script looks like:

Code:
mount("MTD", "userdata", "/data");
delete("/data/local");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/mmcblk0p7");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[");
symlink("busybox", "/system/xbin/[[");
symlink("busybox", "/system/xbin/arp");
symlink("busybox", "/system/xbin/ash");
symlink("busybox", "/system/xbin/awk");
symlink("busybox", "/system/xbin/base64");
symlink("busybox", "/system/xbin/basename");
symlink("busybox", "/system/xbin/bbconfig");
symlink("busybox", "/system/xbin/blockdev");
symlink("busybox", "/system/xbin/brctl");
symlink("busybox", "/system/xbin/bunzip2");
symlink("busybox", "/system/xbin/bzcat");
symlink("busybox", "/system/xbin/bzip2");
symlink("busybox", "/system/xbin/cal");
symlink("busybox", "/system/xbin/cat");
symlink("busybox", "/system/xbin/catv");
symlink("busybox", "/system/xbin/chattr");
symlink("busybox", "/system/xbin/chgrp");
symlink("busybox", "/system/xbin/chmod");
symlink("busybox", "/system/xbin/chown");
symlink("busybox", "/system/xbin/chroot");
symlink("busybox", "/system/xbin/clear");
symlink("busybox", "/system/xbin/cmp");
symlink("busybox", "/system/xbin/comm");
symlink("busybox", "/system/xbin/cp");
symlink("busybox", "/system/xbin/cpio");
symlink("busybox", "/system/xbin/crond");
symlink("busybox", "/system/xbin/crontab");
symlink("busybox", "/system/xbin/cut");
symlink("busybox", "/system/xbin/date");
symlink("busybox", "/system/xbin/dc");
symlink("busybox", "/system/xbin/dd");
symlink("busybox", "/system/xbin/depmod");
symlink("busybox", "/system/xbin/devmem");
symlink("busybox", "/system/xbin/df");
symlink("busybox", "/system/xbin/diff");
symlink("busybox", "/system/xbin/dirname");
symlink("busybox", "/system/xbin/dmesg");
symlink("busybox", "/system/xbin/dnsd");
symlink("busybox", "/system/xbin/dos2unix");
symlink("busybox", "/system/xbin/du");
symlink("busybox", "/system/xbin/echo");
symlink("busybox", "/system/xbin/ed");
symlink("busybox", "/system/xbin/egrep");
symlink("busybox", "/system/xbin/env");
symlink("busybox", "/system/xbin/expand");
symlink("busybox", "/system/xbin/expr");
symlink("busybox", "/system/xbin/false");
symlink("busybox", "/system/xbin/fdisk");
symlink("busybox", "/system/xbin/fgrep");
symlink("busybox", "/system/xbin/find");
symlink("busybox", "/system/xbin/flash_lock");
symlink("busybox", "/system/xbin/flash_unlock");
symlink("busybox", "/system/xbin/flashcp");
symlink("busybox", "/system/xbin/flock");
symlink("busybox", "/system/xbin/fold");
symlink("busybox", "/system/xbin/free");
symlink("busybox", "/system/xbin/freeramdisk");
symlink("busybox", "/system/xbin/fsync");
symlink("busybox", "/system/xbin/ftpget");
symlink("busybox", "/system/xbin/ftpput");
symlink("busybox", "/system/xbin/fuser");
symlink("busybox", "/system/xbin/getopt");
symlink("busybox", "/system/xbin/grep");
symlink("busybox", "/system/xbin/groups");
symlink("busybox", "/system/xbin/gunzip");
symlink("busybox", "/system/xbin/gzip");
symlink("busybox", "/system/xbin/halt");
symlink("busybox", "/system/xbin/head");
symlink("busybox", "/system/xbin/hexdump");
symlink("busybox", "/system/xbin/id");
symlink("busybox", "/system/xbin/ifconfig");
symlink("busybox", "/system/xbin/insmod");
symlink("busybox", "/system/xbin/install");
symlink("busybox", "/system/xbin/iostat");
symlink("busybox", "/system/xbin/ip");
symlink("busybox", "/system/xbin/kill");
symlink("busybox", "/system/xbin/killall");
symlink("busybox", "/system/xbin/killall5");
symlink("busybox", "/system/xbin/length");
symlink("busybox", "/system/xbin/less");
symlink("busybox", "/system/xbin/ln");
symlink("busybox", "/system/xbin/losetup");
symlink("busybox", "/system/xbin/ls");
symlink("busybox", "/system/xbin/lsattr");
symlink("busybox", "/system/xbin/lsmod");
symlink("busybox", "/system/xbin/lsusb");
symlink("busybox", "/system/xbin/lzcat");
symlink("busybox", "/system/xbin/lzma");
symlink("busybox", "/system/xbin/lzop");
symlink("busybox", "/system/xbin/lzopcat");
symlink("busybox", "/system/xbin/man");
symlink("busybox", "/system/xbin/md5sum");
symlink("busybox", "/system/xbin/mesg");
symlink("busybox", "/system/xbin/mkdir");
symlink("busybox", "/system/xbin/mke2fs");
symlink("busybox", "/system/xbin/mkfifo");
symlink("busybox", "/system/xbin/mkfs.ext2");
symlink("busybox", "/system/xbin/mkfs.vfat");
symlink("busybox", "/system/xbin/mknod");
symlink("busybox", "/system/xbin/mkswap");
symlink("busybox", "/system/xbin/mktemp");
symlink("busybox", "/system/xbin/modinfo");
symlink("busybox", "/system/xbin/modprobe");
symlink("busybox", "/system/xbin/more");
symlink("busybox", "/system/xbin/mount");
symlink("busybox", "/system/xbin/mountpoint");
symlink("busybox", "/system/xbin/mpstat");
symlink("busybox", "/system/xbin/mv");
symlink("busybox", "/system/xbin/nanddump");
symlink("busybox", "/system/xbin/nandwrite");
symlink("busybox", "/system/xbin/netstat");
symlink("busybox", "/system/xbin/nice");
symlink("busybox", "/system/xbin/nohup");
symlink("busybox", "/system/xbin/nslookup");
symlink("busybox", "/system/xbin/ntpd");
symlink("busybox", "/system/xbin/od");
symlink("busybox", "/system/xbin/patch");
symlink("busybox", "/system/xbin/pgrep");
symlink("busybox", "/system/xbin/pidof");
symlink("busybox", "/system/xbin/ping");
symlink("busybox", "/system/xbin/pkill");
symlink("busybox", "/system/xbin/pmap");
symlink("busybox", "/system/xbin/poweroff");
symlink("busybox", "/system/xbin/printenv");
symlink("busybox", "/system/xbin/printf");
symlink("busybox", "/system/xbin/ps");
symlink("busybox", "/system/xbin/pstree");
symlink("busybox", "/system/xbin/pwd");
symlink("busybox", "/system/xbin/pwdx");
symlink("busybox", "/system/xbin/rdev");
symlink("busybox", "/system/xbin/readlink");
symlink("busybox", "/system/xbin/realpath");
symlink("busybox", "/system/xbin/renice");
symlink("busybox", "/system/xbin/reset");
symlink("busybox", "/system/xbin/resize");
symlink("busybox", "/system/xbin/rev");
symlink("busybox", "/system/xbin/rm");
symlink("busybox", "/system/xbin/rmdir");
symlink("busybox", "/system/xbin/rmmod");
symlink("busybox", "/system/xbin/route");
symlink("busybox", "/system/xbin/run-parts");
symlink("busybox", "/system/xbin/rx");
symlink("busybox", "/system/xbin/sed");
symlink("busybox", "/system/xbin/seq");
symlink("busybox", "/system/xbin/setconsole");
symlink("busybox", "/system/xbin/setserial");
symlink("busybox", "/system/xbin/setsid");
symlink("busybox", "/system/xbin/sh");
symlink("busybox", "/system/xbin/sha1sum");
symlink("busybox", "/system/xbin/sha256sum");
symlink("busybox", "/system/xbin/sha512sum");
symlink("busybox", "/system/xbin/sleep");
symlink("busybox", "/system/xbin/sort");
symlink("busybox", "/system/xbin/split");
symlink("busybox", "/system/xbin/stat");
symlink("busybox", "/system/xbin/strings");
symlink("busybox", "/system/xbin/stty");
symlink("busybox", "/system/xbin/sum");
symlink("busybox", "/system/xbin/swapoff");
symlink("busybox", "/system/xbin/swapon");
symlink("busybox", "/system/xbin/sync");
symlink("busybox", "/system/xbin/sysctl");
symlink("busybox", "/system/xbin/tac");
symlink("busybox", "/system/xbin/tail");
symlink("busybox", "/system/xbin/tar");
symlink("busybox", "/system/xbin/tee");
symlink("busybox", "/system/xbin/telnet");
symlink("busybox", "/system/xbin/telnetd");
symlink("busybox", "/system/xbin/test");
symlink("busybox", "/system/xbin/tftp");
symlink("busybox", "/system/xbin/tftpd");
symlink("busybox", "/system/xbin/time");
symlink("busybox", "/system/xbin/timeout");
symlink("busybox", "/system/xbin/top");
symlink("busybox", "/system/xbin/touch");
symlink("busybox", "/system/xbin/tr");
symlink("busybox", "/system/xbin/traceroute");
symlink("busybox", "/system/xbin/true");
symlink("busybox", "/system/xbin/ttysize");
symlink("busybox", "/system/xbin/tune2fs");
symlink("busybox", "/system/xbin/umount");
symlink("busybox", "/system/xbin/uname");
symlink("busybox", "/system/xbin/uncompress");
symlink("busybox", "/system/xbin/unexpand");
symlink("busybox", "/system/xbin/uniq");
symlink("busybox", "/system/xbin/unix2dos");
symlink("busybox", "/system/xbin/unlzma");
symlink("busybox", "/system/xbin/unlzop");
symlink("busybox", "/system/xbin/unxz");
symlink("busybox", "/system/xbin/unzip");
symlink("busybox", "/system/xbin/uptime");
symlink("busybox", "/system/xbin/usleep");
symlink("busybox", "/system/xbin/uudecode");
symlink("busybox", "/system/xbin/uuencode");
symlink("busybox", "/system/xbin/vi");
symlink("busybox", "/system/xbin/watch");
symlink("busybox", "/system/xbin/wc");
symlink("busybox", "/system/xbin/wget");
symlink("busybox", "/system/xbin/which");
symlink("busybox", "/system/xbin/whoami");
symlink("busybox", "/system/xbin/xargs");
symlink("busybox", "/system/xbin/xz");
symlink("busybox", "/system/xbin/xzcat");
symlink("busybox", "/system/xbin/yes");
symlink("busybox", "/system/xbin/zcat");
symlink("iwmulticall", "/system/xbin/iwconfig");
symlink("iwmulticall", "/system/xbin/iwgetid");
symlink("iwmulticall", "/system/xbin/iwlist");
symlink("iwmulticall", "/system/xbin/iwpriv");
symlink("iwmulticall", "/system/xbin/iwspy");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1000, 1003, 02755, "/system/bin/screenshot");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 04755, "/system/bin/bash");
symlink("/system/bin/bash", "/system/bin/sh");
set_perm(0, 0, 0777, "/system/bin/a2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/00banner");
set_perm(0, 0, 0777, "/system/etc/init.d/01sysctl");
set_perm(0, 0, 0777, "/system/etc/init.d/02firstboot");
set_perm(0, 0, 0777, "/system/etc/init.d/04apps2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/99complete");
set_perm(0, 0, 0777, "/system/bin/launcha2sd");
set_perm(0, 0, 0777, "/system/bin/starta2sd");
set_perm(0, 0, 0777, "/system/bin/jita2sd");
set_perm(0, 0, 0777, "/system/bin/chka2sd");
set_perm(0, 0, 0777, "/system/bin/zipalign");
set_perm(0, 0, 0777, "/system/bin/sysinit");
set_perm(0, 0, 0777, "/system/bin/busybox.a2sd");
set_perm(0, 0, 0644, "/system/bin/apps2sd.hlp");
set_perm(0, 0, 0777, "/system/xbin/a2sd");
set_perm(0, 0, 0777, "/system/bin/dtinstall");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/hcitool");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.bt.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.coex.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.fm.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.wifi.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.sdio.sh");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "restore");
package_extract_file("system/bin/modelid_cfg.sh", "/tmp/modelid_cfg.sh");
set_perm(0, 0, 0777, "/tmp/modelid_cfg.sh");
run_program("/tmp/modelid_cfg.sh");
package_extract_file("system/bin/verify_cache_partition_size.sh", "/tmp/verify_cache_partition_size.sh");
set_perm(0, 0, 0777, "/tmp/verify_cache_partition_size.sh");
run_program("/tmp/verify_cache_partition_size.sh");
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/mmcblk0p5");
show_progress(0.100000, 0);
package_extract_file("move_cache_sd", "/tmp/move_cache_sd");
set_perm(0, 0, 0777, "/tmp/move_cache_sd");
run_program("/tmp/move_cache_sd");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
       write_raw_image("/tmp/boot.img", "boot"),
       delete("/tmp/boot.img"));
unmount("/system");
unmount("/data");
 
Thank you! Okay, I've got my folder named mtriumphcm7 synced up with mantera's gingerbread repo and parts of whyzor's gingerbread repos using g60madman's instructions. Now if I wanted to sync up with cm7 updates, how would I go about doing that?
EDIT: I decided to just replace repo init -u https://github.com/mantera/android.git -b gingerbread
with
repo init -u https://github.com/CyanogenMod/android.git -b gingerbread
then just run repo sync again; does that work? >_<

Did you make sure to follow all the steps?
Code:
# mkdir ~/bin
# PATH=~/bin:$PATH
# curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
# chmod a+x ~/bin/repo
# mkdir android
# cd android
# repo init -u https://github.com/mantera/android.git -b gingerbread
# repo sync
Also don't try and mess with repo init -u https://github.com/CyanogenMod/android.git -b gingerbread. It won't work at all. Our phone may never work with default code. All the work Tickerguy & IssacJ did was to fix the code to work with our device. That is why all the repo's are on github for us to use.


Also, which folder do I go to to add/remove apps before the ROM is built?
EDIT: Oh is it the folder packages/apps? How do I add apps in here? They aren't in .apk form huh.. man I feel noobish. How do I add apk apps in here? >_<

If you can find the source code for the app you would place it that folder. If you have just the apk you can do the following

1. Create a folder called apps in device/motorola/triumph/
2. Copy all the apps you have into the apps folder
3. Edit the triumph.mk in device files and create an area like

Code:
# Copying my personal apps into Android OS
PRODUCT_COPY_FILES +=  \
    device/motrola/triumph/apps/app1.apk:system/app/app1.apk \
    device/motrola/triumph/apps/app2.apk:system/app/app2.apk \
    device/motrola/triumph/apps/app3.apk:system/app/app3.apk

make sure to list the actual name of the app and not app1 app2 app3
 
Okay I ran into a problem. I decided to just go with the flow and figure this all out. I did the n00b way and used Android Kitchen. I was finally able to build the ROM but I got this error when installing:

Installing update...
mount() expects 4 args, got 3
E: Error in /sdcard/exupdate.zip
(Status 7)
Installation aborted.

Any ideas? May the problem lie in the updater-script?

EDIT: Here's what my updater-script looks like:

Code:
mount("MTD", "userdata", "/data");
delete("/data/local");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/mmcblk0p7");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[");
symlink("busybox", "/system/xbin/[[");
symlink("busybox", "/system/xbin/arp");
symlink("busybox", "/system/xbin/ash");
symlink("busybox", "/system/xbin/awk");
symlink("busybox", "/system/xbin/base64");
symlink("busybox", "/system/xbin/basename");
symlink("busybox", "/system/xbin/bbconfig");
symlink("busybox", "/system/xbin/blockdev");
symlink("busybox", "/system/xbin/brctl");
symlink("busybox", "/system/xbin/bunzip2");
symlink("busybox", "/system/xbin/bzcat");
symlink("busybox", "/system/xbin/bzip2");
symlink("busybox", "/system/xbin/cal");
symlink("busybox", "/system/xbin/cat");
symlink("busybox", "/system/xbin/catv");
symlink("busybox", "/system/xbin/chattr");
symlink("busybox", "/system/xbin/chgrp");
symlink("busybox", "/system/xbin/chmod");
symlink("busybox", "/system/xbin/chown");
symlink("busybox", "/system/xbin/chroot");
symlink("busybox", "/system/xbin/clear");
symlink("busybox", "/system/xbin/cmp");
symlink("busybox", "/system/xbin/comm");
symlink("busybox", "/system/xbin/cp");
symlink("busybox", "/system/xbin/cpio");
symlink("busybox", "/system/xbin/crond");
symlink("busybox", "/system/xbin/crontab");
symlink("busybox", "/system/xbin/cut");
symlink("busybox", "/system/xbin/date");
symlink("busybox", "/system/xbin/dc");
symlink("busybox", "/system/xbin/dd");
symlink("busybox", "/system/xbin/depmod");
symlink("busybox", "/system/xbin/devmem");
symlink("busybox", "/system/xbin/df");
symlink("busybox", "/system/xbin/diff");
symlink("busybox", "/system/xbin/dirname");
symlink("busybox", "/system/xbin/dmesg");
symlink("busybox", "/system/xbin/dnsd");
symlink("busybox", "/system/xbin/dos2unix");
symlink("busybox", "/system/xbin/du");
symlink("busybox", "/system/xbin/echo");
symlink("busybox", "/system/xbin/ed");
symlink("busybox", "/system/xbin/egrep");
symlink("busybox", "/system/xbin/env");
symlink("busybox", "/system/xbin/expand");
symlink("busybox", "/system/xbin/expr");
symlink("busybox", "/system/xbin/false");
symlink("busybox", "/system/xbin/fdisk");
symlink("busybox", "/system/xbin/fgrep");
symlink("busybox", "/system/xbin/find");
symlink("busybox", "/system/xbin/flash_lock");
symlink("busybox", "/system/xbin/flash_unlock");
symlink("busybox", "/system/xbin/flashcp");
symlink("busybox", "/system/xbin/flock");
symlink("busybox", "/system/xbin/fold");
symlink("busybox", "/system/xbin/free");
symlink("busybox", "/system/xbin/freeramdisk");
symlink("busybox", "/system/xbin/fsync");
symlink("busybox", "/system/xbin/ftpget");
symlink("busybox", "/system/xbin/ftpput");
symlink("busybox", "/system/xbin/fuser");
symlink("busybox", "/system/xbin/getopt");
symlink("busybox", "/system/xbin/grep");
symlink("busybox", "/system/xbin/groups");
symlink("busybox", "/system/xbin/gunzip");
symlink("busybox", "/system/xbin/gzip");
symlink("busybox", "/system/xbin/halt");
symlink("busybox", "/system/xbin/head");
symlink("busybox", "/system/xbin/hexdump");
symlink("busybox", "/system/xbin/id");
symlink("busybox", "/system/xbin/ifconfig");
symlink("busybox", "/system/xbin/insmod");
symlink("busybox", "/system/xbin/install");
symlink("busybox", "/system/xbin/iostat");
symlink("busybox", "/system/xbin/ip");
symlink("busybox", "/system/xbin/kill");
symlink("busybox", "/system/xbin/killall");
symlink("busybox", "/system/xbin/killall5");
symlink("busybox", "/system/xbin/length");
symlink("busybox", "/system/xbin/less");
symlink("busybox", "/system/xbin/ln");
symlink("busybox", "/system/xbin/losetup");
symlink("busybox", "/system/xbin/ls");
symlink("busybox", "/system/xbin/lsattr");
symlink("busybox", "/system/xbin/lsmod");
symlink("busybox", "/system/xbin/lsusb");
symlink("busybox", "/system/xbin/lzcat");
symlink("busybox", "/system/xbin/lzma");
symlink("busybox", "/system/xbin/lzop");
symlink("busybox", "/system/xbin/lzopcat");
symlink("busybox", "/system/xbin/man");
symlink("busybox", "/system/xbin/md5sum");
symlink("busybox", "/system/xbin/mesg");
symlink("busybox", "/system/xbin/mkdir");
symlink("busybox", "/system/xbin/mke2fs");
symlink("busybox", "/system/xbin/mkfifo");
symlink("busybox", "/system/xbin/mkfs.ext2");
symlink("busybox", "/system/xbin/mkfs.vfat");
symlink("busybox", "/system/xbin/mknod");
symlink("busybox", "/system/xbin/mkswap");
symlink("busybox", "/system/xbin/mktemp");
symlink("busybox", "/system/xbin/modinfo");
symlink("busybox", "/system/xbin/modprobe");
symlink("busybox", "/system/xbin/more");
symlink("busybox", "/system/xbin/mount");
symlink("busybox", "/system/xbin/mountpoint");
symlink("busybox", "/system/xbin/mpstat");
symlink("busybox", "/system/xbin/mv");
symlink("busybox", "/system/xbin/nanddump");
symlink("busybox", "/system/xbin/nandwrite");
symlink("busybox", "/system/xbin/netstat");
symlink("busybox", "/system/xbin/nice");
symlink("busybox", "/system/xbin/nohup");
symlink("busybox", "/system/xbin/nslookup");
symlink("busybox", "/system/xbin/ntpd");
symlink("busybox", "/system/xbin/od");
symlink("busybox", "/system/xbin/patch");
symlink("busybox", "/system/xbin/pgrep");
symlink("busybox", "/system/xbin/pidof");
symlink("busybox", "/system/xbin/ping");
symlink("busybox", "/system/xbin/pkill");
symlink("busybox", "/system/xbin/pmap");
symlink("busybox", "/system/xbin/poweroff");
symlink("busybox", "/system/xbin/printenv");
symlink("busybox", "/system/xbin/printf");
symlink("busybox", "/system/xbin/ps");
symlink("busybox", "/system/xbin/pstree");
symlink("busybox", "/system/xbin/pwd");
symlink("busybox", "/system/xbin/pwdx");
symlink("busybox", "/system/xbin/rdev");
symlink("busybox", "/system/xbin/readlink");
symlink("busybox", "/system/xbin/realpath");
symlink("busybox", "/system/xbin/renice");
symlink("busybox", "/system/xbin/reset");
symlink("busybox", "/system/xbin/resize");
symlink("busybox", "/system/xbin/rev");
symlink("busybox", "/system/xbin/rm");
symlink("busybox", "/system/xbin/rmdir");
symlink("busybox", "/system/xbin/rmmod");
symlink("busybox", "/system/xbin/route");
symlink("busybox", "/system/xbin/run-parts");
symlink("busybox", "/system/xbin/rx");
symlink("busybox", "/system/xbin/sed");
symlink("busybox", "/system/xbin/seq");
symlink("busybox", "/system/xbin/setconsole");
symlink("busybox", "/system/xbin/setserial");
symlink("busybox", "/system/xbin/setsid");
symlink("busybox", "/system/xbin/sh");
symlink("busybox", "/system/xbin/sha1sum");
symlink("busybox", "/system/xbin/sha256sum");
symlink("busybox", "/system/xbin/sha512sum");
symlink("busybox", "/system/xbin/sleep");
symlink("busybox", "/system/xbin/sort");
symlink("busybox", "/system/xbin/split");
symlink("busybox", "/system/xbin/stat");
symlink("busybox", "/system/xbin/strings");
symlink("busybox", "/system/xbin/stty");
symlink("busybox", "/system/xbin/sum");
symlink("busybox", "/system/xbin/swapoff");
symlink("busybox", "/system/xbin/swapon");
symlink("busybox", "/system/xbin/sync");
symlink("busybox", "/system/xbin/sysctl");
symlink("busybox", "/system/xbin/tac");
symlink("busybox", "/system/xbin/tail");
symlink("busybox", "/system/xbin/tar");
symlink("busybox", "/system/xbin/tee");
symlink("busybox", "/system/xbin/telnet");
symlink("busybox", "/system/xbin/telnetd");
symlink("busybox", "/system/xbin/test");
symlink("busybox", "/system/xbin/tftp");
symlink("busybox", "/system/xbin/tftpd");
symlink("busybox", "/system/xbin/time");
symlink("busybox", "/system/xbin/timeout");
symlink("busybox", "/system/xbin/top");
symlink("busybox", "/system/xbin/touch");
symlink("busybox", "/system/xbin/tr");
symlink("busybox", "/system/xbin/traceroute");
symlink("busybox", "/system/xbin/true");
symlink("busybox", "/system/xbin/ttysize");
symlink("busybox", "/system/xbin/tune2fs");
symlink("busybox", "/system/xbin/umount");
symlink("busybox", "/system/xbin/uname");
symlink("busybox", "/system/xbin/uncompress");
symlink("busybox", "/system/xbin/unexpand");
symlink("busybox", "/system/xbin/uniq");
symlink("busybox", "/system/xbin/unix2dos");
symlink("busybox", "/system/xbin/unlzma");
symlink("busybox", "/system/xbin/unlzop");
symlink("busybox", "/system/xbin/unxz");
symlink("busybox", "/system/xbin/unzip");
symlink("busybox", "/system/xbin/uptime");
symlink("busybox", "/system/xbin/usleep");
symlink("busybox", "/system/xbin/uudecode");
symlink("busybox", "/system/xbin/uuencode");
symlink("busybox", "/system/xbin/vi");
symlink("busybox", "/system/xbin/watch");
symlink("busybox", "/system/xbin/wc");
symlink("busybox", "/system/xbin/wget");
symlink("busybox", "/system/xbin/which");
symlink("busybox", "/system/xbin/whoami");
symlink("busybox", "/system/xbin/xargs");
symlink("busybox", "/system/xbin/xz");
symlink("busybox", "/system/xbin/xzcat");
symlink("busybox", "/system/xbin/yes");
symlink("busybox", "/system/xbin/zcat");
symlink("iwmulticall", "/system/xbin/iwconfig");
symlink("iwmulticall", "/system/xbin/iwgetid");
symlink("iwmulticall", "/system/xbin/iwlist");
symlink("iwmulticall", "/system/xbin/iwpriv");
symlink("iwmulticall", "/system/xbin/iwspy");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1000, 1003, 02755, "/system/bin/screenshot");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 04755, "/system/bin/bash");
symlink("/system/bin/bash", "/system/bin/sh");
set_perm(0, 0, 0777, "/system/bin/a2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/00banner");
set_perm(0, 0, 0777, "/system/etc/init.d/01sysctl");
set_perm(0, 0, 0777, "/system/etc/init.d/02firstboot");
set_perm(0, 0, 0777, "/system/etc/init.d/04apps2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/99complete");
set_perm(0, 0, 0777, "/system/bin/launcha2sd");
set_perm(0, 0, 0777, "/system/bin/starta2sd");
set_perm(0, 0, 0777, "/system/bin/jita2sd");
set_perm(0, 0, 0777, "/system/bin/chka2sd");
set_perm(0, 0, 0777, "/system/bin/zipalign");
set_perm(0, 0, 0777, "/system/bin/sysinit");
set_perm(0, 0, 0777, "/system/bin/busybox.a2sd");
set_perm(0, 0, 0644, "/system/bin/apps2sd.hlp");
set_perm(0, 0, 0777, "/system/xbin/a2sd");
set_perm(0, 0, 0777, "/system/bin/dtinstall");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/hcitool");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.bt.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.coex.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.fm.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.wifi.sh");
set_perm(0, 2000, 0555, "/system/etc/init.qcom.sdio.sh");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "restore");
package_extract_file("system/bin/modelid_cfg.sh", "/tmp/modelid_cfg.sh");
set_perm(0, 0, 0777, "/tmp/modelid_cfg.sh");
run_program("/tmp/modelid_cfg.sh");
package_extract_file("system/bin/verify_cache_partition_size.sh", "/tmp/verify_cache_partition_size.sh");
set_perm(0, 0, 0777, "/tmp/verify_cache_partition_size.sh");
run_program("/tmp/verify_cache_partition_size.sh");
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/mmcblk0p5");
show_progress(0.100000, 0);
package_extract_file("move_cache_sd", "/tmp/move_cache_sd");
set_perm(0, 0, 0777, "/tmp/move_cache_sd");
run_program("/tmp/move_cache_sd");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
       write_raw_image("/tmp/boot.img", "boot"),
       delete("/tmp/boot.img"));
unmount("/system");
unmount("/data");


Your syntax for your mount command doesn't match what is needed. For example, in your code:

mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");
mount("MTD", "system", "/system");

Notice how the first line has 4 parameters and the 2nd line has only 3 parameters?

Your error message says:
Installing update...
mount() expects 4 args, got 3

Understand?

Edit: Also, you should not be mixing mounting your partitions as different types. In the same example above, you're mounting /system as ext4 in one line and then MTD in another line.
 
Your syntax for your mount command doesn't match what is needed. For example, in your code:

mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");
mount("MTD", "system", "/system");

Notice how the first line has 4 parameters and the 2nd line has only 3 parameters?

Your error message says:
Installing update...
mount() expects 4 args, got 3

Understand?

Edit: Also, you should not be mixing mounting your partitions as different types. In the same example above, you're mounting /system as ext4 in one line and then MTD in another line.

This makes sense yes. I was using android kitchen so it did everything for me automatically. This is why I went to the source of the problem. The only problem now though is what exactly should I have there then? Should it be:
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");

just duplicates of each other? I'm sorry if this is n00bish but what exactly are these lines trying to accomplish? :eek:
 
This makes sense yes. I was using android kitchen so it did everything for me automatically. This is why I went to the source of the problem. The only problem now though is what exactly should I have there then? Should it be:
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/system");

just duplicates of each other? I'm sorry if this is n00bish but what exactly are these lines trying to accomplish? :eek:

You only need to mount each partition once (such as /system or /data, etc), then do all of your commands and actions, and then at the end of your script, unmount any partitions that you previously mounted.
 
Yes I can see that mhmm mhmm.. I think what's confusing me here is: what is MTD and why is it in there. It was placed there automatically by Android Kitchen so bleh I'm confuzzled. Anyways, I feel I've been asking too much I'll see what I can do on my own now. Thanks mantera =]
 
If you can find the source code for the app you would place it that folder. If you have just the apk you can do the following

1. Create a folder called apps in device/motorola/triumph/
2. Copy all the apps you have into the apps folder
3. Edit the triumph.mk in device files and create an area like

Code:
# Copying my personal apps into Android OS
PRODUCT_COPY_FILES +=  \
    device/motrola/triumph/apps/app1.apk:system/app/app1.apk \
    device/motrola/triumph/apps/app2.apk:system/app/app2.apk \
    device/motrola/triumph/apps/app3.apk:system/app/app3.apk
make sure to list the actual name of the app and not app1 app2 app3


Ok, did steps 1-3 and put all my apps that I want into that folder (apps) , then edited the triumph.mk like this (won't list all apps, kinda long)

Code:
# Copying my personal apps into Android OS
PRODUCT_COPY_FILES +=  \
    device/motrola/triumph/apps/com.alensw.PicFolder_85.apk:system/app/com.alensw.PicFolder_85.apk \
    device/motrola/triumph/apps/com.anddoes.fancywidgets_21.apk:system/app/com.anddoes.fancywidgets_21.apk \
    device/motrola/triumph/apps/com.anddoes.fancywidgets.unlocker_2.apk:system/app/com.anddoes.fancywidgets.unlocker_2.apk \
    device/motrola/triumph/apps/com.andrew.aosp_5.apk:system/app/com.andrew.aosp_5.apk \
    device/motrola/triumph/apps/com.anoshenko.android.solitaires_42.apk:system/com.anoshenko.android.solitaires_42.apk \
    device/motrola/triumph/apps/com.appmakr.app203785_3.apk:system/app/com.appmakr.app203785_3.apk \
    device/motrola/triumph/apps/com.blau.android.phandroidnews_27.apk:system/app/com.blau.android.phandroidnews_27.apk \
    device/motrola/triumph/apps/com.cdroid.darts_11.apk:system/app/com.cdroid.darts_11.apk \
    device/motrola/triumph/apps/com.dreamstep.wCyanogenmod_Forum_1297876296.apk:system/app/com.dreamstep.wCyanogenmod_Forum_1297876296.apk \
    device/motrola/triumph/apps/com.duduapps.craigslistfree_29.apk:system/app/com.duduapps.craigslistfree_29.apk \
    device/motrola/triumph/apps/com.eclipsim.gpsstatus2_52.apk:system/app/com.eclipsim.gpsstatus2_52.apk \
    device/motrola/triumph/apps/com.estrongs.android.pop_91.apk:system/app/com.estrongs.android.pop_91.apk \

The build error is

Code:
make: *** No rule to make target `device/motrola/triumph/apps/bt.android.elixir_51.apk', needed by `system/app/bt.android.elixir_51.apk'.  Stop.
make: *** Waiting for unfinished jobs....

What am I doing wrong ?
 
Ok, did steps 1-3 and put all my apps that I want into that folder (apps) , then edited the triumph.mk like this (won't list all apps, kinda long)

Code:
# Copying my personal apps into Android OS
PRODUCT_COPY_FILES +=  \
    device/motrola/triumph/apps/com.alensw.PicFolder_85.apk:system/app/com.alensw.PicFolder_85.apk \
    device/motrola/triumph/apps/com.anddoes.fancywidgets_21.apk:system/app/com.anddoes.fancywidgets_21.apk \
    device/motrola/triumph/apps/com.anddoes.fancywidgets.unlocker_2.apk:system/app/com.anddoes.fancywidgets.unlocker_2.apk \
    device/motrola/triumph/apps/com.andrew.aosp_5.apk:system/app/com.andrew.aosp_5.apk \
    device/motrola/triumph/apps/com.anoshenko.android.solitaires_42.apk:system/com.anoshenko.android.solitaires_42.apk \
    device/motrola/triumph/apps/com.appmakr.app203785_3.apk:system/app/com.appmakr.app203785_3.apk \
    device/motrola/triumph/apps/com.blau.android.phandroidnews_27.apk:system/app/com.blau.android.phandroidnews_27.apk \
    device/motrola/triumph/apps/com.cdroid.darts_11.apk:system/app/com.cdroid.darts_11.apk \
    device/motrola/triumph/apps/com.dreamstep.wCyanogenmod_Forum_1297876296.apk:system/app/com.dreamstep.wCyanogenmod_Forum_1297876296.apk \
    device/motrola/triumph/apps/com.duduapps.craigslistfree_29.apk:system/app/com.duduapps.craigslistfree_29.apk \
    device/motrola/triumph/apps/com.eclipsim.gpsstatus2_52.apk:system/app/com.eclipsim.gpsstatus2_52.apk \
    device/motrola/triumph/apps/com.estrongs.android.pop_91.apk:system/app/com.estrongs.android.pop_91.apk \

The build error is

Code:
make: *** No rule to make target `device/motrola/triumph/apps/bt.android.elixir_51.apk', needed by `system/app/bt.android.elixir_51.apk'.  Stop.
make: *** Waiting for unfinished jobs....

What am I doing wrong ?

You misspelled the path. It should be

device/motorola/triumph/

in the beginning of all of those lines you added. Note the letter "o" between t and r in motorola.
 
You misspelled the path. It should be

device/motorola/triumph/

in the beginning of all of those lines you added. Note the letter "o" between t and r in motorola.

Ouch :eek::eek: :o:o

Thats what I get for doing a copy & paste instead of typing

Thanks mantera ;)

Gonna try this again
 
New error

Code:
Install: out/target/product/triumph/system/app/SystemUI.apk
APK certs list: out/target/product/triumph/obj/PACKAGING/apkcerts_intermediates/cyanogen_triumph-apkcerts-eng.piper.txt
Finding NOTICE files: out/target/product/triumph/obj/NOTICE_FILES/hash-timestamp
Finding NOTICE files: out/target/product/triumph/obj/NOTICE_FILES/CM/hash-timestamp
Combining NOTICE files: out/target/product/triumph/obj/NOTICE-CM.html
Combining NOTICE files: out/target/product/triumph/obj/NOTICE.html
Target system fs image: out/target/product/triumph/obj/PACKAGING/systemimage_intermediates/system.img
in mkuserimg.sh PATH=out/host/linux-x86/bin/:/usr/lib/jvm/java-6-sun/bin::/home/piper/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/piper/android/out/host/linux-x86/bin:/home/piper/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:/home/piper/android/development/emulator/qtools:/home/piper/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:/home/piper/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
make_ext4fs -l 260046848 -a system out/target/product/triumph/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/triumph/system
Creating filesystem with parameters:
    Size: 260046848
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7936
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 63488
    Block groups: 2
    Reserved block group size: 15
error: do_inode_allocate_extents: Failed to allocate 1266 blocks

make: *** [out/target/product/triumph/obj/PACKAGING/systemimage_intermediates/system.img] Error 4
piper@x1:~/android$
 
Back
Top Bottom