Related
Since I tend to modify roms before flashing them to my phone, and sometimes want to do so away from a computer, I ended up writing this. It's an ash script that uses the openssl binary found on most custom roms, and infozip. The sdk test/platform/media/etc keys are included. Usage:
Usage: signapk (options) [command] (files)
commands:
sign FILE sign a .zip or .apk
sign FILE1 FILE2 create a signed copy of FILE1 as FILE2
cert FILE(s) print cert info on FILE's signer
certinfo FILE print detailed cert info on FILE's signer
cmp FILE compare signer of FILE with default/selected cert
cmp FILE1 FILE2 compare signer of FILE1 to signer of FILE2
options:
-k, --key FILE key to sign with
-c, --cert FILE cert to sign with
if -c or -k are not files then they are considered
aliases to builtins (ie -k testkey or -c platform)
-f, --force sign even if cert differs from original
-t, --tmp DIR use DIR for tempdir instead of '/cache'
-d, --debug output debugging
-V, --version print 'signapk v0.3.1'
exit codes:
1: read error (file 1) 2: read error (file 2)
3: write error 4: ssl error
5: zip write error 9: key error
8: sign: cert mismatch 10: cmp: cert mismatch
128: script error 255: user error
Installation:
unpack somewhere. If needed, edit the variables at the top of the script. By default it uses /cache/ for 4 small temporary files.
Faq:
* Why did you include a busybox and openssl? * Some roms don't include the openssl utility. Busybox's unzip refuses to deal with zipaligned apks on alot of roms, because it wasn't compiled with ENABLE_DESKTOP. Busybox's ash is missing things that the script needs, on some roms. The script will use whatever the rom provides, if these binaries are not present. Good luck.
* How do I change the cert? * see signapk --help for cert/key selection flags
* Can I use this in my MarketAppThingy? * Sure, and please let me know. If it's a paid MarketAppThingy, consider sending me a free copy.
Changelog:
release 3: cmp function, key selection, documented exit codes that make sense, and paranoia. Includes trimmed down busybox and openssl binaries. If these are present, script will reload itself to run in it's busybox ash interpreter to avoid broken busybox compiles, and can run without using anything provided by the rom. In theory this means no compatibility issues, but is limited to ARM devices.
release 2: Apparently it's valid to have ANYNAME.SF/ANYNAME.RSA or ANYNAME.DSA. signapk cert and certinfo now handles this. The sign function will blindly write to CERT.SF and CERT.RSA as this is the behavior of the standard SignApk.java. This may be fixed later.
If you don't wanna signup to download attachment, snag this from http://code.google.com/p/signapk/downloads/list
very, very useful. I'm testing this now Signing stuff was always way too complicated.
Cool. Can't wait for someone to make a market app that creates a simple ui to edit update.zips before flashing. Hint hint
I put the files in /system/signapk (new folder)
When i run the script I get the error below. The test file is an unsigned apk exported from eclipse.
Code:
# ./signapk sign /sdcard/unsigned.apk
./signapk sign /sdcard/unsigned.apk
Checksumming /mnt/sdcard/unsigned.apk:
res/layout/main.xml AndroidManifest.xml
resources.arsc res/drawable-hdpi/icon.png res/drawable-ldpi/icon.png res/drawable-mdpi/icon.png classes.dex
[COLOR="Red"]unable to write 'random state'
./signapk: line 132: ./signapk.zip: not found[/COLOR]
#
Any idea what needs changing to fix this?
update: When I used the full path it worked.
Code:
# /system/signapk/signapk sign /sdcard/unsigned.apk
/system/signapk/signapk sign /sdcard/unsigned.apk
Checksumming /mnt/sdcard/unsigned.apk:
res/layout/main.xml AndroidManifest.xml
resources.arsc res/drawable-hdpi/icon.png res/drawable-ldpi/icon.png res/drawable-mdpi/icon.png classes.dex
unable to write 'random state'
adding: META-INF/MANIFEST.MF (deflated 49%)
adding: META-INF/CERT.SF (deflated 48%)
adding: META-INF/CERT.RSA (deflated 33%)
# /system/signapk/signapk cert /sdcard/unsigned.apk
/system/signapk/signapk cert /sdcard/unsigned.apk
/sdcard/unsigned.apk 936EACBE07F201DF SDK Test Key
Was playing around with app inventor and came up with this:
edit: AppInventor does not generate java code and it cannot be worked on further in anything else (i.e eclipse)
I was really hoping I would atleast get the activity xml
Heya, the latest is at http://code.google.com/p/signapk/downloads/list and should fix the zip error. signapk-bb, signapk-zip, and signapk-openssl are static, trimmed down versions of utilities required by the script, and should be extracted to the same directory as the script. If they are not present it will try to use stuff in $PATH
Just throwing it (the obvious) out there that this could enable a new generation of morphs for /data apps
Copy apk,uninstall,morph, install
Hmmmm....
britoso said:
Just throwing it (the obvious) out there that this could enable a new generation of morphs for /data apps
Copy apk,uninstall,morph, install
Click to expand...
Click to collapse
How can i get this to work with a morph and to edit the updater-script?
Someone explain the commands with example...
Another noob question is .. it is for android or pc...
Edit:- Made my own mod here https://forum.xda-developers.com/t/...-apk-zip-within-android.3835975/post-81324327
below code works with latest(1.32.0) busybox
Bash:
#!/system/bin/sh
# depends unzip printf zip openssl
# put zip openssl busybox in PATH
# Usage:-
# Sign.sh key.pk8 key.x509.pem in.zip out.zip
ordie() {
if [ $? -ne 0 ]; then
IFS=" "
$BB printf "$1\n"
exit $2
fi
}
PKEY="$1"
CERT="$2"
ORIG="$3"
TARGET="$4"
BB=busybox
cat "$ORIG" > "$TARGET"; ordie "Cannot write to $TARGET" 3
$BB printf "Checksumming $ORIG:\n"
TMP=$HOME
TMPDIR="$TMP/sign-$$"
TMPPKEY="$TMPDIR/tmp.pkey"
mkdir -p "$TMPDIR/META-INF"; ordie "" 3
$BB printf "Manifest-Version: 1.0\r\nCreated-By: 1.0 (Android SignApk)\r\n\r\n" > "$TMPDIR/META-INF/MANIFEST.MF"
ZIPls=$($BB unzip -qql "$ORIG"); ordie "$ORIG: unzip error" 1
OLDIFS=$IFS
IFS=${IFS:2:2}
for i in $ZIPls; do
IFS=$OLDIFS
set -- $i
if [ "$#" -ge 3 ] && [ "$1" != "0" ]; then
file="${i:30}"
case "$file" in META-INF/MANIFEST.MF|META-INF/CERT.SF|META-INF/CERT.RSA) continue;; esac
$BB printf "$file "
hash=$($BB unzip -p "$ORIG" "$file" | openssl sha1 -binary | openssl base64); ordie "$ORIG: unzip error" 1
ret="Name: $file\r\nSHA1-Digest: $hash\r\n\r\n"
$BB printf "$ret" >> "$TMPDIR/META-INF/MANIFEST.MF"
hash=$($BB printf "$ret" | openssl sha1 -binary | openssl base64)
$BB printf "Name: $file\r\nSHA1-Digest: $hash\r\n\r\n" >> "$TMPDIR/META-INF/CERT.SF.temp"
fi
done
$BB printf "\n"
mfhash=$(cat "$TMPDIR/META-INF/MANIFEST.MF" | openssl sha1 -binary | openssl base64)
$BB printf "Signature-Version: 1.0\r\nCreated-By: 1.0 (Android SignApk)\r\nSHA1-Digest-Manifest: $mfhash\r\n\r\n" > "$TMPDIR/META-INF/CERT.SF"
cat "$TMPDIR/META-INF/CERT.SF.temp" >> "$TMPDIR/META-INF/CERT.SF"
openssl pkcs8 -inform DER -nocrypt -in "$PKEY" > "$TMPPKEY"; ordie "" 4
cat "$TMPDIR/META-INF/CERT.SF" | openssl smime -sign -inkey "$TMPPKEY" -signer "$CERT" -binary -outform DER -noattr > "$TMPDIR/META-INF/CERT.RSA"; ordie "" 4
cd "$TMPDIR"
zip "$TARGET" META-INF/MANIFEST.MF META-INF/CERT.SF META-INF/CERT.RSA; ordie "" 5
cd - > /dev/null
rm -r "$TMPDIR"
This Guide is intended to fast-track the curious Windows user into the world of Compiling Android With Linux
It does not cover Linux in depth and does not cover hacking the code.
It does include an introduction to git by way of an example (replacing the default Kernel)
I hope it proves helpful
Below I shall run through setting up VirtualBox and installing Lubuntu.
Lubuntu is a lighter alternative to Ubuntu targeted at older/low powered hardware which makes it ideally suited to running in a VM.
Before we start, I would like to make it clear that unless you have a powerful,memory rich PC, compiling Android inside a VM is not ideal.
Having said that, You can probably get some mileage on a reasonably spec'ed Machine. And this should prove helpful to those who are not quite ready to take the plunge and install a native linux.
The latter half of the guide detailing Lubuntu will also work running native on the bare metal. Just ignore the VB driver parts.
If you haven't already, Download an iso from http://cdimages.ubuntu.com/lubuntu/releases/11.10/release/
I will be working through the desktop version
if you have a 64-bit PC *AND* your current OS is 64-bit get the lubuntu-11.10-desktop-amd64.iso
if your PC or OS is 32-bit then lubuntu-11.10-desktop-1386.iso is what you want.
As well as a {L}ubuntu disk, you will need:
VirtualBox https://www.virtualbox.org/ optionally grab the extension pack for usb2 support
At least 25 GB free disk space with large file support
A working internet connection, the CM source is 9GB so have that in mind.
VirtualBox Installation
Bit of a no brainer, just install it like any other program
At some point it may prompt you to download Additions, not to be confused with the extension pack.
The Additions Pack is an .iso containing drivers for the guest OS's, video, clipboard etc.
VirtualBox Setup
Once VirtualBox has installed open it
If you downloaded the extensions pack install it as follows:
file >> preferences >> extensions
click the add package icon and navigate to the download
Now create a virtual machine
click new >> next
give it a name like "AndroidCompiler"
OS Type "Linux"
Version "Ubuntu" >> next
The Version is not particularly important, as far as I know it is just for the icon.
increase the memory , keeping it in the green >> next
create new disk >> next
VDI >> next
Fixed size >> next
select the location (for example your second hard drive X: or whatever)
change the size to 5.00 GB, if the slider is a pita just type it >> next
If you can afford it a larger disk will not hurt, 10GB should be plenty
review and >> create >> create again
The basic VM is now complete
Fine tune the VM Settings
Highlight the new VM and hit Settings
system
Motherboard tab
in boot order select hdd and 'move' it to the top of the list with the up icon
Processor tab
tick enable PAE/NX
select number of CPUs
Note that if you use all of your cpu cores it will slow down your host
Display
Video tab
tick enable 3D
Network
Adapter 1 tab
Attached to Bridge Adaptor
Name < select your NIC >
Advanced >
Promiscuous Mode : Allow All
Storage
highlight the empty CD
click the cd icon to the far right
Choose a virtual cd/dvd, (your iso d/l)
highlight the sata Controller
add hard disk (3 stacked disks icon) >> create new disk
create a new disk called AndroidSrc or something, it must be at least 20GB (40GB recommended)
if you plan on playing with ics then triple it
Shared Folders
add new folder
tick auto mount
navigate to a folder (or create a new one)
this will be used to transfer files between your OS and the VM
Now click OK, and then start
Installation of Lubuntu
You will be presented with a rather ugly language selection, pick one
Then select install Lubuntu
Ignore any errors about smbpii4 bios blah blah..
Language selection (again but nicer looking) >> continue
Tick download updates while installing >> continue
select something else >> continue
select /dev/sda >> new partition table
select /dev/sda free space >> add
type = logical
size = 555
location = end
use as = swap area
>> OK
Normally Linux Distos create a swap the same size as physical memory.
This is so physical memory can be dumped to swap when going into hibernation (save state with no power use)
Since VirtualBox has it's own Save State feature we don't need it.
And for what it's worth I have always found the resume after hibernate to be painfully slow
select /dev/sda free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /
>> ok
tick format for /dev/sda2
select /dev/sdb >> new partition table
select /dev/sdb free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /Android
>> ok
tick format for /dev/sdb1
unless you are re-using an old Android source disk
>> install now
Where are You?
Lubuntu guesses from your IP, if needed correct it >> continue
Keyboard setup >> continue
username / password >> continue
wait for it to finish
>> restart now! -- press enter when prompted
You should now be booted to Lubuntu
Ignore the update manager, we will get the script to deal with that.
VirtualBox Drivers
Next to the clock should be a pci card icon
click it
install drivers
activate >> input your password
wait .....
when finished >> close
bottom left is some strange icon, it is the main menu
click it >> logout >> logout (no need to reboot yet) >> login again
Shared Folders
Main Menu >> system tools >> users and groups
Manage Groups >> vboxsf >> Properties >> tick your username
Main Menu >> Accessories >> LXTerminal (right click >> add to desktop, if you like)
The reason for the earlier logout and back in was to activate the VB host to VM clipboard
The below script will install the required packages
It will work for both 32 and 64 bit
The script is based on instructions for 11.10
It will probably work on 11.04 and may even work on 10.xx but I have only tested against Lubuntu 11.10 both 32 and 64 bit
It is not specific to Lubuntu and should work with any Ubuntu 11.10 derivative
To paste with the keyboard ctrl+shift+v *NOT* ctrl+v
ctrl+shift+c to copycopy and paste this to the term.
Code:
cat > ~/setup.sh << "EOF"
#!/bin/bash
sudo apt-get update
# Reference : http://source.android.com/source/initializing.html
case $(uname -m) in
x86_64) # packages for 64-bit
sudo apt-get -y install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
sudo apt-get -y install lib32readline-gplv2-dev || \
sudo apt-get -y install lib32readline5-dev
case $(awk -F"=" '/DISTRIB_RELEASE/ {print $NF}' /etc/lsb-release) in
11.10|11.04) sudo apt-get -y install libx11-dev:i386 ;;
10.10|10.04) sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so ;;
esac ;;
i?86) # packages for 32-bit
sudo apt-get -y install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc ;;
*) echo "Error: Machine type not recognised" && exit 1;;
esac
# Extras for CyanogenMod builds
sudo apt-get -y install squashfs-tools \
pngcrush libsdl1.2-dev \
libesd0-dev \
libwxgtk2.6-dev \
schedtool
# system update
sudo apt-get -y upgrade
# install sun java jdk
# Reference : top google hit for " ubuntu 11.10 sun-java6-jdk "
# http://www.gaggl.com/2011/10/installing-java6-jdk-on-ubuntu-11-10/
case $(awk -F"=" '/DISTRIB_RELEASE/ {print $NF}' /etc/lsb-release) in
11.10) codename=oneiric;;
11.04) codename=natty;;
10.10) codename=maverick;;
11.10) codename=lucid;;
*) echo "Error: Unrecognised ubuntu version";exit 1;;
esac
test -e /etc/apt/sources.list.d/ferramroberto-java-${codename}.list || \
echo | sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get -y install sun-java6-jdk sun-java6-plugin
# The default lubuntu install does not include java
# but other ubuntu derivatives may include openjdk
Java6Sun=$(echo | update-alternatives --config java | awk '/java-6-sun/ && ($1 !~ /*|^There/){print $1}')
test "$Java6Sun" != "" && echo $Java6Sun | sudo update-alternatives --config java
# create ~/bin if it does not exist
install -v -d ~/bin
# clean up
rm $0
EOF
Now run the script
Code:
bash ~/setup.sh
It will ask for your password
eventually you will be asked to read and accept the Sun Java licence
Once all that is done..
The updates will have installed a new kernel, and we still haven't loaded the VMs special video/shared folder drivers yet so it is time for a reboot
Like the logout we did earlier, but reboot.
Now that you have rebooted lets fix the permissions for our source partition
open a term
Code:
sudo chown $USER:$USER /Android
replace Android with the mount point you gave for your source drive
make a directory for the CM src
Code:
mkdir /Android/CM
cd /Android/CM
Now to get the src
#
# http://source.android.com/source/downloading.html
# http://wiki.cyanogenmod.com/wiki/HTC_Dream_&_Magic:_Compile_CyanogenMod_(Linux)
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -c -j16
The CM wiki advises repo sync -j16
You will be downloading 9 GB, depending on the speed of your connection this may take some time
Reduce the number of threads(16) if you don't want to saturate your connection
NEW : 2012-03-10
added -c to the repo sync.
-c tells repo to only fetch the current branch which will save time and diskspace
If you are interested in comparing branches then leave out -c
don't forget to include -c with all future repo syncs
using -c will save approx 2GB diskspace as well as network bandwidth (7GB instead of 9GB)
use this table to get an approximation of how long it will take
Code:
10GB @ 60 Mbit/s 0.46 hrs ( 28 mins)
10GB @ 40 Mbit/s 0.69 hrs ( 42 mins)
10GB @ 20 Mbit/s 1.39 hrs ( 83 mins)
10GB @ 10 Mbit/s 2.78 hrs ( 167 mins)
10GB @ 5 Mbit/s 5.56 hrs ( 333 mins)
10GB @ 2.5 Mbit/s 11.11 hrs ( 667 mins)
10GB @ 1 Mbit/s 27.78 hrs ( 1667 mins)
Assumes Max throughput
When setting up the VM we created a bridge to one of your NICs
If you are on a laptop and switch between wire and wireless, you can also with the VM
Devices >> network adaptors (the VirtualBox Menu)
You could try setting up a 2nd adapter, one for wire and the other wireless, net traffic should be routed automatically
You can only add adaptors while the VM is Powered Off
When repo sync has completed
Setting up the Environment
Setting up the Environment needs to be done with each new shell session
make sure you are in the repo root
A quick glance at your command prompt should tell you where you are
Code:
source build/envsetup.sh
alternative:
Code:
. build/envsetup.sh
that is <dot><space>bui
Setting up the build
ccache
not to be confused with compcache, ccache can help speed up recompilations
More information can be found on cm's wiki here
and in google's http://source.android.com/source/initializing.html
Code:
export USE_CCACHE=1
# for reboots and new shell sessions
echo "export USE_CCACHE=1" >> ~/.bashrc
by default ccache uses ~/.ccache we won't have enough space
Code:
export CCACHE_DIR=/Android/.ccache
# for reboots and new shell sessions
echo "export CCACHE_DIR=/Android/.ccache" >> ~/.bashrc
The default max cache size is 976.6 MB (that is what is reported,could be a / 1024 screwup ), this will just about fit our min sized 20GB drive
http://source.android.com/source/initializing.html recommends between 50 and 100 GB. I imagine this is to accommodate multiple targets
space permitting between 5 and 10 GB should be fine for a single device
if you have a 20GB Android drive then leave it at the default
If you opted for a larger drive, adapt to suit
for 5 GB :
Code:
prebuilt/linux-x86/ccache/ccache -M 5G
The setting is stored in CCACHE_DIR so unless you want to change it forget about it.
Lets do lunch
don't ask me why it is called lunch. My best guess is a play on Menu
Code:
lunch
and select your target
when you get bored of seeing that lunch menu
Code:
lunch cyanogen_dream_sapphire-eng
Proprietary Files
The Proprietary Files need to be put into the vendor tree
You have two options:
Extract from a zip
Extract from your device
I'm going to walk through Option 1
Remember the Shared Folder we created?
Well we are going to use that now.
On your Host system copy a recent ROM zip to the folder your shared with the VM
good choices are : ezginger, ADS_magpie, dw9906
in your VM's terminal,
Code:
ls /media/
you should see a folder sf_<Name> and in that folder your rom zip
There are two scripts in device/htc/dream_sapphire/
unzip-files.sh and extract-files.sh
Unfortunately the unzip-files.sh script is not up to date with extract
You can manually fix it or use my script which converts the extract script to an unzip script
to use it:
set a environment var like so
Code:
ROM=/me<tab>s<tab><tab>
<tab> is the tab key, please don't type <tab>
read this to get an idea of what is happeningeventually you should have something like
ROM=/media/sf_5gb/ADS_magpie-V1.0-signed.zip
Code:
pushd device/htc/dream_sapphire
#awk '/adb pull/{sub(/adb pull/,"unzip '$ROM'")sub(/\.\./,"-o ..")};{print}' extract-files.sh | sh
# 2012-03-19 corrected the above script, it should be :
awk '/adb pull/{sub(/adb pull \//,"unzip -o '$ROM' ")sub(/.*/,"-d ../../../vendor/htc/$DEVICE/proprietary/",$NF)};{print}' extract-files.sh | sh
popd
pushd and popd
The above step only needs to be done the once
that is unless the proprietary files require changes, for instance a switch to open sourced versions
Kernel
The DS kernel in CM is old so I added ezterry's latest
I shall show you how, but we are taking the scenic route
We shall create our own git repo and add that to a local_manifest
Configure git
This is a global config, you should only need to do it once per user
Code:
git config --global user.name "Your Name Comes Here"
git config --global user.email [email protected]
taken from file:///usr/share/doc/git-doc/gittutorial.html
Install git docs with
Code:
sudo apt-get install git-doc
Create a git repo and push to it
Code:
git init /Android/my_git_repos/device_htc_dream_sapphire
cd /Android/CM/device/htc/dream_sapphire
git push file:///Android/my_git_repos/device_htc_dream_sapphire github/gingerbread
Now let's have a look
Code:
cd /Android/my_git_repos/device_htc_dream_sapphire
ls
you will see it is empty
But wait.. is it empty?
Code:
ls .<tab><tab>
Code:
git branch -a
git checkout gingerbread
ls
git log # q to exit
git log -p
now lets make some changes
Remember the shared folder?
Well I hope you have ezterry kernel pack in there
Code:
unzip /media/sf_<REPLACEME>/ezgb-2636-v1.5.2_S.zip *2708*
mv 2708-zImage kernel
mv mod-2708/modules.sqf prebuilt/
rmdir mod-2708/
git status
edit full_dream_sapphire.mk
change
device/htc/dream_sapphire/prebuilt/wlan.ko:/system/lib/modules/wlan.ko \
to
device/htc/dream_sapphire/prebuilt/modules.sqf:/system/lib/modules/modules.sqf \
we can do this with a simple sed
Code:
sed -i -e 's[/wlan.ko[/modules.sqf[g' full_dream_sapphire.mk
now
Code:
git diff
Code:
git add full_dream_sapphire.mk kernel prebuilt/modules.sqf
Since the wlan.ko is of no use to us (we replaced the kernel it was for) we need to remove it
but not just from the filesystem but git as well
Code:
git rm prebuilt/wlan.ko
Have another look at git status and git diff
notice that git diff produces no output
now try git diff --cached
commit the staged changes with
Code:
git commit
The default editor for git is nano
^ == ctrl
^O == ctrl+o
write commit notes
Code:
Updated Kernel and kmodules to 2708 ezgb-2636-v1.5.2
http://forum.xda-developers.com/showpost.php?p=14768272&postcount=2427
to save Ctrl+o<enter>
to exit Ctrl+x
if you prefer vim
Code:
git config --global core.editor vim
don’t forget to install vimAdding a local_manifest.xml
Code:
cat > /Android/CM/.repo/local_manifest.xml << "EOF"
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="Local"
fetch="file:///Android/my_git_repos/" />
<project path="device/htc/dream_sapphire" remote="Local" name="device_htc_dream_sapphire" revision="gingerbread" />
</manifest>
EOF
Apologies My initial post had an error in the above codebox
it should be fetch="file:///Android/my_git_repos/" not fetch="file:///Android/my_git_repos/device_htc_dream_sapphire/"
make sure you are in /Android/CM/
repo sync
Then look in device/htc/dream_sapphire to see if your changes were applied
Code:
pushd device/htc/dream_sapphire
git branch -a # look for remotes/m/gingerbread -> Local/gingerbread
git log -p # you should see your commit notes
popd
Remove RomManager
Optionally remove RomManager from the build
Code:
sed -i '/RomManager/d' vendor/cyanogen/products/common.mk
The above is not permanent, when you repo sync it will be reverted
That is unless you commit the changeif you want RomManager then
Code:
./vendor/cyanogen/get-rommanager
finally build it
Code:
mka bacon
It is going to take a while depending on the speed of your machine and the memory/cpu cores you gave the VM (if you are using a VM)
Lets hope you don't get any build errors
If all goes well you should end up with a zipfile in /Android/CM/out/target/product/dream_sapphire/
Don't forget your /media/sf_ folder, cp the completed zip to that and from there you can treat it like any other rom
I hope you had fun following this
reserved for extras
like editors, linux tipsntricks, github, eclipse
moar extraz
I was under the impression that 64-bit linux was required now to compile android from source.
I compiled AOSP froyo with the following specs fine:
Ubuntu 10.04 (tried both native and vm)
Pentium 4 3.20ghz Hyper-Threaded
32-bit of course
3.12 GB of RAM
It took about two hours but not as bad as I thought, and it worked
Anyways thank you Scrip for this wonderful guide (yes I'll thank you in a second).
I knew 70%ish of this, and you helped fill up the rest of the holes for me
Thanks a lot man.
I'm sorry for kinda yelling back at you earlier
One question: Is there any hope for grabbing the cm6 source? It's been broken with a lot of files missing for a while now.
select /dev/sda free space >> add
type = primary
size = <what it says>
location = beginning
use as ext4
mount point = /
>> ok
tick format for /dev/sda2
Click to expand...
Click to collapse
Tried this and no matter how many times I do it it still makes the entire 12GB sda partition the SWAP space.
EDIT: So solution is not to type in "555" but to use the arrow selection button to drop it down to "555".
wergeld said:
I was under the impression that 64-bit linux was required now to compile android from source.
Click to expand...
Click to collapse
Pointless and inaccurate post
Come back when you can prove 32-bit won't compile Android
Post the appropriate errors and I will do my best to resolve it
Scrip said:
Pointless and inaccurate post
Come back when you can prove 32-bit won't compile Android
Post the appropriate errors and I will do my best to resolve it
Click to expand...
Click to collapse
Woah, just asking. I saw this:
Ubuntu 10.04 64-bit is recommended. Building using a newer version of Ubuntu or a 32-bit Ubuntu is currently only experimentally supported and is not guaranteed to work on branches other than master.
Click to expand...
Click to collapse
This is taken from http://source.android.com/source/initializing.html
I just wanted to make sure that yes, you can compile against 32-bit before I spend a while setting this up.
wergeld said:
Tried this and no matter how many times I do it it still makes the entire 12GB sda partition the SWAP space.
EDIT: So solution is not to type in "555" but to use the arrow selection button to drop it down to "555".
Click to expand...
Click to collapse
no idea what is wrong there
try the other way round
with a clean 12gb partition
primary = < size - 555 >
use as = ext4
mount point = /
you could just let ubuntu set everything up
downside is
I will need to add instruction to mount the /Android drive
+ wasted diskspace
but again, I don't see why
Scrip said:
no idea what is wrong there
try the other way round
with a clean 12gb partition
primary = < size - 555 >
use as = ext4
mount point = /
you could just let ubuntu set everything up
downside is
I will need to add instruction to mount the /Android drive
+ wasted diskspace
but again, I don't see why
Click to expand...
Click to collapse
No worries on that. Ghost in the Machine maybe. Coming from TFS and VS2010 I have come accustomed to oddball things like this.
So far so good. Best part is the package script you have up there. Waiting to finish package installs...
frankdrey said:
I compiled AOSP froyo with the following specs fine:
Ubuntu 10.04 (tried both native and vm)
Pentium 4 3.20ghz Hyper-Threaded
32-bit of course
3.12 GB of RAM
It took about two hours but not as bad as I thought, and it worked
Anyways thank you Scrip for this wonderful guide (yes I'll thank you in a second).
I knew 70%ish of this, and you helped fill up the rest of the holes for me
Thanks a lot man.
I'm sorry for kinda yelling back at you earlier
One question: Is there any hope for grabbing the cm6 source? It's been broken with a lot of files missing for a while now.
Click to expand...
Click to collapse
I can't say it will build
look at the repo init command
-b <branch>
so if you replace gingerbread with froyo you will checkout cm6
if you have already added the local_manifest then you need to delete that before a repo sync
I will probably cover this in post 2/3
post 1 is basic
my idea is to get people interested
posts 2 and 3 will deal with extras, in post 1 I skipped basics like text editing
mostly because I have no idea how to deal with that.
Personally I use vim or kate
But I plan (if there is interest) on adding eclipse, which would make a text editor redundant
Yes I have downloaded the source for froyo before
A lot of the files are missing and repo sync doesn't complete
I know that all alsa-related files are missing, but there is more that I might have forgotten by now
frankdrey said:
Yes I have downloaded the source for froyo before
A lot of the files are missing and repo sync doesn't complete
I know that all alsa-related files are missing, but there is more that I might have forgotten by now
Click to expand...
Click to collapse
if post (or better pastebin.com)
the errors I can look
I've not tested these instructions against froyo , but I did at least get a zip from froyo asop a while back
missing files stinks of a screwed up prop mk
Yes AOSP works fine
CM6 doesn't
I'll post the errors when I find the time to get it all set up.
That may not be for a while though .
frankdrey said:
Yes AOSP works fine
CM6 doesn't
I'll post the errors when I find the time to get it all set up.
That may not be for a while though .
Click to expand...
Click to collapse
I think cm6 still points to android.git.kernel.org (which is gone). I was gonna fork from cm and change it to the right place but I haven't got around to it yet....
tvall said:
I think cm6 still points to android.git.kernel.org (which is gone). I was gonna fork from cm and change it to the right place but I haven't got around to it yet....
Click to expand...
Click to collapse
Yes I fixed that part.
but there were a whole buncha repos missing, the alsa one is all i can remember right now
WOW! Very well done! I love how you cited your sources and everything.
I appreciate the time and effort you put into this. Definately makes for a great reference.
Sent from my HTC PH39100 using Tapatalk
Thank you very much for this great tutorial! Even if I knew already most of the things, it's very useful to have such a tutorial here. We will see if this tutorial helps to increase the number of active android developers ...
Btw.: this thread should become sticky.
AndDiSa said:
Btw.: this thread should become sticky.
Click to expand...
Click to collapse
+1
Sent from my HTC PH39100 using Tapatalk
Left for work and set up the repo sync. Hopefully when I get home I can get a compile going. Thanks!
This might be a little whack, but I am pretty tired that Google hasn't released an ARM version of google voice and video chat that allows dialing out and making telephone calls over a data-only connection.
What I have done so far, is using a micro instance on Amazon AWS, is to set up a virtual machine that has a virtual sound card.
Right now I am using a VLC session to dial out.. I think with a greasemonkey script or something this could be improved.
There are 4 things that need to work.
1: User A (android) --Audio--> [VM]
2: User A (android) <--Audio-- [VM]
3: [VM] --Audio--> User B
4: [VM] <--Audio-- User B
Progress:
1. This is the big one right now, I'm not great with android dev but what I want to do is encode the audio out from the mic to SIP and transfer it to the VM using RDP and then reroute that audio to the virtual microphone. Will utilize some combination of ffmpeg/vlc/arecord/aplay
2: This works (sorta), the VM is generating a VLC stream that I can access on android through RTP
3: This works, Using the virtual sound card (aloop module) "arecord -D hw:0,1,0 -f cd -t raw | aplay -D hw:0,1,0 -f cd &" creates a loop back
4: This works, with the command above, the audio in from User B(4) is heard by User B(3)
Here are my notes (sorry they are a mess). I hope to turn this into a step-by-step walkthrough once I get it going a bit more. It would be great if someone could look it over. I know a ton can be optimized (lower latency, less bandwidth for codecs, etc)
PHP:
sudo add-apt-repository ppa:chromium-daily/ppa && sudo apt-get update
sudo add-apt-repository ppa:chromium-daily
sudo apt-get install build-essential alsa xorg chromium-browser tightvncserver pulseaudio
sudo apt-get install libmp3lame0(?) lame gnome-term(not sure if this is still needed, installed for rygel attempt at config)
# FROM
apt-get install libncursesw5-dev gettext xmlto
adduser phone
login vnc: install voice and video chat
# FROM
wget ht[xdanolikelinks]tps://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb
dpkg -i --force-depends google-talkplugin_current_amd64.deb
apt-get -f install
cd /usr/src/modules
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.25.tar.bz2
tar xjvf alsa-driver-1.0.25.tar.bz2
cd alsa-driver-1.0.25
./configure --with-cards=aloop --with-sequencer=yes ; make ; make install
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.26.tar.bz2
tar xjvf alsa-lib-1.0.25.tar.bz2
cd alsa-lib-1.0.25
./configure ; make ; make install
wget ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-1.0.25.tar.bz2
tar xjvf alsa-firmware-1.0.25.tar.bz
./configure ; make ; make install
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.26.tar.bz2
tar xjvf alsa-utils-1.0.26.tar.bz2
./configure ; make ; make install
modprobe snd-aloop ; modprobe snd-pcm-oss ; modprobe snd-mixer-oss ; modprobe snd-seq-oss
/etc/modprobe
# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-aloop
# module options should go here
# OSS/Free portion
alias char-major-14 soundcore
# OSS/Free portion - card #1
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
# OSS/Free portion - card #2 (cmipci)
alias sound-slot-1 snd-card-1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
update-initramfs -u
#loopback audio
arecord -D hw:0,1,0 -f cd -t raw | aplay -D hw:0,1,0 -f cd &
-
Add pulseaudio headless to system startup
/etc/rc.local
su phone -c "vncserver :1 -geometry 800x600 -depth 8"
Configure xstartup for vnc server to start pulseaudio
nano /home/phone/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
pulseaudio -D
/etc/X11/Xsession
bashrc
pulseaudio -D
apt-get install vlc
edit vlc hosts file
nano /etc/vlc/lua/http/.hosts
Script: Screen server for cvlc audio routing
#!/bin/bash
screen -A -m -d -S cvlcserver cvlc -vvv pulse://alsa_output.0.analog-stereo.monitor --sout \
'#transcode{acodec=mpga,ab=32,channels:1}:rtp{sdp=rtsp://0.0.0.0:8080/test.sdp}'
echo 'Started, type screen -x to monitor'
GITHUB servers are up!
So I finally thought that I should make a guide to build from source as I feel like the one on the wiki is a bit outdated and isn't very clear.
I will cover both instructions for how to build for Ubuntu 13.04 (64 bit only), and OS X 10.8.x(PLEASE KEEP AT LEAST 35GB Free)
LINUX SPECIFIC INSTRUCTIONS
Please open a terminal window NOW. If you can't do this, don't build android. Please be vigilant in following in-terminal directions, such as pressing enter if it's asking you to do so or confirm something, and using sudo before a command will invoke a password prompt also if entering a new command, please wait until the command exits out to the bash prompt (asking for a new command)
First, let's get rid of the wrong java assuming it's already installed, Android will "REFUSE" to build properly with the wrong java.
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Now let's install the correct java,
Code:
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java6-installer && java -version
It should end with this
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
or something like it.
Now let's set up for making bacon!
Enter this in order to get dependencies for building android, please note that this is about 100-150 megs and will take a few minutes/10ish minutes depending on your computer and internet connection.
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
then,
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Repo is required for sucking sources from the cloud, so let's get it
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Now let's add this repo thing to our path
Code:
sudo nano ~/.bashrc
at the bottom of the file,add this
Code:
export PATH=~/bin:$PATH
now press Ctrl-O followed by Ctrl-X
restart bash by entering
Code:
source ~/.bashrc
now find a directory to build android in. Personally, I use /home/username/android
so for now let's place it in there
Code:
mkdir ~/android && cd ~/android && mkdir cm && cd cm
SYNC TIME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!x10^infinity!
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 && mkdir -p .repo/local_manifests && curl https://raw.github.com/teamuserdebug/page/manifests/manifests/cm10.1-aries.xml > .repo/local_manifests/local_manifest.xml && repo sync
make sure you acknowledge name, color, email etc, or you'll be sitting around and wasting time. this can take anywhere from 1 hr to 1 week depending on your internet connection, personally takes me 3-5 hrs.
go grab a starbucks and come back, you'll need it.
after it's done, make sure you are still in your cm directory.
IT'S BUILDING TIME
OPTIONAL: If you have some free space sitting around eg, 70-100 gigs for building android,
it's time to setup CCACHE, this speeds up future builds by "A LOT"
first edit .bashrc
Code:
sudo nano ~/.bashrc
add these lines at the bottom
Code:
export CCACHE_DIR=/home/-username-/.ccache
(Note, replace "-username-" with your computer username, without the dashes.
Code:
export USE_CCACHE=1
press Ctrl-O followed by Ctrl-X
enter
Code:
[CODE]source ~/.bashrc
[/CODE]
now enable ccache by entering
Code:
prebuilts/misc/linux-x86/ccache/ccache -M50
or
Code:
./prebuilts/misc/linux-x86/ccache/ccache -M50
if the first one doesn't work
BUILD TIME:
enter these
Code:
cd ~/android/cm
Code:
vendor/cm/get-prebuilts
Code:
. build/envsetup.sh
Code:
lunch cm_galaxys4gmtd-userdebug
Code:
mka clobber
Code:
mka bacon
It will be in ~/android/cm/out/products/target/galaxys4gmtd/cm-unofficial-something-something-signed.zip or something like that.
Make sure you don't pick the wrong zip file, because there are 2 or 3 in there.
OS X 10.8.x SPECIFIC INSTRUCTIONS
Please open a terminal window NOW. If you can't do this, don't build android. Please be vigilant in following in-terminal directions, such as pressing enter if it's asking you to do so or confirm something, and using sudo before a command will invoke a password prompt also if entering a new command, please wait until the command exits out to the bash prompt (asking for a new command)
First, let's install java if it's not already installed
Code:
java
Now, we MUST install X-Code otherwise we won't even be able to lunch.
1. Open the App Store
2. Find X-Code,(it's free) and install it [this is a 1+ GB download, and install]
3.Open X-Code and go to preferences. There you find a 'Downloads' tab. Open it and install “Command line tools” It will take a few minutes to download and install
Now let's set up for making bacon!
Download and install MacPorts, not Homebrew, since MacPorts is faster.
You can get the mountain lion pkg installer here
After it is installed, close and open terminal.
edit your bash profile
Code:
sudo nano ~/.bash_profile
add
Code:
export BUILD_MAC_SDK_EXPERIMENTAL=1
somewhere at the bottom
Press Ctrl-X, then y, then "enter/return" Note: Yes, the control key is used, not the command key, so don't be confused
Install dependencies to make bacon
Code:
POSIXLY_CORRECT=1 sudo port install git-core coreutils findutils gsed gnupg pngcrush repo
then
Code:
sudo ln -s /opt/local/bin/gfind /opt/local/bin/find && ln -s /opt/local/bin/gsed /opt/local/bin/sed
run
Code:
pngcrush
in terminal to make sure that things are properly in your path
THEY SHOULD BE since MacPorts edits your .bash_profile for you.
Now, we need a case-sensitive folder so we will need to make a sparseimage which you will have to mount every time you want to do something with your android builds.(like a DMG), but for now, this command will attach it for you. It will be on your desktop
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
Make the cm folder
Code:
cd /Volumes/Android && mkdir cm && cd cm
SYNC TIME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!x10^infinity!
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 && mkdir -p .repo/local_manifests && curl https://raw.github.com/teamuserdebug/page/manifests/manifests/cm10.1-aries.xml > .repo/local_manifests/local_manifest.xml && repo sync
make sure you acknowledge name, color, email etc, or you'll be sitting around and wasting time. this can take anywhere from 1 hr to 1 week depending on your internet connection, personally takes me 3-5 hrs.
go grab a starbucks and come back, you'll need it.
after it's done, make sure you are still in your cm directory.
Before we build, we have to fix an elf.h error
Code:
cp /Volumes/android/cm/external/elfutils/libelf/elf.h /usr/local/include
IT'S BUILDING TIME
OPTIONAL: If you have some free space sitting around eg, 70-100 gigs for building android,
it's time to setup CCACHE, this speeds up future builds by "A LOT"
install a ccache which is usable by mac
Code:
sudo port install ccache
edit your bash profile to use ccache.
Code:
sudo nano ~/.bash_profile
find the line that says
Code:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
and edit it to say
Code:
export PATH=/opt/local/libexec/ccache:/opt/local/bin:/opt/local/sbin:$PATH
press Ctrl-X, then y, then "enter/return"
then exit and reopen terminal
now configure ccache's memory
Code:
ccache -M50
BUILD TIME:
enter these
Code:
cd ~/android/cm
Code:
vendor/cm/get-prebuilts
Code:
. build/envsetup.sh
Code:
lunch cm_galaxys4gmtd-userdebug
Code:
mka clobber
Code:
mka bacon
It will be in /Volumes/android/cm/out/products/target/galaxys4gmtd/cm-unofficial-something-something-signed.zip or something like that.
Make sure you don't pick the wrong zip file, because there are 2 or 3 in there
nice, didn't take long to get it stickied either.
sent from within pure darkness
I know right!
Also, I have edited it for the mac version as well.
Now you guys can build on both mac and linux!!!!!!!!!!!!
Also, I will post when github stuffs are back up.
Thx. is this coming from a straight Unbuntu say setup without having to install a bunch of crap? I had that BBQLinux installed which is supposed to be for building android but it didn't have apt installed, so then tried yum to install that, and it didn't have that. lol. Just going to install Ubuntu on a VM and try your directions from a new install.
yes
but obviously you need to have wifi
airfluip1 said:
yes
but obviously you need to have wifi
Click to expand...
Click to collapse
Why do I need wifi?
i mean internet.
airfluip1 said:
i mean internet.
Click to expand...
Click to collapse
O ya, I got tonnes of that. lol. Thanks for the guide though. I've tried a few times to get a build environment going and it always goes wacky or I don't get something right.
i think that they are up now.
airfluip1 said:
i think that they are up now.
Click to expand...
Click to collapse
don't know, I'm getting fetch errors, url can't found, 404 and then when it's done, it craps out and says can't sync, too many fetch errors. Is this the servers still being down?
Maybe
Sent from my SGH-T959V using xda premium
airfluip, you might have been better off creating a local_manifest.xml file (though those are deprecated and now you can just create a manifest file called, for example, airfluip1_aokp.xml).
You're going to have to keep up with the platform_manifest changes and will have to resolve merge conflicts if the AOKP team decides to make some major changes (not unlikely).
You can actually add the changes you made to the manifest.xml into a custom manifest xml file similar to what we did with team acid's CM9/AOKP repos.
maybe, but I thought it was easier. I'll change it in a week or two.
Just thought I'd throw in that BBQLinux is arch based and for building android and linuxBBQ is NOT the same thing, it's probably the worst distro to start from to build android. In case someone else decides to go there.
airfluip1 said:
maybe, but I thought it was easier. I'll change it in a week or two.
Click to expand...
Click to collapse
Just as a way to make syncing source faster, you can also remove the device/kernel trees for other devices that aren't the SGS4G so that we can just download what's necessary for building for our phone.
yeah, I know. I'll do that later as well. I just don't have much time for a few weeks.
I got a rom compiled with your sources airfluip. I haven't flash tested yet.
I did run into problems with the SGS4GParts package so I had to remove it from galaxys4gmtd.mk, other than that the rom compiled fine. I'll help you look into the error later.
Thanks for the guide, easy to follow
EDIT
By the way, are you using TWRP in these builds, or is it CWM?
Code:
______ _____ __ __ _____
/\ _ \/\ __`\/\ \/\ \ /\ _ `\
\ \ \L\ \ \ \/\ \ \ \/'/'\ \ \L\ \
\ \ __ \ \ \ \ \ \ , < \ \ ,__/
\ \ \/\ \ \ \_\ \ \ \\`\ \ \ \/
\ \_\ \_\ \_____\ \_\ \_\\ \_\
\/_/\/_/\/_____/\/_/\/_/ \/_/
===========-Package complete-===========
zip: /home/fb/android/jb_aokp/work/out/target/product/galaxys4gmtd/aokp_galaxys4gmtd_unofficial_2013-05-14.zip
md5: c8fcc3417bab626ca6d018b88450ab42
size: 150M
========================================
It must have been something that I edited.
I am using CWm.
I don't like twrp very much.
It's always something....
I'm not sure if something changed since you made this tutorial but I can't seem to get this to build.
My first attempt resulted in the SGS4GParts error like FB mentioned. Which seems to have something to do with the TVOut setting.
Each attempt at rebuilding I seem to get different errors.
I also get this when building starts...normal?
Code:
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `src': No such file or directory
Edit: Is there a way to grab a log of the entire build output? Is it saved to a file somewhere?
LOL I am building right now.
The src error is normal
AND IF THERE IS A BUILD ERROR, POST A LOG IN PASTEBIN.
ALSO, THERE SHOULDN'T BE ANY BUILD ERRORS RIGHT NOW AS LONG as you
Code:
repo sync
before you do a new build.
Also you should run
Code:
make clobber && mka bacon
everytime.
OK so there maybe a easier way to get the packages after you install tsu but I went ahead and just shot for the command line so here are the steps.
1. pkg install tsu
2. pkg upgrade && update
3. pkg install aapt abduco abook abuild ack-grep alpine angband apache2 apk-tools apksigner apr-util apr apt argp aria2 asciinema atomicparsley attr autoconf automake autossh axel babl bash-completion bash bat bc binutils bison bmon boost brogue brotli bs1770gain busybox bvi byobu c-ares c-toxcore ca-certificates caddy calcurse cava cboard ccache ccrypt cgdb cmake cmark cmatrix cmus colordiff command-not-found coreutils corkscrew cowsay cpio cppi cscope ctags curseofwar cvs daemonize darkhttpd dash datamash dcraw ddrescue debianutils debootstrap dialog diffutils direvent dnsutils dos2unix doxygen dpkg dropbear dvtm dx ecj ecj4.6 ed elinks emacs erlang espeak exa expect fakeroot fd fdupes ffmpeg fftw figlet file finch findutils fish flex fontconfig fortune fossil freetype fribidi frobtads frotz fsmon fwknop fzf gawk gbt gcal gdb gdbm gdk-pixbuf gegl getconf getmail gettext ghostscript gifsicle git-crypt git glib global glulxe gmic gnuchess gnugo gnuit gnupg gnuplot gnushogi golang googletest gperf gpgme gpsbabel graphicsmagick graphviz greed grep gsl gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly gstreamer gtypist gzip harfbuzz hashdeep hexcurse hexedit heyu hfsutils htop httping hub hugo hunspell-en-us hunspell-ru hunspell hydra icecast iconv imagemagick imgflo indent inetutils inotify-tools ipcalc iperf3 ipfs ired irssi isync jhead joe jq json-c json-glib jsoncpp jupp kakoune kbfs keybase kona krb5 ldc ldns ledger leptonica less leveldb lftp libandroid-glob libandroid-shmem libandroid-support libarchive libassuan libbsd libbz2 libc++ libcaca libcairo libcln libconfig libconfuse libcroco libcrypt libcue libcurl libdb libedit libelf libev libevent libexif libexpat libffi libflac libgc libgcrypt libgd libgit2 libgmime libgmp libgnutls libgpg-error libgraphite libgrpc libgsasl libhdf5 libical libicu libid3tag libidn libidn2 libisl libjansson libjasper libjpeg-turbo libksba libllvm liblua liblz4 liblzma liblzo libmad libmesode libmnl libmosquitto libmp3lame libmp3splt libmpc libmpdclient libmpfr libmsgpack libnettle libnghttp2 libnl libnpth libogg liboggz libopus libopusenc libotr libpcap libpipeline libpixman libpng libpopt libprotobuf libpulseaudio libqrencode librsvg librsync libsasl libsndfile libsodium libsoup libsoxr libsqlite libssh libssh2 libtalloc libtermkey libtiff libtool libunibilium libunistring libunwind libutil libuuid libuv libvorbis libvpx libvterm libwebp libwebsockets libx264 libx265 libxapian libxml2 libxslt libyaml libzmq libzopfli lighttpd linux-man-pages littlecms lldb ltrace luarocks lynx lzip lzop m4 macchanger make man mariadb mathomatic mbedtls mc mdp megatools memcached mg micro mime-support minicom mlocate moon-buggy moria mosh mp3splt mpc mpd mpv msmtp mtools multitail mutt nano ncdc ncdu ncmpcpp ncurses ndk-multilib ndk-stl ndk-sysroot ne neofetch neovim net-tools netpbm newsboat nginx ninja nmap nnn nodejs-lts nodejs notmuch nyancat nzbget oathtool ocrad openal-soft openjpeg openssh openssl optipng opus-tools opusfile p7zip pango par2 parallel parted pass-otp pass pastebinit patch patchelf pathpicker pcre pcre2 perl pforth php pick picolisp pinentry pkg-config play-audio pngquant poppler postgresql potrace privoxy procps profanity proot psmisc pure-ftpd pv pwgen python python2 qalc qpdf radare2 ragel ranger rclone rcs readline redir redis remind resolv-conf rgbds rhash ripgrep rlwrap root-repo rsync rtmpdump ruby rust screen screenfetch scrypt sed sensible-utils serf sharutils silversearcher-ag sl socat sox squid sshpass stag stfl stow strace stunnel subversion syncthing tar tasksh taskwarrior tcl tcsh teckit termux-am termux-api termux-apt-repo termux-auth termux-create-package termux-elf-cleaner termux-exec termux-tools teseq tesseract texinfo texlive-bin texlive-tlmgr texlive tig timewarrior tintin++ tinyproxy tinyscheme tmate tmux toilet tor torsocks toxic tracepath transmission tree tsocks tsu tty-clock tty-solitaire ttyd ttyrec units unrar unzip utf8cpp utf8proc utfdecode util-linux valac valgrind vcsh vifm vim-python vim vorbis-tools vttest vtutils w3m wcalc weechat wget wireguard-tools wol x11-repo xmlsec xmlstarlet xorriso xvidcore yarn yasm zbar zile zip zsh zstd
If you read when I first posted I may of had errors. I don't now all pkg fixed.
AnthoneyAR said:
OK so there maybe a easier way to get the packages after you install tsu but I went ahead and just shot for the command line so here are the steps.
1. pkg install tsu
2. pkg upgrade && update
pkg install
$
Cut
Tsu
B
Jgjn
I love you
If you read when I first posted I may of had errors. I don't now all pkg fixed.
Click to expand...
Click to collapse
pkg install binutils
$
Jadesteele1991 said:
pkg install binutils
$
Click to expand...
Click to collapse
Of course my bro and I were messing around and found out about that but thank you for posting this way in the this thread.
AnthoneyAR said:
OK so there maybe a easier way to get the packages after you install tsu but I went ahead and just shot for the command line so here are the steps.
1. pkg install tsu
2. pkg upgrade && update
3. pkg install aapt abduco abook abuild ack-grep alpine angband apache2 apk-tools apksigner apr-util apr apt argp aria2 asciinema atomicparsley attr autoconf automake autossh axel babl bash-completion bash bat bc binutils bison bmon boost brogue brotli bs1770gain busybox bvi byobu c-ares c-toxcore ca-certificates caddy calcurse cava cboard ccache ccrypt cgdb cmake cmark cmatrix cmus colordiff command-not-found coreutils corkscrew cowsay cpio cppi cscope ctags curseofwar cvs daemonize darkhttpd dash datamash dcraw ddrescue debianutils debootstrap dialog diffutils direvent dnsutils dos2unix doxygen dpkg dropbear dvtm dx ecj ecj4.6 ed elinks emacs erlang espeak exa expect fakeroot fd fdupes ffmpeg fftw figlet file finch findutils fish flex fontconfig fortune fossil freetype fribidi frobtads frotz fsmon fwknop fzf gawk gbt gcal gdb gdbm gdk-pixbuf gegl getconf getmail gettext ghostscript gifsicle git-crypt git glib global glulxe gmic gnuchess gnugo gnuit gnupg gnuplot gnushogi golang googletest gperf gpgme gpsbabel graphicsmagick graphviz greed grep gsl gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly gstreamer gtypist gzip harfbuzz hashdeep hexcurse hexedit heyu hfsutils htop httping hub hugo hunspell-en-us hunspell-ru hunspell hydra icecast iconv imagemagick imgflo indent inetutils inotify-tools ipcalc iperf3 ipfs ired irssi isync jhead joe jq json-c json-glib jsoncpp jupp kakoune kbfs keybase kona krb5 ldc ldns ledger leptonica less leveldb lftp libandroid-glob libandroid-shmem libandroid-support libarchive libassuan libbsd libbz2 libc++ libcaca libcairo libcln libconfig libconfuse libcroco libcrypt libcue libcurl libdb libedit libelf libev libevent libexif libexpat libffi libflac libgc libgcrypt libgd libgit2 libgmime libgmp libgnutls libgpg-error libgraphite libgrpc libgsasl libhdf5 libical libicu libid3tag libidn libidn2 libisl libjansson libjasper libjpeg-turbo libksba libllvm liblua liblz4 liblzma liblzo libmad libmesode libmnl libmosquitto libmp3lame libmp3splt libmpc libmpdclient libmpfr libmsgpack libnettle libnghttp2 libnl libnpth libogg liboggz libopus libopusenc libotr libpcap libpipeline libpixman libpng libpopt libprotobuf libpulseaudio libqrencode librsvg librsync libsasl libsndfile libsodium libsoup libsoxr libsqlite libssh libssh2 libtalloc libtermkey libtiff libtool libunibilium libunistring libunwind libutil libuuid libuv libvorbis libvpx libvterm libwebp libwebsockets libx264 libx265 libxapian libxml2 libxslt libyaml libzmq libzopfli lighttpd linux-man-pages littlecms lldb ltrace luarocks lynx lzip lzop m4 macchanger make man mariadb mathomatic mbedtls mc mdp megatools memcached mg micro mime-support minicom mlocate moon-buggy moria mosh mp3splt mpc mpd mpv msmtp mtools multitail mutt nano ncdc ncdu ncmpcpp ncurses ndk-multilib ndk-stl ndk-sysroot ne neofetch neovim net-tools netpbm newsboat nginx ninja nmap nnn nodejs-lts nodejs notmuch nyancat nzbget oathtool ocrad openal-soft openjpeg openssh openssl optipng opus-tools opusfile p7zip pango par2 parallel parted pass-otp pass pastebinit patch patchelf pathpicker pcre pcre2 perl pforth php pick picolisp pinentry pkg-config play-audio pngquant poppler postgresql potrace privoxy procps profanity proot psmisc pure-ftpd pv pwgen python python2 qalc qpdf radare2 ragel ranger rclone rcs readline redir redis remind resolv-conf rgbds rhash ripgrep rlwrap root-repo rsync rtmpdump ruby rust screen screenfetch scrypt sed sensible-utils serf sharutils silversearcher-ag sl socat sox squid sshpass stag stfl stow strace stunnel subversion syncthing tar tasksh taskwarrior tcl tcsh teckit termux-am termux-api termux-apt-repo termux-auth termux-create-package termux-elf-cleaner termux-exec termux-tools teseq tesseract texinfo texlive-bin texlive-tlmgr texlive tig timewarrior tintin++ tinyproxy tinyscheme tmate tmux toilet tor torsocks toxic tracepath transmission tree tsocks tsu tty-clock tty-solitaire ttyd ttyrec units unrar unzip utf8cpp utf8proc utfdecode util-linux valac valgrind vcsh vifm vim-python vim vorbis-tools vttest vtutils w3m wcalc weechat wget wireguard-tools wol x11-repo xmlsec xmlstarlet xorriso xvidcore yarn yasm zbar zile zip zsh zstd
If you read when I first posted I may of had errors. I don't now all pkg fixed.
Click to expand...
Click to collapse
I my case none of this works...
by typing anything including "pkg", this is what I get:
/system/bin/sh: pkg: not found
Is there something missing? not installed?