[WebTop] - [HowTo] - Setup WebTop environment with AfterStep as a window manager - Atrix 4G General

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.​

Related

[HOWTO] using dropbear sshd

This is going to be patently obvious to anybody familiar with Android, but I just started poking around and it wasn't clear to me how to do it. I figured I'd post it here if anybody else is in the same boat
1) Download CyanogenMod - build probably doesn't matter much, I used the I9000 ROM from this thread (n.b. - if you know of a trusted source to get current dropbear binaries, you don't need to download the huge CM zip, but I didn't see any floating around)
2) Extract the zip. You only need two files:
Code:
system/xbin/dropbear
and
Code:
system/xbin/dropbearkey
3) Navigate to the directory that contains those files using your favorite shell.
4) Push these to your device. This requires ADB (which is included in the Android SDK) in your path, it requires that your phone is rooted, and it requires that /system is mounted rw:
Code:
adb push dropbear /system/xbin/
adb push dropbearkey /system/xbin/
5) Run the following from 'adb shell' or a root terminal on your phone:
Code:
mkdir /data/dropbear; mkdir /data/dropbear/.ssh
(aside - why is there no -p option to my mkdir? weird)
6) From here, you can follow the instructions on the CM wiki and you're good to go!

[GUIDE] Lazyman's installation guide to ADB on Ubuntu 10.10 - Now with Ubuntu 11.10 !

I've been searching around the forums,the stickies and Google on how to install ADB in Ubuntu from scratch but I wasn't able to get a guide anywhere. What I found mostly are for Windows or little bits and pieces of info which did not cover the whole thing. Which is when I decided to grab some Tab and Mountain Dew, and Google my way through to make it work and share it to those who had trouble or no idea how to install it on Ubuntu.
When I'm writing this, I'm using Ubuntu 10.10 64bit to install and run everything. I will update the guide periodically for updates and other things. There was mentions of using Eclipse SDK while searching around, but I won't be touching on that. There's another guide for it at the end of my guide. I have yet to encounter any problems while using ADB in 64bit environment. I've tested it out on the 32bit platform as well and it works. It'll also work on SD and NAND versions of Android for the HD2, since it's my main phone. Also, this is my first time making a guide, so bear with me if there's any mistakes. I've checked the article a few times hoping that it's clear and easy to understand. From
Steps 1 to 4 and Steps 6 and 7, there's no differences in installation instructions for Ubuntu 11.04. You do have to take special note in Step 5 and the key difference of ADB working for your device in Ubuntu 11.04 is found here.
For Ubuntu 11.10, you can see the guide here. Credit goes to loveubuntu for making it.
Step 1. Install JDK
You'll need to install JDK for ADB to work. If you have already installed JDK, I recommend reinstalling it again, just in case there are new updates or you have the older version.
In Terminal, do the following
Code:
$ sudo add-apt-repository ppa:sun-java-community-team/sun-java6
$ sudo apt-get update
$ sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
Edit: If you're getting a "404 Not Found" when trying to install java in Ubuntu 11.04, this link here will give you a quick fix.
Edit: If you want or need to use Eclipse, here's a simple installation command
Code:
$ sudo apt-get install eclipse ruby rubygems ruby-dev libxml2 libxml2-dev libxslt-dev openjdk-6-jdk ant git
$ sudo gem install nokogiri
Step 2. Download and Install Android SDK
Download the Android SDK. Obviously, choose the one for linux (android-sdk_rXX-linux_86.tgz), where "rXX" is the latest version.
Code:
http://developer.android.com/sdk/index.html
Extract the android-sdk-linux_x86 folder from android-sdk_rXX-linux_x86.tgz. Just double click the tgz file, and drag-n-drop the that lone folder to your desired location. In my case, I extracted the files to my Home Folder, which I highly recommend. I'll also advice to not renaming the folder.
Step 3. Choose packages to install
In Terminal, type the following -
Code:
$ cd ~/android-sdk-linux_x86/tools
$ ./android update sdk
The 'Android SDK and AVD Manager' window will appear (screencap below). You can choose to accept all of them or just install all except for Android 1.5 and 1.6. Once installation is finished, it will prompt you to restart the manager. Just click 'Yes' and close the manager
Step 4. Check your device's permission
Now head over to the platform-tools directory
Code:
$ cd ~/android-sdk-linux_x86/platform-tools
Check if you have permission for your device
Code:
$ ./adb devices
If you're getting the following, go on to Step 5.
Code:
List of devices attached
???????????? no permissions
If you're getting something like this or other random numbers with the word device next to it, congrats! You now could use ADB. Now go on to Step 7.
Code:
List of devices attached
0123456789ABCDEF device
Step 5. Giving permission to your device
You'll need to create a certain udev rule. First off type the following in Terminal:
Code:
$ sudo gedit /etc/udev/rules.d/99-android.rules
For those using Ubuntu 10.10, use the following! For Ubuntu 11.04 users, please scroll down a little for 11.04 guide.
Ubuntu 10.10
Once the gedit window pops-up, type the following line.
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
Take note of ATTRS{idVendor}=="####". Replace #### to the correct Vendor ID of your device. If you're using Acer, then it's 0502, for HTC it's 0bb4. ADB might not be able to detect your device if you use the wrong ID. Here's a list of each vendor's ID. Source: http://developer.android.com/guide/developing/device.html
Code:
Manufacturer USB Vendor ID
Acer -0502
Dell -413c
Foxconn -0489
Garmin-Asus -091E
HTC -0bb4
Huawei -12d1
Kyocera -0482
LG -1004
Motorola -22b8
Nvidia -0955
Pantech -10A9
Samsung -04e8
Sharp -04dd
Sony Ericsson -0fce
ZTE -19D2
Save the file and exit out of gedit. Back in Terminal execute the following
Code:
$ sudo chmod a+rx /etc/udev/rules.d/99-android.rules
$ sudo restart udev
For Ubuntu 11.04. Special thanks to mmdl1001 for figuring this one out! Would've posted it earlier Ubuntu 11.04 was a little nasty on my PC for me to test it out. VMWare saved me though...
For Ubuntu 11.04 users, you'll need an 8 digit number, which is slightly different from Ubuntu 10.10. Copy and paste the following code in the 99-android.rules file you created
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
Next, you'll need to find the digits to replace "####:####' above. In terminal type
Code:
$ lsusb
You should be getting a list like so. Note that what is generated in your PC will be much different from mine below!
Code:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c019 Logitech, Inc. Optical Tilt Wheel Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 010: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 007: ID 22b8:2d66 Motorola PCS
Look for your device. It's easily identifiable via its brand . In this case, "Bus 001 Device 007: ID 22b8:2d66 Motorola PCS" is for my device. Copy the ID numbers, 22b8:2d66 for my case, and replace the ####:#### in the 99-android.rules file. Save the file and close gedit and execute the following in Terminal.
Code:
$ sudo service udev restart
Now to check if it works
Code:
$ ./adb devices
You should be getting the following line or something similar.
Code:
List of devices attached
0123456789ABCDEF device
Congrats! Now you can use ADB in Ubuntu! Now hop on to Step 6!
If that fails and still give you "???????????? no permissions", try restarting the adb server. That should do the trick. If that still doesn't work, check the file, 99-android.rules, that you created earlier. Most likely you have put in the wrong Vendor ID.
Code:
$ sudo adb kill-server
$ sudo nohup adb start-server
Step 6. Now to have fun!
Head down to Captainkrtek's ADB Workshop and Guide for everyone to learn how to use ADB. Take note that while using adb in Linux, you'll need to type ./adb to execute adb unless you create a path in bashrc. Go to Step 7 for that . For now, here are some examples on running adb if you don't create a path.
To get into the phone
Code:
[email protected]~/android-sdk-linux_x86/platform-tools:~$ ./adb shell
To grab files from phone
Code:
[email protected]~/android-sdk-linux_x86/platform-tools:~$ ./adb pull /system/etc/file.txt file.txt
To send file to phone
Code:
[email protected]lelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb push this.txt /sdcard/this.txt
Also, do take note that when you pull a file, it will save itself in your android-sdk-linux_86 folder if no destination folder was given.
Step 7. Create path for ADB
Code:
$ sudo gedit ~/.bashrc
Add the following line at the very end of the file. Once you're done, save and exit.
Code:
# Android tools
export PATH=${PATH}:~/android-sdk-linux_x86/tools
export PATH=${PATH}:~/android-sdk-linux_x86/platform-tools
Now you can just run adb like it's a command.
Edit: Okay, for some odd reason, while the above worked for my desktop, it failed when I tried it on my notebook. If you tried to create a path but it failed, here's an alternative method
Code:
$ gedit ~/.profile
Once the gedit window pops up, scroll down to the very bottom of the file and add this line
Code:
[...]
PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"
Once you've saved and closed gedit, run the following command in Terminal
Code:
export PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"
And that's about it. Feel free to comment, give suggestions or ask questions if you're still unsure.
Also for more in-depth guide, try HowtoForge. Just found this guide today and I find it VERY useful and even have a good guide on Eclipse.
Took me about 10 mins to get this going. Thank you very much!
I have a guide to setup up a build enviroment for compiling android on a ubuntu 10.10 64bit or 32bit that covers adb also along with test signing. Just google guide to compiling android, covers cm7 and you will find it. It might be under gridlock32404 which was my old user name
Sent from my HTC Vision using XDA App
ffffffffuuuuuuuu where was this last year? took me 2 days to get ADB working in Ubuntu 10.04 lol.
i do have the Ubuntu 10.10 ISO image...thinking about dual booting with win7 64bit.
not sure why i want to go back to Linux though...games ran slower on it =/
Amazing work man. It works like a charm with my milestone.
nice tutorial but it would be even nicer to have a .deb; I never made debs before but I think this should all be doable with rpm though, so I guess it should also be doable with debs
(eg with a postinstall script update udev rules, using sed, restart abd and add a .desktop file)
saved a lot of do it myself
i was about to do this thank you for doing it first nice
I get following error when i try to refresh sources.
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: java.lang.RuntimeException: error instantiating default socket factory: java.security.KeyManagementException: java.security.KeyStoreException: java.io.FileNotFoundException: /usr/lib/jvm/java-1.5.0-gcj-4.4/jre/lib/security/cacerts (No such file or directory)
Click to expand...
Click to collapse
Edit:- I installed all packages like openjdk, openjre, icedtea etc and i was able to connect to google repo.
thanks Im installed
atapia984 said:
Took me about 10 mins to get this going. Thank you very much!
Click to expand...
Click to collapse
You're welcome! Honestly, it took me about 2 to 3 hours to get it running.
godutch said:
nice tutorial but it would be even nicer to have a .deb; I never made debs before but I think this should all be doable with rpm though, so I guess it should also be doable with debs
(eg with a postinstall script update udev rules, using sed, restart abd and add a .desktop file)
Click to expand...
Click to collapse
Personally, I don't think a .deb file is required. Almost everything can be found in the repository anyways and it's quite easy to set up using terminal, and uh, I never really made debs before either
thank u very muchhhhhhhhhhhhhhhhhhhhhhh, ADB was big problem with me .
thanks again.
sdk now says "x86"
I'm not sure if anyone else had this problem, but I was foolishly copying and pasting the commands over from the OP and it didn't work.
However, when I realized that the SDK package is now titled "android-sdk-linux_x86" with that tiny little "x" before the "86", I got it to work flawlessly.
Now my Ubuntu ADB installation works easier than my Windows ADB!
could someone tell me if you can run movie after you run ubuntu on your PDA
expeciali .mkv video...
please ansevar me...
strikeir13 said:
I'm not sure if anyone else had this problem, but I was foolishly copying and pasting the commands over from the OP and it didn't work.
However, when I realized that the SDK package is now titled "android-sdk-linux_x86" with that tiny little "x" before the "86", I got it to work flawlessly.
Now my Ubuntu ADB installation works easier than my Windows ADB!
Click to expand...
Click to collapse
Thanks for the heads up! I've updated the guide accordingly. Looks like they've changed the name with revision 10
Cool write up. definitely bookmarked.
only because i want to compare it to the method i used to get it running earlier. There are a lot of extra steps it looks like with this method that i didn't do earlier.
Thanks. First method to add to path didn't work, but second did finely.
very nice, thank you. Only three hints that helped me get everything working perfectly:
1- Assume you have no permission and create the udev rule step. In that same step when typing
Code:
./adb devices
to see if it worked, make sure you cd to the right directory. You have to be in
Code:
cd ~/android-sdk-linux_x86/platform-tools
.
2- In step 7 creating paths, eliminate the space between {PATH}: and ~/android. If left that way, the terminal gives you a not valid identifier error.
3- The Howtoforgelink at the bottom is very nice also but note that they are using an older SDK and file name has to be changed if you want the latest (add the x).
I hate the fact that most guides out there for a Linux based OS (Android) is written for Windows. Quite ironic. Thanks again for your hard work.
loveubuntu said:
very nice, thank you. Only three hints that helped me get everything working perfectly:
1- Assume you have no permission and create the udev rule step. In that same step when typing
Code:
./adb devices
to see if it worked, make sure you cd to the right directory. You have to be in
Code:
cd ~/android-sdk-linux_x86/platform-tools
.
2- In step 7 creating paths, eliminate the space between {PATH}: and ~/android. If left that way, the terminal gives you a not valid identifier error.
3- The Howtoforgelink at the bottom is very nice also but note that they are using an older SDK and file name has to be changed if you want the latest (add the x).
I hate the fact that most guides out there for a Linux based OS (Android) is written for Windows. Quite ironic. Thanks again for your hard work.
Click to expand...
Click to collapse
Thanks, I'm gonna try it out on my notebook when I get a chance on Monday. Left it at my workplace. Hopefully, that little space is the reason why the path didn't work on my notebook .
As for the HowtoForge guide link, I wasn't able to find a more updated version for it. It'll be great if they update that guide as well though.
It really is kind of sad, and ironic, that Windows is dominating even on a Linux based OS which is Android. But after playing around with both Windows and Ubuntu for ADB, I personally find ADB on Ubuntu is much more easier (and a bit more stable) to handle. Maybe it's because I usually work with command line on Linux and more on GUI on Windows.
I came across this thread on DF also that seems to be very helpful. CorCor67 put a lot of time into it.
http://www.droidforums.net/forum/droid-themes/129400-themer-studio.html
I cross referenced both threads for those looking
Anybody know howto - about fastboot.exe I mean I have done all the steps ahead and have adb installed but cant figure out how to install fastboot in platform-tools directory.
I reinstalled it again but there is no fastboot.exe it hadn`t appeared in platform-tools. 3 month`s ago I did it just like that and it installed fastboot automagically but this time I just don`t now what to do and where to dig. Not able to flash radio at the moment.
Ubuntu 10.04
Desire HD

[GUIDE]Compile CM7 AOSP (Kanged edition) For Speedy on Linux

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

[Fix] libc6-dev [Finally g++ build-essentials and more]

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

Guide for Compiling a kernel for the Tubuntu app by x3maniac and TF101

Guide for Compiling a kernel for use with the Tubuntu application by x3maniac and TF101.
These insturctions work with 64bit Linux laptop/PC's, version 4.5.4 for the armhf toolchain, and 2.6.36 kernel version. The toolchain and kernel from the github below is the direct source x3maniac makes the kernels we are currently using. Please understand a few things, if you add modules to this build you will need to add them to your Linux image you are using. I'll provide specifics as I work through the learning process as well. If you change compilers or upgrade the software components outside of this guide it may produce errors or problems.
If you are looking for making a version 3 kernel, hardware acceleration with nvidia and things like that you will either have to ask x3maniac or do your own research as this guide does NOT tell you how to do this.
******My directories reference my own username on my laptop, please substitute "thomas" with your username OR your /home directory, or whichever directories you wish to use. I used full paths on purpose for my own learning and to be specific for newcomers to Linux who wish to learn to compile.******
All credit goes to the time and consideration x3maniac took to assist me with doing this!
OP for Tubutnu by x3maniac
1. Open Terminal. Everything will be executed from Terminal.
2. Now type: sudo apt-get abootimg
3. Now type: mkdir /home/thomas/kernelbuild
3a. Now type: cd /home/thomas/kernelbuild
4. Now type: git clone https://github.com/novaspirit/tf101-linux-2.6.36
5. Now type: git clone https://github.com/novaspirit/Ubuntu_initrd-3.x.git
6. Now type: git clone https://github.com/novaspirit/config.git
6a. The config.git has a file called /config/boot.cfg, you could modify the last line called the command line and have it boot from alternate locations, the default is fine and set to /dev/mmcblk0p8. So let's not touch it, you can use nano to edit this file.
7. Now type: git clone https://github.com/novaspirit/android-toolchain-4.5.4.git
8. Now type: cd /home/thomas/kernelbuild/tf101-linux-2.6.36
9. Copy this into Terminal and hit enter: sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
10. Copy this into Terminal and hit enter: sudo apt-get install libgtk2.0-dev libglib2.0-dev libglade2-dev (this allows you to make a GUI of the config file)
11. Now type: make help (you should see a list of build targets. You are looking to see if you have tf101_gnulinux_defconf.)
12. Now type: export ARCH=arm
13. Now type: export CROSS_COMPILE=/home/thomas/kernelbuild/android-toolchain-4.5.4/bin/arm-eabi- (understand the arm-eabi- simply ends with the hypen to include sub components, it's not a typo)
14. Now type: make tf101_gnulinux_defconfig
15. Now type: make gconfig (the GUI pops up and this is where you can select options). Click on split, the options will be on the left. This is where you can select what you wish to add. For example, web cam and GPS functions. HOWEVER, it does not mean this will work nor is it all perfectly set up. There may be some additional research by YOU the reader to find out what will or won't work with this kernel. (NOTE: you must run make gconfig even if you don't change anything otherwise an error will occur when you run make -j2 modules command).
16. If you have made changes it will ask you to save. Go ahead and save it.
17. Now type: make -j2 zImage (j2 represents jobs that can be run concurrently, determined by the kernel build. This option only works if you have 2 cores and also you can use -j4 if you have a 4 core system and so on.)
18. Now type: make -j2 modules (If the github provided by x3maniac doesn't have a module you need, this is where YOU the reader must research what you need to add and place it in the appropriate location).
19. Now type: make modules_install INSTALL_MOD_PATH=/home/thomas/kernelbuild/Ubuntu_initrd-3.x/
20. Now type: cd /home/thomas/kernelbuild/Ubuntu_initrd-3.x/
21. Now type: find .|cpio -H newc -o | gzip -9 > /home/thomas/kernelbuild/initramfs.img
21b. The output should say something similar to 1111 blocks or 14582 blocks, doesn't matter the number. The number and blocks means it has been made successfully.
22. cd /home/thomas/kernelbuild
23. Now type: abootimg --create kernel.img -f /home/thomas/kernelbuild/config/boot.cfg -r initramfs.img -k /home/thomas/kernelbuild/tf101-linux-2.6.36/arch/arm/boot/zImage
23b. abootimg is very strict and will produce an error here if anything is wrong. You are looking for the output of some files created and you should see a kernel.img file in your directory with an ls command.
24. If you are going to flash the kernel using the Tubuntu application, rename kernel.img to linux.img and flash appropriately from the app.
25. If you are going to create another kernel you need to clean it up before repeating steps 12-24. So proceed to step 26.
26. Now type: cd /home/thomas/kernelbuild/tf101-linux-2.6.36
27. Now type: make clean
28. Now type: make mrproper
29. Delete kernel.img from /home/thomas/kernelbuild/
30. If you aren't modifying additional modules and parameters you can save the created initramfs.img file. Otherwise delete it and run through the steps, doesn't take long to do anyways.
31. Profit.
My guide is complete now. Please read everything thoroughly before diving in. It's not as difficult as it looks. I will make kernels and modify the guide to weed out any errors, typos, or wrong steps. Hope everyone enjoys! I do this as much for myself as the community.
Made some edits for consistency and clarity. Please remember to check the github to determine if X3, our dev, has made any changes possibly requiring you to git clone again. If changes have been made, it is my experience that the easiest way to get the newest is to just delete the directories and git clone again. There is probably a way to do this and only grab the changes but I really haven't looked into that.
Thanks for this, going to see if I can add some stability in there since mine is barely usable.
You should replace /home/thomas/ with $HOME/ instead, that way it won't error out for people that don't use mkdir -p or aren't using a thomas username
Lethe6 said:
Thanks for this, going to see if I can add some stability in there since mine is barely usable.
You should replace /home/thomas/ with $HOME/ instead, that way it won't error out for people that don't use mkdir -p or aren't using a thomas username
Click to expand...
Click to collapse
I thought about that but I specified it in the beginning of the post. The purpose was to not make assumptions on what people using Linux did or did not know. For example I didn't realize ~/ represented the home directory till x3 pointed it out to me.
Since the post had such little traction I left it as is to help me out as well.
*****lol, I didn't specify the directories and why they were named that way. Must have been my other guide. I'll fix it up soon.
I added this comment below into the OP to remove confusion on the directories I used.
******My directories reference my own username on my laptop, please substitute "thomas" with your username OR your /home directory, or whichever directories you wish to use. I used full paths on purpose for my own learning and to be specific for newcomers to Linux who wish to learn to compile.******

Categories

Resources