Related
Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
andrew500 said:
Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
Click to expand...
Click to collapse
Think I finally got mine working yesterday.. latest Ubuntu in virtualbox... getting the right java version was the biggest PITA of the whole process. I'll have to go back an look at the size of the VDI but I think it was rather large...
andrew500 said:
Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
Click to expand...
Click to collapse
i'm trying to do it...but does'not able to upload apps on real device... see the post thread number 702847.
bye
andrew500 said:
Hello,
Has anyone built a development VM for android? Specifically for native development windows is less that useful.
I've started building up one with all the android tools, is there interest in releasing something like this as a sort of android quick start?
Click to expand...
Click to collapse
This is what I did... I think my VDI is like 18GB but I have two copies of the android source (eclair & froyo) so it could probably shrink if I removed one.
1) Install Virtual Box (www.virtualbox.org)
2) Create a new linux virtual machine with atleast 25GB dynamic drive
3) Install Ubuntu 10.04 32-bit version (http://www.ubuntu.com)
3a) Install Virtual Box Guest Additions
3b) Perform Ubuntu updates
4) Open Ubuntu Software Center
4a) Edit Menu => Software Sources
4b) Other Software tab and Add "deb http://cz.archive.ubuntu.com/ubuntu jaunty-updates main multiverse"
4c) Search for JDK, install Sun Java(TM) Development Kit (JDK) 5.0 sun-java5-jdk
5) Open System => Administration => Synaptic Package Manager
5a) Uninstall default-jdk, openjdk-6-jdk, openjdk-6-jre-lib, openjdk-6-jre-headless, icedtea-6-jre-cacao, ca-certificates-java
6) Open a terminal window, enter these commands:
$ sudo apt-get install git-core flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
$ cd ~
$ mkdir bin
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir android
$ ~/bin/repo init -u git://android.git.kernel.org/platform/manifest.git
$ ~/bin/repo init
$ cd android
$ make
*cough*
script it
do it that looks interesting to run yet depressing to build... I'll run it before school starts.. wait now I'm tempted to do crazy apt gets as i have karmic installed. maybe I can get away with it?
wow man those instructions look rough... but well worth doing.. from the starting out perspective. I need to stop.
I got an environment going from the android x86 project. but it has no sound, or wacom touchscreen support. the mouse worked differently on the m200 from the test run of the t60. lots of issues. but wifi on both worked. need kernel compiled{,?in?} modules for everything else it seems.
http://forum.xda-developers.com/showthread.php?p=6884690#post6884690
I sent a pm to move the thread.
Ok so I was searching and searching for a guide on how to compile CM7 source, and finally found a way to do it on the latest Ubuntu 11.10 oneiric
Updated info for non-debian based systems thanks to Vicodan:
If you want to use this on fedora or non-debian based systems you will need to replace every command that says apt-get to yum. Thanks to Vicodan for pointing this out as I do not use fedora myself.
Hardware Requirements:
- A minimum dual core pc, the more ram the better
- A working wifi connection
- Linux Operating System. Either 32-bit or 64-bit will work
NOTE: 64-bit will run faster
Optional Recommended Software:
Many of these can be found in the software center using the search box
If you find multiple versions it's ok to install them all, unless it says
otherwise
- Python
Alternatively open the terminal application and type
Code:
$ sudo app-get install python
Note: Enter your login password to install
- awk and gawk
- 7zip
- RAR
Code:
$ sudo apt-get install rar
Step 1 java:
Setting up java is one of the most important step to getting your pc prepared for a build environment. First check the java version that is installed on your pc
NOTE: On Ubuntu 11.10, and variants, you need to enable the
parter repository to install sun-java6-jdk:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
$ java -version
The correct version is:
Code:
java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
You must have a 1.6.x to compile on the gingerbread branch of cyanogenmod. If you have the correct version skip down to Step 2.
1a - First install the correct version:
Code:
$ sudo apt-get install sun-java6-jdk sun-java6-jre
1b - Now you will need to manually remove the other java version
Code:
$ sudo nautilus
This will open up a root file explorer. Once it opens click on the "file
system" tab on the left and navigate to the /usr/lib/jvm
Once there you should see two types of java. If you see java open jdk
you need to delete it, along with it's associated bin folder. Close the
root file explorer window
1c - Edit .bashrc
Next navigate to your home folder and open up the .bashrc file. This is
a hidden file so you will have to press Ctrl + H to see it. Add the
following lines to the top section, and change accordingly to your path
Example:
Code:
#JavaDev PATH
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24
export PATH=$PATH:$JAVA_HOME/bin
Save the file and exit, then changes will not take effect until reboot
Verify java version again
Code:
$ java -version
Step 2 - Install git
http://help.github.com/linux-set-up-git/
or
Code:
$ sudo apt-get install git
Step 3 - Prepare the Build Environment
NOTE: You only need to do these steps the first time you build.
If you previously prepared your build environment, skip to Copy
proprietary files.
3a - Install the ADB
Install the Android SDK. http://wiki.cyanogenmod.com/index.php?
title=Howto:_Install_the_Android_SDK
3b - Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
$ [COLOR="red"]sudo apt-get install[/COLOR] git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
Code:
$ [COLOR="red"]sudo apt-get install[/COLOR] g++-multilib lib32z1-dev lib32ncurses5-dev [COLOR="Red"]lib32readline-gplv2-dev[/COLOR] [COLOR="Red"]gcc-multilib g++-multilib[/COLOR]
3c - Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
$ mkdir -p ~/bin
$ mkdir -p ~/android/system
3d - Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
$ [COLOR="red"]curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo[/COLOR]
$ chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
Code:
$ cd ~/android/system/
$ [COLOR="red"]repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git[/COLOR]
$ repo sync
3e - Copy proprietary files
NOTE: This only needs done the first time you build. If you have
already done these steps, you may skip to Download RomManager.
You will need to have a speedy with a working copy of CyanogenMod
install and ADB working on the computer. This script will copy the
proprietary files from the device.
Connect the device to the computer and ensure that ADB is working
properly.
Code:
$ cd ~/android/system/device/htc/speedy/
./extract-files.sh
3f - Download RomManager
NOTE: This only needs to be done when an update to
RomManager is released. If you are-up-to date, you may skip to Building
CyanogenMod. Download RomManager which is needed by the build:
Code:
$ ~/android/system/vendor/cyanogen/get-rommanager
3g - Building CyanogenMod
Check for updates
First, check for updates in the source:
Code:
$ cd ~/android/system/
$ repo sync
$ cp build/core/root.mk -f Makefile
3h - Set up your Compiler
This is optional but helpful for kernel compiling
There are a lot of things that need to be added to the .bashrc to let your
pc know about which type of compiler you want to use. The best way is
to use the one provided in the CM7 work tree.
Code:
[COLOR="red"]#Android[/COLOR]
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export PATH=$PATH:~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
3i - Configure Build & Compile
Now, the environment must be configured to build and the ROM
compiled, from code, for the Speedy.
Code:
$ . build/envsetup.sh && brunch speedy
3j - Install
Copy your .zip file from
~/android/system/out/target/product/speedy/update.cm-XXXXX-
signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the
root of the SD card.
Flash both of these .zip files from recovery.
Nice write up. When I have time I'll see if it works for me.
riggsandroid said:
Nice write up. When I have time I'll see if it works for me.
Click to expand...
Click to collapse
Yeah this was a quick write up. The main thing is you have to reboot every time you edit your .bashrc, or copy and paste it into terminal
Also I'll be doing a how to compile kernel, hopefully soon
Or just when you change your bashrc, just source the bashrc script
. ~/.bashrc
Sent from my PG06100 using XDA App
Has anyone tried a swap file yet? I just set mine up and it seems to speed compiling up quite a bit. I went off of this guide but I made mine 1.6GB in size
https://help.ubuntu.com/community/SwapFaq
You are a savior... I have been trying to get this running on my natty tower, but have had little success... This write up will be very handy... Thank you for the excellent write up and the time for doing it...
Sent from my PG06100 using Tapatalk
New java update?
I noticed that my java was not all the way up to date. I went into recovery and selected fix broken packages and then it updated my java to this version:
~$ java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
On a side note it also updated my python and some other things. Make sure you have internet that is not wifi
guide updated for korg workaround. Changes are labeled in red
Repo not found?
Followed Directions to the T, Currently Hung up on
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
Tells me repo command not Found
EDIT: I'm sorry hows about more info?, Ubuntu 11.10 64bit need anymore just ask
Nice guide. Can I do this on Fedora?
riggsandroid said:
Nice write up. When I have time I'll see if it works for me.
Click to expand...
Click to collapse
...6 months later.
Ya find any of that time yet, Riggs?
JaceAlvejetti said:
Followed Directions to the T, Currently Hung up on
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
Tells me repo command not Found
EDIT: I'm sorry hows about more info?, Ubuntu 11.10 64bit need anymore just ask
Click to expand...
Click to collapse
Did you set up ~/bin/repo yet? Never had that issue before. Probably need to reboot once for the repo to take effect. Just like it says on the OP.
Sent from my PG06100 using xda premium
VICODAN said:
Nice guide. Can I do this on Fedora?
Click to expand...
Click to collapse
I wish I knew more about fedora, but I just don't, sorry.
Sent from my PG06100 using xda premium
sparksco said:
I wish I knew more about fedora, but I just don't, sorry.
Sent from my PG06100 using xda premium
Click to expand...
Click to collapse
It works fine on fedora just change the apt-get to yum
Great guide, thanks sparksco
Sent from my PG06100 using Tapatalk
VICODAN said:
It works fine on fedora just change the apt-get to yum
Click to expand...
Click to collapse
Sweet thanks for pointing that out. I've been meaning to update this guide when I have time later when I get home I'll update more info on it. I've also been wanting to try fedora for quite some time.
Sent from my PG06100 using xda premium
jesusice said:
...6 months later.
Ya find any of that time yet, Riggs?
Click to expand...
Click to collapse
I was wondering about this too
Sent from my PG06100 using xda premium
OP updated
Updated OP to include Vicodan's instructions and this is to build kanged editions of Cyanogenmod. I will also start posting my own versions of the kanged builds here when I get a build that will include my own extra mods.
Awesome guide. I'll be trying this soon. Tonight, if the wife and kids cooperate. Which usually translates to 'a week from now' lol...
Sent from my SPH-D700 using Tapatalk
NawtyB78 said:
Awesome guide. I'll be trying this soon. Tonight, if the wife and kids cooperate. Which usually translates to 'a week from now' lol...
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Its all good. me and sparksco use regular Ubuntu and it runs great
Okay this little package has been the bane of my resoning with g++ and build essentials I found the fix for it as I was playing with 2.3.6 webtop and trying to fix synaptic getting stuck at preparing packages, still looking into it but this needs to get out there.
Okay problem:
libc6-dev cant install due to needing to overwrite package in rootfs
simple fix when you run into this download this and this
and from the terminal run:
sudo dpkg -i --root=/osh --force-all libc6-dev_2.9-4ubuntu6_armel.deb linux-libc-dev_2.6.28-19.66_armel.deb
and resume your stuck install:
sudo apt-get -f install
update: noted a linux-libc complaint from dpkg on my latest webtop setup, updated instructions accordingly.
This seems interesting. Does force install the package break dependencies?
Hi, i try but the error not gone... can you help me?
when i run sudo apt-get -f install the result is:
18 upgraded, 100 newly installed, 21 to remove and 107 not upgraded.
2 not fully installed or removed.
Need to get 0B/43.7MB of archives.
After this operation, 80.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
E: Internal Error, Could not perform immediate configuration (1) on libc6
The same error is present in every instalation and i cant install nothing
tks
Setting up WebTop environment
Prerequisites
You have to have your phone rooted and SU installed. There are number of exploits and tools available depending on the phone.
Naturally you should already have either Motorola HD Multimedia Dock or whatever webtop capable dock comes with your phone. Good idea to plug it into hdmi capable display and have keyboard+mouse attached to it.
webtop2sd
It is recommended that you do not modify the WebTop environment in phone's own flash, but instead create a partition on SD card and use webtop2sd utility to copy phone's WebTop. webtop2sd will then mount this partition ontop of the phone's own stuff and if it get's screwed up you'll be able to go back to the blank slate and use your phone's WebTop again.
Get webtop2sd and instructions here.
In my experience running webtop configurator to install lxterminal did not work the first time. I had to reboot the phone one more time, and upon running webtop configurator again - lxterminal installed fine.
webtopscripts
Package management is horribly broken in webtop due to manufacturers doing weird things to it, and possibly breaking it on purpose. To fix stuff, so that apt-get works again - use webtopscripts. Download from Google Code and follow the instructions. Setup script walks through all of the fixes - there is no need to run individual scripts.
After this you get Ubuntu Jaunty in more or less usable state. Time to install packages and tweak.
Basic tweaks
The first thing you want to do is disable (or possibly re-configure) xscreensaver. By default it will show nasty looking day-glo colored waves on the screen in colors that hurt eyes like acid. Open LXTerminal - (there should be a button for it on the dock at the bottom of the screen) and run:
Code:
kill $(ps -ef | grep 5000 | grep xscreensaver | cut -c10-15).
Another good thing to kill is webtop-wallpaper. Its a desktop window layered underneath everything else and displaying wallpaper and maybe icons? Anyway this stuff is bad. Kill it:
Code:
kill $(ps -ef | grep 5000 | grep webtop-wallpaper | cut -c10-15)
This changes have effect only temporarily until webtop shuts down, which is either when phone runs out of memory and garbadge collection kicks in or when it's powered off. Note that undocking the phone preserves your session!
For more permanent solution - we need to edit startup scripts, but first we need something to edit those with - my personal low tech favorite - nano:
Code:
sudo apt-get install nano
Also useful the text-mode file manager Midnight Commander :
Code:
sudo apt-get install mc
Both nano and mc are great in large measure because they don't depend on other packages.
Now we can edit the config files:
Code:
sudo nano /osh/usr/local/bin/start-oshwt-1.sh
and comment out xscreensaver line.
Unfortunately as Webtop is using older version of Ubuntu - it runs circa 2009 version of gnome-settings-daemon, which automatically starts xscreensaver with no way to stop this behavior. The only way is to comment out gnome-settings-daemon out of start-oshwt-1.sh, but that will also disable webtop-panel, which is still useful for us until we get AfterStep up and running. Meanwhile use the kill code from above.
Code:
sudo nano /osh/usr/local/bin/start-oshwt-2.sh
and comment out webtop-walpaper line.
With annoyances taken care of we can now start with with the useful stuff.
Getting the AfterStep
AfterStep package in Jaunty is old and broken in webtop environment, therefore it is recommended to install AfterStep from the source code. Naturally we need some tools :
Code:
sudo apt-get install cvs
sudo apt-get install openssh-client
Strictly speaking ssh client is not required unless you want write access to CVS repository, but it's still useful to have around. Checkout AfterStep sources :
Code:
cvs -d :pserver:[email protected]:/home/cvsroot login
cvs -d :pserver:[email protected]:/home/cvsroot co afterstep-stable
Note: Just hit Enter when prompted for login password
Compilation
Prerequisites
Naturally, to be able to compile AfterStep we need the compiler :
Code:
sudo apt-get install gcc
That will install gcc 4.3 and binutils. Suggested packages : gcc-multilib, manpages-dev, autoconf, libtool, and if you want to do some debugging - gdb.
Code:
sudo apt-get install autoconf
Also installs automake, autotools-dev and m4.
Code:
sudo apt-get install libtool
Also for some reason compilation won't work without floating point library:
Code:
sudo apt-get install libmpfr-dev
Useful libraries for AfterStep:
Code:
sudo apt-get install libfreetype6-dev
sudo apt-get install zlib1g-dev
Naturally, we need Xorg devel libraries :
Code:
sudo apt-get install xorg-dev
More useful stuff (Optional):
Code:
sudo apt-get install x11-utils
sudo apt-get install nedit
MS Core Fonts, so that you can use Helvetica, Courier, Times, etc. fonts (Optional):
Code:
sudo apt-get install ttf-mscorefonts-installer
Compilation
The actual compilation step should be quite painless:
Code:
cd afterstep-stable
./configure
make
sudo make install
At this point you should have AfterStep installed in /usr/local/bin (binaries) and /usr/local/share/afterstep (data files). Now we need to setup the system to make good use of it.
System Configuration
Files to change :
/etc/xdg/lxsession/LXDE/config : Replace window_manager line with : window_manager=afterstep -l /home/adas/afterstep.log
/etc/xdg/lxsession/LXDE/default : Comment out xscreensaver, openbox and lxpanel lines.
/usr/local/bin/start-oshwt-1.sh : Comment out gnome-settings-daemon and xscreensaver lines. Apparently fcitx does not work anyway - not sure why they have it in there.
/usr/local/bin/start-oshwt-2.sh : Comment out awn-autostart, webtop-panel, window_switcher and avahi_start lines Note: You can always re-enable webtop-panel, just make sure you start gnome-settings-daemon first. See screensaver notes above.
AfterStep configuration
Copy autoexec file to your home .afterstep dir:
Code:
cp /usr/local/share/aftertep/autoexec ~/.afterstep/
And comment out WorkstateSpace line, as it may trigger duplicate aiw windows and some other weird things due to the way Webtop organizes its X session.
Finally
Reboot.
At this point you should be all set. Pull the phone out of the dock and reboot it. Put it back in and you should have AfterStep desktop in a few seconds.
If you happened to break things and Webtop don't start - you should be able to recover by double checking or reversing above changes in config files. The files are located under /osh mount point when viewd using Root Explorer on the phone itself.
Worked perfectly!
BUGS
Not detected!
Kernel source:
. github.com/OpenDesireProject/android_kernel_htc_msm7x30
DOWNLOAD [UNOFFICIAL] Android 4.4.4 for HTC Desire HD
LINK: mediafire.com/download/5owaikw5aaw39dt/cm-11-20150317-UNOFFICIAL-ace.zip
DOWNLOAD GAPPS 4.4.4
LINK: mediafire.com/download/4kc4f4jok4dppu7/pa_gapps-modular-micro-4.4.4-20150308-signed.zip
--------------------------------------------------------------------------------------------------------
ALTERNATIVE LINKS:
1. cm-11-20150317-UNOFFICIAL-ace: dropbox.com/s/oytan6p71xrc7td/cm-11-20150317-UNOFFICIAL-ace.zip?dl=0
2. pa_gapps-modular-micro-4.4.4-20150308-signed: dropbox.com/s/ciziuwd24qjb5f5/pa_gapps-modular-micro-4.4.4-20150308-signed.zip?dl=0
3. philz_touch_6.40.7-ace(recovery img): dropbox.com/s/yiapu54pe1abbhl/philz_touch_6.40.7-ace.img?dl=0
Installation instructions:
1. Download [UNOFFICIAL] Android 4.4.4 Cyanogenmod
2. Download gapps
3. Put the files on SD card
4. Reboot to recovery
5. Do factory reset (wipe data/factory reset)
6. Flash cm-11-20150317-UNOFFICIAL-ace.zip
7. Flash gapps zip
8. Remember to flash boot.img via fastboot if you have S-ON
9. Reboot and enjoy
----------------------------------------------------------------------------------------------------
IMPORTANT: IF YOU SEE (error 7) or something else when try to install the system!
You have to upgrade your recovery img !!!
LINK RECOVERY IMG: mediafire.com/download/69palfa58fdz876/philz_touch_6.40.7-ace.img
INSTRUCTION TO UPGRADE YOUR recovery.img
1. USE: Ubuntu 12 or 14 - 64bit
2. Install Android SDK platform tools if you do not have it. The Ubuntu SDK is available for Ubuntu 14.04 (Trusty) onwards!
3.
HTML:
1. $ sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
2. $ sudo apt-get update && sudo apt-get install ubuntu-sdk
3. $ sudo apt-get update && sudo apt-get dist-upgrade
4. $ sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
5. $ sudo apt-get update && sudo apt-get upgrade
4. Reboot to bootloader, open your terminal and navigate to the location of your boot.img and type:
5.
HTML:
fastboot flash recovery YOUR.img
-----------------------------------------------------------------------------
The kernel source of system "lollipop" android 5.0 still have alot of bugs, but you will wait
Just click on "Thanks" button if you want, it is not hard
Enjoy
question
thanks for this! i want to try but i cant download anything from mediafire, you can put this file on another site for download like google drive?
Ok, I will create alternative links
Camera not working
recording does't work
/ sorry my bad engilsh i from poland )
DaV97 said:
recording does't work
/ sorry my bad engilsh i from poland )
Click to expand...
Click to collapse
If your camera wont work, you have to try to set on "480p" and then restart the phone and test again! I guess then everything will be fine!
Аnyway. My camera worked on HD 720p Perfectly and Sound Recorder also
I hope I've helped!
You should mention that you got the kernel source code from:
https://github.com/OpenDesireProject/android_kernel_htc_msm7x30
at least so you don't violate the GPL.
Take a look at this link for instructions http://forum.xda-developers.com/showthread.php?t=2354418
Not to mention that you simply recompiled builds from http://opendesireproject.org/ without giving the slightest credit.
hussamT said:
You should mention that you got the kernel source code from:
https://github.com/OpenDesireProject/android_kernel_htc_msm7x30
at least so you don't violate the GPL.
Take a look at this link for instructions http://forum.xda-developers.com/showthread.php?t=2354418
Not to mention that you simply recompiled builds from http://opendesireproject.org/ without giving the slightest credit.
Click to expand...
Click to collapse
Ok man!