On-device C#compiler. Help me build it properly... - Tilt, TyTN II, MDA Vario III Themes and Apps

Hello xDevs
I'm trying these days to port the DotGNU .Net compiler toolchain for the pocket-pc. There was a port in the past (that even has an IDE! Pocket C#), but seems quite outdated and probably abandoned. I want to revive the effort.
Up to now, I have been successful in building (using CeGCC) and running the c# compiler on the Kaiser, but does not seem to be able to compile even the simplest program. So I'm calling out for help from this great community
The compiled toolchain can be downloaded from my site here: http://hypest.org/pnet_0.8.0_wince.zip
Limitations:
Problematic usage through the PocketC# IDE, so you have to use it directly from a command shell. (grab it from here). Even through the console, the usage is "unconfortable" as the compiler spawns a new process and its output is only shown momentarily.
See post #2 for a walkthrough of how to build the toolchain on an Ubuntu 7.10 linux machine (so to reach the point I am up to now).
Thank you,
hypest

walkthrough
This is a walkthrough executed in a console window on an Ubuntu 7.10 linux distro.
0.1 Make sure Flex, Bison and Alien are installed
sudo apt-get install flex bison alien
0.2 Make a directory to work in
mkdir /tmp/pnet_port
cd /tmp/pnet_port
1.1 Get and install CeGCC
wget http://downloads.sourceforge.net/cegcc/cegcc-cegcc-0.51.0-1.i586.rpm
sudo alien -i cegcc-cegcc-0.51.0-1.i586.rpm
2.1 Get and unpack treecc
wget http://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-0.3.10.tar.gz
tar xzvf treecc-0.3.10.tar.gz
2.2 Build treecc
cd treecc-0.3.10
./configure
make
sudo make install
cd ..
3.1 Get and unpack DotGNU Portable.NET
wget http://download.savannah.gnu.org/releases/dotgnu-pnet/pnet-0.8.0.tar.gz
tar xzvf pnet-0.8.0.tar.gz
cd pnet-0.8.0
3.2 Setup proper path
export PATH=/opt/cegcc/arm-wince-cegcc/bin:$PATH
3.3 Get, unpack and apply my patch file
wget http://hypest.org/hypest_pnet.patch.zip
unzip hypest_pnet.zip
patch -p1 < hypest_pnet.patch
3.4 Build pnet
make
4.0 Finished
hypest

What benefits will this give a developer above what Pocket C# will do?
I actually did a repackage of Pocket C# a while back so that it would work on a WM5 device.
I've not used it for a while but someone may be interested in using it to compile on the newer devices.
Here is the link:
http://www.jaml.com/PocketCSharp/
Cheers
Mark

markvan said:
What benefits will this give a developer above what Pocket C# will do?
Click to expand...
Click to collapse
No extra features are to be expected for now I suppose. My goal is to make the toolchain "just work most of the time":
- Pocket C# includes an outdated version of the pnet compiler and perhaps that's the reason it doesn't compile some of my codes (rather simple ones, I should say). So I wanted to try to use the latest possible pnet version.
- the source code Mr Vitaliy Pronkin gave out, is not directly compilable as it seems to include only the files that he modified. I couldn't find the pnet version he used to be able to recompile Pocket C#, so I had to do it "from the beginning".
- I would also like to bugfix the IDE itself (make it landscape-friendly for starters).
A nice bonus of recompiling the pnet toolchain is that it makes other languages available too (java, c...)
markvan said:
I actually did a repackage of Pocket C# a while back so that it would work on a WM5 device.
I've not used it for a while but someone may be interested in using it to compile on the newer devices.
Here is the link:
http://www.jaml.com/PocketCSharp/
Cheers
Mark
Click to expand...
Click to collapse
Thanks for the link Mark.

Related

Eclipse and building Phone.apk

I am working on a PC W7,
all the components is installed, Android SDK 1.6 r1, Eclipse Ide for Java Developer, JDK etc, all works well...
I can build without problem the apps from the SDK Sample and some other in Google Code like SMSPopup.
But I took from Cyanogen GitHub the Phone.apk Zip file
http://github.com/cyanogen/android_packages_apps_Phone
with the source and when I build I get a lot of errors in Eclipse, same problem with the Advanced Launcher, Loccy's Better browser...
Clean... and Fix from Eclipse does not change anything
Any suggestion? (apart: use linux, download the entire android source etc...)
xenio2000 said:
I am working on a PC W7,
all the components is installed, Android SDK 1.6 r1, Eclipse Ide for Java Developer, JDK etc, all works well...
I can build without problem the apps from the SDK Sample and some other in Google Code like SMSPopup.
But I took from Cyanogen GitHub the Phone.apk Zip file
http://github.com/cyanogen/android_packages_apps_Phone
with the source and when I build I get a lot of errors in Eclipse, same problem with the Advanced Launcher, Loccy's Better browser...
Any suggestion? (apart: use linux, download the entire android source etc...)
Click to expand...
Click to collapse
You can not only git clone the Phone app, you need checkout a lot many others such as build/framework/core... etc.
And then type "make Phone" to build the app. Of course, you need a cygwin or just use a linux machine...
Yep...
My hope was not to hear that answer... I am too noob for that...
Maybe I try to install a Linux machine with the entire Android source... just for fun...
Thanks.
I did some important progress.
I did it...
I am on W7 64bit Host
with Sun VirtualBox I installed a Guest Ubuntu 9.04
this part from: http://developer.android.com
Android SDK 1.6
JAVA JDK 5
Eclipse with Android Plugins (ADT)
Some add to path for Java/Android SDK in ~/.bashrc file
this from: http://source.android.com/
Installed all the packages as in the Get Source page
Installed Repo
and the get source section...
in my $HOME
$ mkdir mydroid
$ cd mydroid
$ repo init -u git://android.git.kernel.org/platform/manifest.git
type your name and email
and now get all the files from source.android
$ repo sync
and build it
$ cd ~/mydroid
$ make
...after some hour
I modified the file I need to in the ~/mydroid/packages/apps/Phone/ directory
and build only the Phone.apk
as read in this thread http://groups.google.com/group/andr...47985716f84f?lnk=gst&q=build#6de347985716f84f
Make sure you're cd'd into the mydroid/ directory
Type ". build/envsetup.sh"
Type "mmm packages/apps/Phone"
if there are no errors the build of Phone.apk is in
~/mydroid/out/target/product/generic/system/app
I know this is easy for you devs, but this took me 3 days to
Now I like to get the Phone.apk source from Cyanogen GIT and try to build in my VM, I have no idea how to do it, and I think it modify the Settings too.
Please help me for this last part...
Thanks
Xenio
This may be easy for some, but I can say you just saved me 3 days of work. Thank you for the follow up post.
how to create apk file
hai everybody
my name is sriram
i am doing MCA
actually i want to create apk file, i dont know event the basics
can you help me
Kind of you

[TUTORIAL] The Step-By-Step guide to build Cyanogenmod7 for the LG Optimus 2X

aMpeX proudly presents:
The Step-By-Step guide for building CM7
for the Optimus 2X​
Disclaimer:
I'm taking no responsibility for any damage that might occur to your phone or your PC
This guide illustrates how to setup an UBUNTU 11.04 equipped PC to build CM7 from source
It does not provide any support beyond that operating system, so if you insist on using other
Linux distributions, either adapt the guide yourself or look elsewhere.
Moreover I'm not providing any support for any problems that might occur during the course
of this guide, if they are not introduced by faults within the guide itself. I will only
troubleshoot the activities that this guide is based upon and won't be able to help with your
general linux problems. Feedback however is greatly appreciated.
Reposting this on other forums:
Feel free to post this guide on other forums. I'd like to be given credit though. Thanks
I am new to this myself, but I thought I'd share my findings after successfully building my first kang.
News & changelog:
v0.92 2011/06/01 Fix:
Added "change directory" before init repository (thanks to peewster)
v0.91 2011/05/31 Fix:
Fixed PATH exports (thanks to bhanvadia)
v0.9 2011/05/31 Initial release:
Still much formatting to be done, typos possible. Leave me some feedback if you encounter them.
Alright, so you want to build your own CM7 KANG's ?
Step 0: The starting point + info
When you start this guide, I assume that you just installed your Ubuntu 11.04 copy to your PC and set up all the drivers to your hearts content.
All commands are supplied, as they would be typed in from a USER ACCOUNT, if you operate from the root account, you will
have to add /home/<yourusername> to the most commands. I suggest, after performing the actions required by root, that you log out by typing
Code:
exit
What you need:
A working copy of Cyanogenmod7 installed on your phone
A PC with Ubuntu 11.04 installed (NOTE: If you're about to install Ubuntu from scratch, use the 64Bit version.
I can build CM7 on a 32Bit OS just fine. But AOSP for example won't build beyond Froyo on 32Bit.
At least 20GB of free space (including space required for the operating system itself)
A considerably fast internet connection (syncing the repo takes everal Gbs)
At least 3 hours of time.
All done? Then let's get started:
Step 1: Install the Java JDK
Go to System → Administration → Synaptics Package Manager
Here, we have to enable the partner repositories.
Go to Settings → Repositories → Other Software → Tick Canonical Partners and hit Close
Now push the „Reload“ button, and use the Search button to find the sun-java6-jdk package
tick the box in front of it and choose „Mark for installation“ and accept the following dialogue.
Click the „Apply“ button. Accept the dialogues, you now have the Java JDK installed.
Step 2: Install the Android SDK
Go here and download this.
Extract the archive to a directory of your choice.
Open a Terminal, navigate to the „tools“ subfolder and run the AVD Manager using ./android
In the new Window hit „Available Packages“ tick the „Android Repository“ and select „Install selected“
Once thats done, close everything up, time for step 3.
Step 3: Set up udev
The description from the CyanogenMod wiki struck me as being a slightly bit overkill, and, while it might be necessary for other devices, for LG phones this works just fine:
Create a new file on your desktop named
Code:
99-android.rules
and fill them with the following content:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
This will enable the debugging for LG devices, if you have time, it won#t hurt to add the other vendors. Just add another line
like above and replace the „1004“ with the appropriate vendor ID from http://developer.android.com/guide/developing/device.html (scroll to the bottom)
Log in as root using
Code:
sudo su
and paste our file to
Code:
/etc/udev/rules.d
using the terminal (cp)
Set permissions for the file using
Code:
chmod a+r /etc/udev/rules.d/99-android.rules
Now would probably be a good time to check if adb is working correctly.
But first, lets update the PATH so we can type „adb“ anywhere on the file system.
Navigate to your user home directory, press CTRL+H to show hidden files and edit the
Code:
.bashrc
file by adding the following
Code:
export PATH="/home/<yourusername>/<path to the android SDK >/platform-tools/:${PATH}"
export PATH="/home/<yourusername>/bin/:${PATH}"
(The 2nd line is necessary for later)
NOTE:This only enable the use of adb everywhere when logged in with your username. When working as root, you'll have
to add a separate line with /home/<yourusername> in front of the path above.
You have to log out and in again for the changes to take effect.
Now check if you can see your phone with
Code:
adb devices
Alright, still awake? Good, because now it gets interesting
Step 4: Install build packages and create directories
Since we already installed the JDK this command differs a bit from the Cyanogen Wiki:
For 32 and 64 Bit
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
For 64 Bit only
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.4-multilib g++-4.4-multilib
Now we need 2 directories
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Almost there ….
Step 5: Install the repository
Now we need our repo binary:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
(credits to p.valenta for notifying me of the adress change)
NOTE: You may need to reboot now
Change to your previously created directory:
Code:
cd ~/android/system/
Initialize the repository:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Enter your Name, eMail adress and select if you want colors or not.
AND NOW THE FINALE
Code:
repo sync -j16
Get yourself a BIG coffee, because this is going to take MUCH MUCH time, because basically you are now checking out all there is to CyanogenMod.
But wait, we're not done yet. Hang on
Step 6: Getting proprietary files for the Optimus 2X
For this step, you need an O2X with a running Cyanogenmod build, so if you're still on stock, this is the time to flash Cyanogenmod for the first time.
Connect your phone to your PC via USB and
navigate to the device tree in your repo folder:
Code:
cd ~/android/system/device/lge/p990/
and run
Code:
./extract-files.sh
This will extract some libs from your device. But sadly, not all of them (build will still fail) but we will fix this now.
Go to
Code:
https://github.com/koush/proprietary_vendor_lge/tree/gingerbread/p990
and click the download button on the right.
Extract the „p990“ folder located in the subfolder
Code:
/koush-proprietary_vendor_lge-a43238f/
in the archive to
Code:
~/android/system/vendor/lge/
Step 7: Get latest ROMManager
I know I must be annoying the sh** out of you by now, but hang in there
Code:
~/android/system/vendor/cyanogen/get-rommanager
Step 8: BUILD F***ING EVERYTHING
Now this is what you've been waiting for huh?
Sync the repository again:
Code:
cd ~/android/system/
repo sync
Build the ROM
Code:
. build/envsetup.sh && brunch p990
Wait
When everything is finished, your KANG will be stored in
Code:
~/android/system/out/target/product/p990/
And THATS IT!
Congratulations, you have just built your own CM7 KANG, don't forget to share it to other nightly testers
Cheers aMpeX
Useful stuff and tools:
SH script by bhanvadia, tailored to the directories introduced by this tutorial:
Download here
Extract anywhere and make it executable by typing
Code:
chmod +x kang.sh
Create shortcut to the output directory of your KANGs
Type
Code:
ln -s ~/android/system/out/target/product/p990/ <your desired shortcut location>
nice guide, really liked it.
too bad there were none when I started making my kangs.
btw: I use mac it is bit different for mac. but nothing its missing.
Here is file you keep on you desktop to make it work without any typing of commands after you setup your computer working directory as per guide by aMpeX.
and check post #2 for making that file executable.....
kang.sh
bhanvadia said:
nice guide, really liked it.
too bad there were none when I started making my kangs.
btw: I use mac it is bit different for mac. but nothing its missing.
add "~/android/bin/" to path too so you can "repo sync" from anywhere.
just a suggestion... can upload build.sh file on here to make it easy.
something like
1. for clean and build
2. for repo sync
open file and press your options.
thats what I use...
Click to expand...
Click to collapse
That's why the guide states its for ubuntu. I found that even the Cyanogenmod Wiki entries don't work completely for the latest ubuntu (with g++ and gcc 4.3 not being available anymore, also hat huge problems with the java jdk at first)
I'll add the additional PATH variables as you suggested. Thank you.
aMpeX said:
That's why the guide states its for ubuntu. I found that even the Cyanogenmod Wiki entries don't work completely for the latest ubuntu (with g++ and gcc 4.3 not being available anymore, also hat huge problems with the java jdk at first)
I'll add the additional PATH variables as you suggested. Thank you.
Click to expand...
Click to collapse
Here is file you keep on you desktop to make it work without any typing of commands after you setup your computer working directory as per guide by aMpeX.
PS: aMpeX can you just test that file??? just repo sync or rom manager update options.
awesome guide !!! thanks aMpeX !
seems to be working, after you chmod+x the sh file that is. My Repo Sync is stuck at 1%, but I doubt its related to your file.
I'll add it to the 2nd post
aMpeX said:
seems to be working, after you chmod+x the sh file that is. My Repo Sync is stuck at 1%, but I doubt its related to your file.
I'll add it to the 2nd post
Click to expand...
Click to collapse
modified my mac file i use to fit to your setup of directories, just changed directories. ...
yeah then it would work, hope it make it more easy
GET the KANGs flowing...........
aMpeX said:
Useful stuff and tools:
SH script by bhanvadia, tailored to the directories introduced by this tutorial:
Download here
Extract anywhere and make it executable by typing
Code:
chmod +x kang.sh
Create shortcut to the output directory of your KANGs
Type
Code:
ln -s ~/android/system/out/target/product/p990/
Click to expand...
Click to collapse
Download link is sending to wrong post still....
now it should work like this....
http://forum.xda-developers.com/showpost.php?p=14310172&postcount=5
copy
http://forum.xda-developers.com/showpost.php?p=14310172&postcount=5
Can you please also state that it only works on 64bit builds of ubuntu and not 32bit...
Renegade_Rulez said:
Can you please also state that it only works on 64bit builds of ubuntu and not 32bit...
Click to expand...
Click to collapse
Aside from what you can read on the net, my KANGs build perfectly fine on Ubuntu 32Bit
No reason to not install 64Bit though. I'll add a remark in the first post.
Edit: After some asking and digging, read this:
http://twitter.com/#!/CM_arcee/status/75677847712309249
So while standard Gingerbread cannot be built by 32Bit, the CyanogenMod7 repository can.
is this meant to download a lot of stuff for different phones? mine is downloading a lot of stuff at step 5 and it's taking forever..
Imperticus said:
is this meant to download a lot of stuff for different phones? mine is downloading a lot of stuff at step 5 and it's taking forever..
Click to expand...
Click to collapse
It will download files for each and every phones supported by CyanogenMod, thats why its called cyanogen repo, not just P990 repo, but mostly you will use stuff thats required by your phone.
and its suggested to have 15 - 20 GB free, as it takes a lot....
3.5 GB is just "out" folder when it compiles for one device (P990)......
bit of a noob.. done everything..when I try to make the build using build/envsetup.sh i get permission denied
Any help please?
copy/paste the command from the tutorial
there is a leading dot and space before "build
Code:
. build/envsetup,sh && brunch p990
Thank's for the tutorial but i allways get no gsm function build
logcat -b radio
RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING error: com.android.internal.telephony.CommandException: RADIO_NOT_AVAILABLE
Click to expand...
Click to collapse
or
Couldn't find 'rild' socket; retrying after timeout
Click to expand...
Click to collapse
What baseband are you using? Make sure that the lge-ril.so is in your proprietary files
aMpeX said:
What baseband are you using? Make sure that the lge-ril.so is in your proprietary files
Click to expand...
Click to collapse
Thank's for repy.
lge-ril.so is in and generally i flash my build coming from cyano #31 (405) and mcr18 (405)
So...405
Possibly (if you synced the proprietary repository by koush AFTER you ran extract-files.sh) your ROM still includes the lge-ril for 0218.
Try reflashing the ril with the methods provided in this forum.
Other than that, I have no idea what might be causing your problems.
old ril file from koush files do work on 405 baseband too, but you feel better performance with new ril. with old ril you may loose signals sometime.
delete your vendor/lge/p990 folder, and download again from koush's files and put it back there. make sure your directories are in order
example: for lib-ril.so in as below
like ~/android/system/vendor/lge/p990/proprietery/lib/

WebTopScripts - Fixing apt-get dependencies on WebTop

After using webtop2sd app the next step on using my webtop on motorola atrix was to start using programs like aptitude, synaptic or command line apt-get to install much more useful programs to use offline on this motorola modified ubuntu jaunty distribution.
The first problem faced was that motorola had left a lot of broken dependencies that would break webtop system if someone just try to use any automatic solution.
To help on this task i developed a bash script that fix those broken dependencies using three different approaches:
1 - The first logical step is just install the missing packages from ubuntu jaunty, taking care to not overwrite any original packages developed from motorola
2 - Since some packages were made from motorola and were already installed on webtop, the second step was creating FAKE packages to just tell apt-get that the package is already installed leaving the original motorola installed package intacted.
3 - Somehow, there is one fake package that breaks the system if is installed. For this package, the idea was backup all files provided from the package developed from motorola and install ubuntu jaunty package overwriting motorola's files. After installation restore the original files on top of ubuntu jaunty files to maintain maximum motorola original system.
After fixing apt-get broken dependencies the use of apt-get could upgrade original motorola`s file. To avoid that there is another script that mark to HOLD version installed. Doing that, it is more difficult to normal users to upgrade packages that would overwrite motorola packages.
Now let's explain how to use WebTopScripts.
Requirements:
* Rooted Atrix.
* Working WebTop after webtop2sd modifications.
* webtop configurator running and preliminaries fix applied from this program (most of all corrections are related to sources.list).
* basic skills to run bash scripts and commands from terminal command line
* working lxterminal program on webtop
Install Script on your Atrix:
* Download file from this thread and save on your download folder (/mnt/sdcard/download)
* run these commands on lxterminal:
Until version 1.6:
Code:
cp /mnt/sdcard/download/webtopscripts-1.4.tar ~/
cd ~
sudo tar -xvf ~/webtopscripts-1.4.tar
sudo chmod -R 777 WebTopScripts
bash WebTopScripts/setup.sh
After version 1.7:
Code:
cp /mnt/sdcard/download/webtopscripts-1.7.tar ~/
cd ~
sudo tar -Pxvf ~/webtopscripts-1.7.tar
cd /osh/usr/share/
sudo chmod -R 777 WebTopScripts
bash WebTopScripts/setup.sh
Run Scripts to fix apt-get:
Until version 1.6:
Code:
cd ~
bash WebTopScripts/fix-apt-get.sh
After version 1.7 execute this command and choose options from menu:
Code:
webtopscripts
Just use this script with care, and at your own risk, because apt-get may break your system.
Using webtop2sd you may easily recover from original webtop but since your are on a rooted device all caution is needed.
Good luck and enjoy.
New repository for updated versions on: webtopscripts google code
Version 1.5 released 10/01/2012
Version 1.6 released 11/01/2012
Version 1.7 released 24/01/2012
Many thanks to donation made by:
amenditman
...
Please feel free to contribute on WebTopScripts Project on Google Code
Install script to help use of dpkg -i xx.deb command
If you want to use some functions provided from WebTopScrips to install packages directly from deb files like command "sudo /usr/bin/dpkg -i --root=/osh <<package_deb_file.deb>>", you may run the code:
Code:
cd ~
bash WebTopScripts/scripts/install.sh <<package_name>>
Just need to make sure to write proper settings on file:
Code:
cd ~
leafpad WebTopScripts/scripts/config.txt
Example of config.txt (You just need to include dependencies that are not on webtop yet) :
[gksu]
site="http://launchpadlibrarian.net/23917569/gksu_2.0.2-1ubuntu2_armel.deb"
file="gksu_2.0.2-1ubuntu2_armel.deb"
depends="libgksu2-0;gnome-keyring"
[libgksu2-0]
site="http://launchpadlibrarian.net/25028748/libgksu2-0_2.0.9-1ubuntu3_armel.deb"
file="libgksu2-0_2.0.9-1ubuntu3_armel.deb"
depends=""
[gnome-keyring]
site="http://launchpadlibrarian.net/25333836/gnome-keyring_2.26.1-0ubuntu1_armel.deb"
file="gnome-keyring_2.26.1-0ubuntu1_armel.deb"
depends="libgcr0;libgp11-0"
[libgcr0]
site="http://launchpadlibrarian.net/25333843/libgcr0_2.26.1-0ubuntu1_armel.deb"
file="libgcr0_2.26.1-0ubuntu1_armel.deb"
depends="libgp11-0"
[libgp11-0]
site="http://launchpadlibrarian.net/25333840/libgp11-0_2.26.1-0ubuntu1_armel.deb"
file="libgp11-0_2.26.1-0ubuntu1_armel.deb"
depends=""
Click to expand...
Click to collapse
To install gksu you just need to run:
Code:
cd ~
bash WebTopScripts/scripts/install.sh gksu
You may contribute with more config text for installing more packages on this thread to share with others users that do not want to use apt-get easy installation process.
Visit site bellow to find path for armel jaunty deb files on web:
https://launchpad.net/ubuntu/jaunty/armel/
Hope to have your contribution soon.
Programs Installed after apt-get fix from WebTopScripts
I will list here all applications that were installed and how I did it after fixing apt-get.
=== Reserved ===
You my friend, have to much time on your hands.
This is freaking wicked GOD like.
Thank you !
very nice I had been working on getting dependencies t work for days and kept breaking the webtop.
I've also been working on this for days and am happy to confirm it works beautifully!
May god carry your soul to heaven when you die.
I am now completely satisfied in replacing my netbook with the lapdock
im installing gnome desktop now =D
youre the man
I think I may have just died! Awesome job.
You make my day
Sent from my MB860 using XDA App
Thank you everybody that tested the script. My pleasure to help and contribute.
I need your help on this issue:
Sometimes when you are installing programs, the program is not able to configute itself.
I found oout that the main problem is that some programs modified by motorola are preventing that since they don't have all functionalities that are expected from them.
For example program readlink can not be used with option -q, program sed can not be used with some optins, etc....
To fix that the only way is to overwrite motorola file with ubuntu original jaunty file. BUT that sometimes breaks the system.
Here is your possible contribuition: to find out with me wich files can be overwriting without problems.
Here is an example to how to overwrite readlink:
Code:
cd ~
bash WebTopScripts/scripts/install.sh coreutils
rm -R ~/tmp
dpkg-deb -x WebTopScripts/packages/coreutils_6.10-6ubuntu1_armel.deb ~/tmp/
sudo cp ~/tmp/bin/readlink /usr/bin/readlink
To overwrite grep we need to include this package on WebTopScripts like this:
Code:
cd ~
sudo tee -a WebTopScripts/scripts/config.txt <<EOF
[grep]
site="http://launchpadlibrarian.net/[URL="tel:19665074"]19665074[/URL]/grep_2.5.3%7Edfsg-6ubuntu1_armel.deb"
file="grep_2.5.3~dfsg-6ubuntu1_armel.deb"
depends=""
EOF
bash WebTopScripts/scripts/install.sh grep
rm -R ~/tmp
dpkg-deb -x WebTopScripts/packages/grep_2.5.3~dfsg-6ubuntu1_armel.deb ~/tmp/
sudo cp ~/tmp/bin/grep /bin/grep
sudo cp ~/tmp/bin/egrep /bin/egrep
Finally, I am open to yours suggestions ....
This looks awesome! Can't wait to try it out today. has anyone installed a working chrome browser yet?
I am trying to find a working APT source for Jaunty to test against. Anyone have a working /etc/apt/sources.list I can use?
starrwulfe said:
I am trying to find a working APT source for Jaunty to test against. Anyone have a working /etc/apt/sources.list I can use?
Click to expand...
Click to collapse
Use WebTop2SD & install webtop configurator. It will fix your apt source and keys.
If you're more advanced than that and just want repo, check out old-releases.ubuntu.com as your starting fqdn.
bb12489 said:
This looks awesome! Can't wait to try it out today. has anyone installed a working chrome browser yet?
Click to expand...
Click to collapse
chromium ppa doesn't have jaunty binaries so this isn't possible. You might want to look at debian webtop for chromium.
_Alex_ said:
chromium ppa doesn't have jaunty binaries so this isn't possible. You might want to look at debian webtop for chromium.
Click to expand...
Click to collapse
yea i tried debian, but no one can get chrome to work on it. Displays pages for a second then craps out :/
aaron.a said:
im installing gnome desktop now =D
youre the man
Click to expand...
Click to collapse
did it work ???
Does any one have sources.list for any armel chromium? I had before for i386 one daily build that could work with jaunty since will not contains many dependencies on ubuntu stuff. But that was i386, i am not familiar with armel yet.
Sent from my MB860 using XDA App
this is outstanding. well done.
i am one of the many that seem to have been experimenting with this and constantly breaking it. i did find however, that overwriting most of the packages that contain binaries that were included in the original rootfs (coreutils, findutils, etc) helped fix missing arguments especially when trying to build from source using apt-get.
also force overwriting locales let you rebuild a locale for your own language and gets rid of errors and some awn-manager issues due to dependencies on the locale files.
but alas, my awn-launcher is broken so i am out of action for the time being.
arvati said:
Does any one have sources.list for any armel chromium? I had before for i386 one daily build that could work with jaunty since will not contains many dependencies on ubuntu stuff. But that was i386, i am not familiar with armel yet.
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
You can find and add PPA ubuntu sources from www.launchpad.net. Unfortunately, there are no armel jaunty binaries for Chromium stable, dev or beta available.

Linux ON droid not IN android question????

Ok, this goes out to any and all DEVs out there. We all know by now that we (some people not me) can run linux within android using the loop mounts, vnc viewer, etc... Now how about REPLACING android with a linux distro like debian or maybe even what these guys use http://openpandora.org/ ..... its linux based and has an arm CPU.. Any way I'm talking about flashing over android wiping the internal sorage and installing linux on it or even using the boot loader to flash over android???, of course this is getting rid of any 3g connection and phone usage. I understand that, I am talking about giving our RETIRED droid 1s a use. I wanna see my D1 run a linux distro in full hardware mode NO MORE ANDROID. now dont get me wrong I love android as much as the next guy, but why now flash something else to it???
Another link I found, this is for windows mobile but hey, similar idea.
http://wing-linux.sourceforge.net/trac/wiki/FAQ
P.S. I AM NOT A DEV JUST AN IDIOT WITH AN IDEA!! my ignorance is NOT bliss and I would love to know if this is even possible. I'm willing to help ANY WAY I CAN. lol
THANKS!!!
I don't think it's possible. Because of the locked bootloader we're forced to use Motorola's bug-ridden Kernel and as Android's Kernel is a heavily modified Linux Kernel it most likely won't run an ordinary Linux distro.
But I'm no expert either
Milestone is locked, Droid is not ...
Maybe this will help (if you don't know german, you can use Google Translate):
http://www.android-hilfe.de/anleitu...debian-chroot-mit-lxde-auf-dem-milestone.html
Thanks for the replies. Again the USA Droid 1 is nit locked or at least has been completely unlokcked. I've read a million "run debian on android" posts... I don't need to know German to see that the post above is the same thing. Like I said before I have NO INTEREST IN RUNNING LINUX ON ANDROID. I want TO REPLACE android completely with Linux to make a device like the openpandora handheld from my first link.
Any one up to the challenge????
Thanks again!
Really, no one??
I've been running Debian on my Droid booting from the SD card for a while, more recently trying Arch Linux after realizing that anything optimized for ARMv7, VFPv3, NEON, or Thumb-2 (I'm not sure which unfortunately) won't boot because of a page fault or something. Ubuntu, MeeGo, and Angstrom just kernel panic and don't give any useful information even at the highest debugging level. I'm back to using an ARMv5te Arch Linux build (http://archlinuxarm.org) although I could just as well use Debian. I really wish Ubuntu worked for multitouch.
Well, I got the touchscreen calibrated! I forgot that my screen rotation hack only rotated the framebuffer It's stuck in portrait for now. I decided to use mtev (MeeGo's multitouch X11 input driver) after being fed up with evdev's aversion to being rotated, but now that I'm back to the stock portrait rotation evdev should work fine.
If you want instructions, either PM me or wait until I post a full guide and/or my patched kernel tree. It's not super difficult, but it's a lot of command line use and compiling.
What works:
*CPU and SD card (obviously )
*Touchscreen (single touch/portrait only for now)
What needs work:
*Keyboard mapping is wrong, the number keys and symbols don't work. I need to figure out how Android handles Alt. I had to patch the GPIO keyboard driver because the keyboard worked in the console but not in X11, which expects EV_SYN.
*Sound is OSS only, but there is no mixer device, so aumix is useless and there's no volume control or sound output.
*I haven't tried the SGX driver, so I can't comment on hardware acceleration yet.
*Battery charging relies on battd, which is a proprietary Android binary from Motorola. It might run on Debian with "ls -s / /system" and the creation of the socket it expects (init.sholes.rc I believe), but I'm not getting my hopes up.
Untested:
*WiFi (needs firmware, but should work)
*Bluetooth
*Calls/data
*Sensors (although the accelerometer and compass seem to be recognized by evdev)
I'll upload my kernel, either as patches or on GitHub (or binaries if there's enough demand) once I get around to fixing the keyboard issue. Fingers crossed that I don't get carried away cleaning up the kernel, or worse yet, give up...
This is incredible news! I'm so glad to hear it. Of course you are running in hardware mode? Not through android? If so I'm super exited about this! I love arch Linux, I run it on all my computers and I understand it more than any other distro I've tried. I would love to give it a shot, though I'm not that great at compiling I think it will be worth it.
As I said before I am in no way a dev or even a Linux pro, but I can get by and if theres any way I can help this project become "complete" I'm willing to learn what ever is necessary to do so.
Also were u able to get an x server running? Possibly a DE? That would be crazy awesome.
Thanks a million, looking foreword to work with you and make this happen!
For anyone who's interested, I put together a quick package containing my kernel patches, configuration notes, and an automated kernel build script.
It's pretty self-explanatory aside from the installation of the root filesystem, which I leave up to your imagination
As I've probably repeated several times now, I've run Debian and Arch Linux natively on my Droid with my patched kernel (no chroot or VNC "hack"). With enough determination, it's possible to run practically anything on it - personally, I'm determined to get Ubuntu on it.
WOOT... insta-fail for me LOL you have it set up to work in specific directories? I thought i placed everything right but I guess not.. I got an error on the first line of output lol
Welcome to gTan64\'s lazy Droid kernel compiler\!
build.sh: line 5: [: missing `]'
build.sh: line 5: -z: command not found
build.sh: line 5: -z: command not found
Entering $WORK
Applying patches
build.sh: line 16: /*.patch: No such file or directory
mv: cannot stat `/arch/arm/boot/compressed': No such file or directory
cp: cannot stat `/compressed': No such file or directory
Setting up build
cp: cannot stat `/GNUmakefile': No such file or directory
cp: cannot stat `/sholes_config': No such file or directory
FIXME! No numeral or symbol input until someone finds a third-level
modifier key to use instead of AltGr for the keyboard.
cp $MISC/defkeymap.map $K_SRC/drivers/char
Building kernel!
make: *** No targets specified and no makefile found. Stop.
Kernel build done!
You have done something amazing, I'm just to stupid to figure it out my self. XD
I can understand why you would want ubuntu with all its pre-setup glory and support for nearly all hardware but dont you think its a little heavy for this hardware? lol I doubt you would try to use the Unity UI but I doubt that alone would even fit in ram LOL you could just use the ubuntu packages and drivers with debian maybe?
THANKS AGAIN!!!!
That's what happens when I don't test my own scripts
I was thinking too much about making it easy. Just try applying my patches to your tree manually.
Code:
cd kernel_src
patch -p1 <../patches/first.diff
patch -p1 <../patches/next.diff #and so on...
#Obviously, substitute the paths of the actual patches ;)
#Finally, copy sholes_config to .config and invoke 'make'.
It's actually much simpler than my script makes it, and you don't need my convoluted folder setup.
UM lol I cant find any patch files? are they in the ZIP? or do I have to obtain them elsewhere?
I can tell this is gonna be a hell of a project LOL
THANKS!!!
"Duh" moment - I used the .diff file extension instead of .patch
I'm such a scatterbrain... Remind me not to release anything before testing
EDIT: Strike that, reverse it. They're .patch files.
I AM BLIND lol I found them... BUT.. when I try to patch. terminal just seems to lock up... I press enter, the curser moves to the next line but it doesnt do anything. lol how long should 1 patch take?? its been about 10 minutes and I leave it be for now
EDIT:
LOL i forgot the "<" in the command OOPS but I'm not seeing any .config file or folder in the source to copy the sholes_config too. yes I have show hidden files on.. PS unfortatly usinf Fedora 15 gnome 2...... (on server so I can work on this anywhere through vnc )
THANKS
When I said "copy sholes_config to .config", that's literally what I meant. .config is the Linux kernel build configuration file, not a folder.
'cp /path/to/sholes_config .config' from your kernel tree should do it.
Oh, I forgot to mention that you need an ARM cross-compiler/toolchain. I use the gcc-arm-linux-gnueabi package in Ubuntu, but I don't know what the Arch equivalent is off the top of my head.
The "GNUmakefile" is just a convenience, it exports "ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-" before calling the actual makefile. If you don't have an ARM cross compiler in your path, it won't build at all. If you do, modify CROSS_COMPILE to point to it - on some systems it's called arm-unknown-linux-gnueabi, etc. etc.
Let me know if you get anywhere before it errors out.
OK I put the config file in the kernel_src but unfortainatly I'm using Fedora 15 XP I installed arm-gp2x-linux-gcc which is the fedora arm gcc I guess... lol so wha would I edit in the .config to make it point to arm-gp2x-linux-gcc. Its not my first attempt to compile an android kernel but I've never been succesfull LOLOL
thanks
I'm pretty sure that toolchain won't work - the GP2X was ARMv5 IIRC, so unless it's a newer build of GCC (4.3 or higher) and you're absolutely sure it supports the ARM EABI and the ability to generate ARMv7 instructions (which is unlikely if it's pre-4.1), I would recommend a newer toolchain.
CodeSourcery makes a pretty solid one: https://sourcery.mentor.com/sgpp/lite/arm/portal/release1803
If you end up using it, you can change the second line in GNUmakefile to "CROSS_COMPILE=arm-none-linux-gnueabi-". Don't worry about changing .config.
Well I DLed the linux/GNU installer and it gave me "arm-2011.03-41-arm-none-linux-gnueabi.bin" LOL
so I was thinking would it just be easier to just use my lappy with crunchbang (debian based) so I can follow ur instructions with deb / apt-get LOL fedora is a ***** and it dont have what I need... I cant find an arm v7 cross compiler for it
thanks
.bin files are the Linux equivalent of Windows EXE installers. Run it like this:
Code:
#cd /path/to/installer.bin
./installer.bin
#substitute the actual name, of course.
It needs root permissions if you want to install it to /usr/local (sudo ./installer.bin or su -c 'sh installer.bin'). You can also install it to /usr, but that will make it more tedious to uninstall later. If you decide to install it in your home folder - say ~/toolchain - you don't need root permissions, but you will need to add ~/toolchain/bin to your path:
Code:
export PATH=$PATH:$HOME/toolchain/bin
To be honest, I prefer Ubuntu to Fedora/OpenSUSE/$RPM_distro, so if you have access to a Debian or Ubuntu system, using that would make my life easier
Omg duh... the "non_Linux" part of the name true me off lol i'll start doing this on my laptop it's deb based crunchbang. I prefer anything over rpm distros too but it was a quick painless install on my server XP thanks ill try this when I get home
Sent from my DROIDX using XDA App

[GUIDE]Development for GalaxyTab 7.7 and Plus. How hard could it be?

Planning this for sometimes. So much work ahead. Just studying the new code cause me a lot of time. I think I have to rush it out so that someone may share my burden. Don't have much time to polish it. I'm trying to provide all commands, files and links. Please correct me if something is wrong or missing. Hoping this could be a stepping stone for those interested. If you like challenge, it'll be fun!
1. Introduction
If you have watched "Top Gear", you would have heard Jeremy Clarkson said "How hard could it be?". Why is it so hard to build a rom for our tab?
When I first play with rom building, it was quite straightforward. I recuilt my retired PC (Celeron 1.2G with 3G RAM, 40G HD) and follow the guild for building PA. Installing Ubuntu 12.04 and then the necessary packages. Everything is ready in a few hours. It was really challenging your patience to repo sync the source. After a few retries, I finally completed the download in two days! After two hours, my harddisk is full! Then I collected another retired 80G HD from a friend. Re-install everything and build again. Building requried 7 hours on my antique PC. With only a few minor errors to correct, my first rom pa2.55 was out. So how hard could it be? It was our predecessors ( @ohanar, @locerra, etc.) :good: who had already done lots of hardwork on device trees and kernel! If Samsung has really released the hardware related sources, there will not be so much troubles for us. At the time Android 4.2 launch, we have a new problem. Our tab's CSR chip doesn't support Bluedroid. See the Nexus family, everything is ready. Rom building will never be so pain in the ass as us.
1.1 What's wrong with our hardware
GT-7.7 and Plus use the exynos4 smdk4210 board with Mali-400 GPU. Quite a number of devices have similar hardware. The main problem we have would be:
1.1.1 CSR bluetooth chip.
CSR chip doesn't support bluedroid which become standard after Android 4.2. Bluez.org has provide a solution for 4.2 early this year but porting to 4.3 and 4.4 may take some time.Working on it now. Anyone has experience on bluetooth are welcome to help.. Bluez working now. See my Thread How to port Bluez to Android 4.4. Cheers!:highfive:
1.1.2 Athero wifi chip.
Samusng's wifi driver has issues on 5G support and SOD. I'm using the modified kernel driver from Samsung's 4.1.2 source. Athero provide drivers for 3.1 to 3.10 linux kernels but they have no wakelock support. I also wrote a drive base on Athero's source and add wakelock support but have no time to polish it now. Athero's chip doesn't have firmware for AP as Boardcom. Which is also the way Android platform providing wifi tethering in framework. To support wifi tethering we have to change the framework and the driver. Anyone has experience in linux HostAP are welcome to help. Wifi tethering is ok now! Tutorial will be in Post#2 soon.
1.1.3 modem chip (xm6260).
RIL stand for (radio interface library). Most of the phone manufacturer would provide their own vendor lib. The only working blob now is Samsung's ICS propietry libsec-ril.so which is obselete now. The one from stock 4.1.2 not working but no time to trace. It also don't seems to have much difference. This library handle the AT commands issuing to the (baseband to) modem chip. xm6260 has a complete set of command manual. It should not be too hard to rewrite if we can hack the ports. However it is not worth to splend too much time on this. Those has experience in AT commands are welcome to help.
RIL details: http://www.kandroid.org/online-pdk/guide/telephony.html
1.2 Where to get the source?
1.2.1 Samsung's source for our tab
The best source would be from Samsung http://opensource.samsung.com/. Sadly, the source from Samsung only cover the kernel. Our tab only have source up to 4.1.2 and kernel source 3.0.31 from Samsung.
1.2.2 Samsung's source for other devices
Luckly, we have similar architecture to some newer Samsung models. Their source is our major source now. eg. We can use the Mali driver from Note8 and/or i9300.
1.2.3 Manufacturere's web site.
The other source would be from the chip manufacturer. eg. Athero has source for linux.
1.3 What is going on at boot?
1.3.1 Power ON
a) When power button is long pressed (should be released after the logo shows otherwise it will reboot again every 6 seconds). The manufacturer's bootloader would show the vendor's logo. At that moment, bootloader would sense if there are key being pressed. Standard Android will go to boot menu when pwr + vol- is pressed. Samsung would go to download mode (something like fastboot) and accept pwr + vol+ to start recovery mode. If no other key is pressed, it would be a normal boot.
b) When USB is plug in (PC usb port or charger) at power off, the tab will be turn on silently. It is in the LPM (low power mode). According to lpm.rc (executed by Init, will be explained in 1.3.3), CPU will be set to POWERSAVING and the program charger is running. It should only handle simple tasks like Detecting the pwr button to show the charging images. If the pwr is long press when showing the charging image, it will reboot as in a).
3) Lollipop LPM: charger is link to the program /sbin/healthd. The process is similar to b) but lpm.rc is merged to init.rc.
1.3.2 Boot image
For our tab, there are two parts for a boot.img or a recovery.img. kernel binary and initramfs. As the name imply, Init-Ram-FS is the initial file system loaded into ram when the devices boot. Kernel binary provide the hardware drivers libraies which communicate with the hardware and baseband. At normal boot or recovery mode, the image (in /boot or /recovery partition) will be decompressed and loaded to memory. Initramfs will be loaded in root(/). It would consume a few hundreds MB of RAM and that's why our free ram is only 7xxM.
In LPM, it would depends on the last boot state. If it was powered off from recovery, recovery.img will be loaded and handle the LPM. If it was powered off from platform, boot.img will be loaded and handle LPM. That's why It might show different charging images if the charging images for reovery.img and boot.img are different.
Stock cook roms can unpack and modified the initramfs from the existing zImage. It is created in system/core if we build it from source. Here is a tool which can unpack/repack our boot.img or recovery.img.
1.3.3 Init
There is the Init program in every initramfs. This is the first program to run according to the sequence in the init.rc (or lpm.rc when in LPM). Partitions will be mounted and symlinked, default values and permissions are assigned, services will be started, etc. The source of Init is in system/core. The last thing Init do would be the continuous eventloop to process events.
2. Getting Start
To start building, we need the building environment. Many tutorials have alreay covered the details so I just list my suggestions. The guide from Google is a bit outdated but really helpful. http://source.android.com/source/building.html
Basic knowledge of linux is required. All commands are run in a terminal.
2.1 Hardware
A decent PC with as much ram as possible. Thanks for the donations, I can upgrade to a better i5 notebook with 4G ram and a 500G partition only for building. It would take 3+hrs. for a clean build. RAM and Harddisk speed are essential. A desktop PC with same configuration will be faster since notebook harddisk is slower. I plan to add more RAM when the price drop (seems to be a long wait )
RAM: 4G or above is recommended.
Harddisk space: 30G+ for system, 60G+ per rom, size of ccache (50G-100G), Roughly, a partition with at least 120G for one rom. Bigger is better.
A decent internet connection is essential. It will take days to sync the source if you only have bandwidth of 2M or less .
2.2 OS
64bit Ubuntu Desktop 12.04 or above. Recommend 13.04 or above. I'm using the latest 14.04.
2.3 Install the required packages
These packages are required during building and packing. (eg. gzip is required to compress the kernel binary)
type command: (have a beer or coffee. It will take a while)
Code:
[I][COLOR="Green"]For Ubuntu 12.x and 13.x:[/COLOR][/I]
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 bzip2 libbz2-dev libbz2-1.0 libncurses5-dev lib32readline5 \
lib32readline-gplv2-dev lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 pngcrush \
libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools schedtool libwxgtk2.8-dev python
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
[I][COLOR="Green"]For Ubuntu 14.x and 15.x:[/COLOR][/I]
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools \
build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc lzop \
libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib
2.4 Insatll android-sdk
Download (for Linux 64-bit of course): http://developer.android.com/sdk/index.html
Extract the file to a directory (eg. ~/android-sdk)
Add the path to ~/.bashrc
type command:
Code:
sudo gedit ~/.bashrc
at the bottom add the path
Code:
export PATH=~/bin:~/android-sdk/tools:~/android-sdk/platform-tools:$PATH
Quit and restart terminal to commit the changes.
Verify the path and update the SDK
type command:
Code:
android
2.5 Install java
If you have installed eclipse, openJAVA is ready. Some say it is not suitable for android development.
I've tried both and I found no appearing difference.
To install SUN JAVA (Ubuntu 13.04 or above)
type command:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
For Lollipop: openjdk 7 is required
Code:
sudo apt-get install openjdk-7-jdk
2.6 Install repo
type command:
Code:
mkdir -p ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2.7 Add usb dev rules
Which are required for adb and fastboot, eg. View attachment 51-android.zip
type command:
Code:
sudo cp 51-android.rules /etc/udev/rules.d
sudo chmod 0644 /etc/udev/rules.d/51-android.rules
2.8 Enable ccache
type command:
Code:
sudo gedit ~/.bashrc
add lines for CCACHE
Code:
export USE_CCACHE=1
export CCACHE_DIR=~/android/.ccache
Quit and launch the terminal again to commit the changes
ccache will cache the object files of gcc for next build, it would increase the speed of subsequent builds alot.
After source is sync in 2.11 and before build, we can set the size of ccache first.
type command:
Code:
~/android/rom/prebuilts/misc/linux-x86/ccache -M<size>
2.9 Init the source
Make a new working driectory for your rom
type command: (eg. ~/android/rom)
Code:
mkdir -p ~/android/rom
Each rom has its own manifest.xml listing all the required projects.
It is usually in the project android (manifest for PA). The readme of this project would provide the command to init.
eg. CM11.0: https://github.com/CyanogenMod/android/tree/cm-11.0
type command:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
It will fetch the manifest.xml and put it into a hidden directory .repo in the current directory (~/android/rom/.repo)
2.10 preparing local_manifest.xml
It is not a good pratice to change the manifest.xml directly. If the ROM has change its manifest, you would require to init again. The right way is putting everything your device needed in a seperate file .repo/local_manifests/local_manifest.xml. The device trees and kernel source for GalaxyTab 7.7 and Plus : https://github.com/danielhk?tab=repositories
eg. cm11.0 for p6800
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="danielhk/android_hardware_atheros_wlan" path="hardware/atheros/wlan" />
<project name="danielhk/android_device_samsung_p6800" path="device/samsung/p6800" />
<project name="danielhk/android_device_samsung_smdk4210-tab" path="device/samsung/smdk4210-tab" />
<project name="danielhk/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" />
<project name="danielhk/proprietary_vendor_samsung_smdk4210" path="vendor/samsung" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" />
</manifest>
Note: Settings will follow manifest.xml. cm-11.0's manifest has default remote="github" and revision="refs/heads/cm-11.0" so we can omit the same entries here. For other roms, see the defined names in manifest.xml and change accordingly. You can also add other devices trees here if you want to build them for the same rom.
2.11 sync and build
To fetch the source (specified in manifest.xml and local_manifest.xml) to working directory (~/android/rom)
type command:
Code:
repo sync -j32
-J specify the no. of threads to download. I have a few trials. Seems 32 works for me.
When it is done. You will find that ~/android/rom is not empty now.
You may set the ccache size now:
type command: (eg. 50G)
Code:
~/android/rom/prebuilts/misc/linux-x86/ccache -M50G
Only if you want to change size, otherwise it only requires once.
To build a rom, change to the rom directory. Usual commands: (eg. for CM roms)
Code:
cd ~/android/rom
. build/envsetup.sh
lunch cm_p6800-userdebug
mka bacon
CM need to download a prebuilt (Termianl.apk). To simplify this routines, I modified the build script from PA to cm View attachment rom-build.zip.
Copy it to the rom directory, type command:
Code:
cd ~/android/rom
./rom-build.sh p6800
After building is complete with no error, the rom will be output to ~/android/rom/out/target/product/p6800.
3. What can we do? :laugh:
3.1 Kernel
Since Samsung provide the complete kernel source, working on kernel would be comparatively speaking much easier.
When we say kernel, we mean the boot.img or zImage which already include the initramfs. This image will be flash to the /kernel (/dev/block/mmcblk0p5)
Hardware and flags are defined in defconfig inside <kernel dir>/arch/arm/config. It is the Linux standard.
3.1.1 difference between stock kernel and the kernel in custom rom
The main difference between the two kernels is the location of kernel library modules. Libray modules are mainly for network and storage drivers. By building them as modules, they can be stoped and restarted in case of critical errors.
Stock kernel put it in /lib which is part of the initramfs. We need to do extra steps to manually copy them to the initramfs after the first build and rebuild again. If you want to build the stock kernel, there is a very good tutorial.
Custom rom put the kernel library modules in /system/lib. Thus boot.img need to match those modules, otherwise they will not work properly.
For custom roms, which defconfig to be used is defined in device tree.
eg. For p6800, in the file device/samsung/p6800/BoardConfig.mk. There is the line:
Code:
TARGET_KERNEL_CONFIG := cyanogenmod_p6800_defconfig
It specify which defconfig file for the kernel
I wrote a View attachment build-k.zip scirpt to simplify the building of kernel alone. Copy it to the rom working directory (~/android/rom)
eg. For p6800, type command:
Code:
./build-k p6800
New boot.img will be output to the same directory as rom if no error.
3.1.2 Add/modify O/C, U/V, GOVERNORS, hardware drivers, etc.
As mentioned in 1.2, we can copy/modified the source from i9100 and n7000 kernels. For example, Dorimanx and Slyahkernel provide many useful code for us. The source of i9300 from Samsung may also provide some drivers update (eg. Mali)
Ref: Exynos4210 cpu menu., Mirror download
3.1.3 Default Orientation
Why the incall screen always landscape?
Many apks assume the default orientation is portrait but our tab's default orientation is landscape. It is a kernel behaviour so that recoveries (including the stock 3e recovery) are all in landscape.
To avoid this odd behaviour of apks like inCall screen, changing the default orientation in kernel is the ultimate solution.
It is already in my do list for a long time but trying to keep up with the android plaftform already occupy all my spare time...
I already have some idea how to do. Anyone interested to help on this can PM me. Already fixed in the platform
3.1.4 Update the kernel source
The existing kernel is base on Linux 3.0.x. It is outdated but I don't think Samsung would bother to update it. I had tried starting with the 3.4 source from Google but don't have enough time to carry on. I have filled some drivers already. Will take another shot later if I have time...
Anyone have experience in Linux kernel are welcome to help. No more guides are there, this would be a great challenge but fun!
3.2 device tree
Every device requires a device tree which:
a) Specify the hardware
b) define some overrided library. (eg. sensor, camera)
c) provide the extra files to be put in the initramfs. (init.<device>.rc, fstab.<device>, etc.)
If there are a few models variants, common parts would be put in a seperate common device tree (eg. smdk4210-tab for our tab). In this way, changing can be made once for all variants.
Most of the work on porting for a specific ROM would be on the device tree. Same as the kernel, we can get some update by modifying from other devices. CM's device tree for i9100, n7000 and i9300, etc. With a good device tree, we can port to any ROM.
3.3 Bluetooth support after 4.2.
In 4.2.2, I changed the source of framework, system_core, phone apk and device tree to work with bluez. It was a huge job! Hundreds of lines had been changed. Many files are replaced. It was quite clumsy but was the only way then. This way may not work for 4.3 onward.
Here are the details of both stack:
Bluedriod : http://source.android.com/devices/bluetooth.html
Bluez : http://www.kandroid.org/online-pdk/guide/bluetooth.html
3.3.1 We may modify the bluedroid to support our chip.
3.3.2 Working on the bluez support. I'm trying now.
  Bluez5 is OK now. See my thread: How to port Bluez to Android 4.4
3.4 Recoveries
With the device tree and kernel, we can build the recovery from source. CWM would be a side product of CM roms and TWRP has a tutorial.
The same View attachment build-k.zip script can be used to build recovery alone. In the rom working direcotry, to build recovery only
type command:
Code:
./build-k p6800 recovery
With no error, recovery.img will be at the same output directory as rom.
Local manifest
https://github.com/danielhk/local_manifest
All model share the same local_manifest.xml
daniel_hk, Check and commit to your tree my patches for PAC-4.2.2
Vaka2 said:
daniel_hk, Check and commit to your tree my patches for PAC-4.2.2
Click to expand...
Click to collapse
Thanks!
It nice to see someone interested in our development!
I have look into your changes briefly.
1. Some changes in media which I'll leave the user to decide. I rather keep the builds as genuie as possible.
2. Some of them are new commit of the original source which will automatically updated in a sync.
3. I forgot to upload a few minor projects to github.
One of which was android_build which will include the files like hciattach building from source. If you study the source of exteranl/bluetooth/bluez, they are there. That means it might have update later. No need to add as a blob.
Actually the best way is including them in PROJECT_PACKAGES section of the device.mk. It would have the same result without touching the original source. Less touch to the original source means fewer conflict later. I was caught up and did't have time to tidy up everything so I leave it there. Also, files from bluetooth should be put in the smdk4210-tab device tree. All model share the same source.
vendor_pac should be upload to official PAC's git. They already gave me an account but they use Google+ which I have trouble to login here. I was working on a job and I hadn't follow up. Now I'm working on 4.4 which PAC haven't release yet. So I put aside first.
You probably didn't have to waste you time if you PM me first.
Everytime I upload to github is a challenge, it always break before complete. I have to monitor it from time to time. Annoying! So I can only upload once a while when everything is ready...
To be honest, I really don't have time to keep up with the old source. The new ports already occupy all my spare times. With limited resource, I can only focus on major issues. Bluetooth after 4.3 is my first priorty. If it can be done, means we can go much further.
If you are interested, you may pick one of the thing I mentioned in this thread to start. Wifi-tethering or the vendor ril library is needed too. You may try it in 4.2.2 first. See what you are good at and interested to. PM me or post again if you have any questions and/or suggestion.
Thanks again for your effort.
daniel_hk said:
Thanks!
It nice to see someone interested in our development!
I have look into your changes briefly.
1. Some changes in media which I'll leave the user to decide. I rather keep the builds as genuie as possible.
2. Some of them are new commit of the original source which will automatically updated in a sync.
3. I forgot to upload a few minor projects to github.
One of which was android_build which will include the files like hciattach building from source. If you study the source of exteranl/bluetooth/bluez, they are there. That means it might have update later. No need to add as a blob.
Actually the best way is including them in PROJECT_PACKAGES section of the device.mk. It would have the same result without touching the original source. Less touch to the original source means fewer conflict later. I was caught up and did't have time to tidy up everything so I leave it there. Also, files from bluetooth should be put in the smdk4210-tab device tree. All model share the same source.
vendor_pac should be upload to official PAC's git. They already gave me an account but they use Google+ which I have trouble to login here. I was working on a job and I hadn't follow up. Now I'm working on 4.4 which PAC haven't release yet. So I put aside first.
You probably didn't have to waste you time if you PM me first.
Everytime I upload to github is a challenge, it always break before complete. I have to monitor it from time to time. Annoying! So I can only upload once a while when everything is ready...
To be honest, I really don't have time to keep up with the old source. The new ports already occupy all my spare times. With limited resource, I can only focus on major issues. Bluetooth after 4.3 is my first priorty. If it can be done, means we can go much further.
If you are interested, you may pick one of the thing I mentioned in this thread to start. Wifi-tethering or the vendor ril library is needed too. You may try it in 4.2.2 first. See what you are good at and interested to. PM me or post again if you have any questions and/or suggestion.
Thanks again for your effort.
Click to expand...
Click to collapse
Thanks to you Daniel for your immense effort on detailing all this! I'm far from a dev status like you and @UpInTheAir. But my support will always go to you developers. Both of you has done an impressive work for an outdated hardware and keep us happy with your Rom and Kernel. Again, thanks a lot.
Thanks, all hail daniel_hk for this!
Daniel,
I can only thank you for all the work he is having to keep our equipment (62xx, 68xx, TXX) alive and really Kitkat will give a new breath, for even in an experimental state already see how the device works smoother. A feather can not help, but I'm looking forward to seeing this in functional status.
As a suggestion, I honestly do not know the procedures, but it would be interesting to ask an official support OmniROM (ROM promising, others liked) and CM. The Galaxy SII has the same hardware, in which the use OmniROM and this magnifies the ROM. Maybe they (Team OmniROM) may offer official support or at least help in these matters!
I'm almost begging for support OmniROM, and Entropy512 (http://forum.xda-developers.com/member.php?u=591147&nocache=1&z=3487892739940434) Kindly reply me: "Someone who is working with one of Those devices and has it working needs to submit it. "
Sorry for my english
Hi Daniel,
Whe I try to repo sync, I was stopped by the error:
"fatal: Couldn't find remote ref refs/heads/cm-10.2"
"Cannot fetch danielhk/proprietary_vendor_samsung_smdk4210."
I was trying to build a cm-10.2 version.
I checked your repository and the folder was right there.
I am new to building android rom. There must be something obvious that I missed.
Thanks.
11nn93n9 said:
Hi Daniel,
Whe I try to repo sync, I was stopped by the error:
"fatal: Couldn't find remote ref refs/heads/cm-10.2"
"Cannot fetch danielhk/proprietary_vendor_samsung_smdk4210."
I was trying to build a cm-10.2 version.
I checked your repository and the folder was right there.
I am new to building android rom. There must be something obvious that I missed.
Thanks.
Click to expand...
Click to collapse
I think you get this line from my PAC manifest.
That was base on cm-10.1, default is cm-10.1. If you take a look of the project danielhk/proprietary_vendor_samsung_smdk4210 on github, you will find only one tree cm-10.1. cm-10.2 can use the same tree. I'll find time to update it later.
When you build cm-10.2, default tree is cm-10.2. The line without a revision will assume the default. That's why you can find it.
Your solution: Add the revision=cm-10.1 at the end of the project.
Code:
.... danielhk/proprietary_vendor_samsung_smdk4210" revision="cm-10.1" />
Good luck!
daniel_hk said:
I think you get this line from my PAC manifest.
That was base on cm-10.1, default is cm-10.1. If you take a look of the project danielhk/proprietary_vendor_samsung_smdk4210 on github, you will find only one tree cm-10.1. cm-10.2 can use the same tree. I'll find time to update it later.
When you build cm-10.2, default tree is cm-10.2. The line without a revision will assume the default. That's why you can find it.
Your solution: Add the revision=cm-10.1 at the end of the project.
Code:
.... danielhk/proprietary_vendor_samsung_smdk4210" revision="cm-10.1" />
Good luck!
Click to expand...
Click to collapse
Thank you for your help. Working on it. Its a big learning curve for me.
I made up to now the most progress with Ubuntu 13.04 64bit version building the cm 10.1 version.
With Ubuntu 12.04 and 13.10, I have been stopped much earlier than on 13.04.
Now I encountered the error below when running build-k p6800:
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/ACodec.cpp
frameworks/av/media/libstagefright/ACodec.cpp:53:24: fatal error: sec_format.h: No such file or directory
compilation terminated.
make: *** [/home/lgeng/android/rom/out/target/product/p6800/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
make: *** Waiting for unfinished jobs....
I downloaded the folder that contains the sec_format.h file from https://android.googlesource.com/device/samsung/crespo/. But It is not clear to me where to place the folder.
Thanks.
11nn93n9 said:
I made up to now the most progress with Ubuntu 13.04 64bit version building the cm 10.1 version.
With Ubuntu 12.04 and 13.10, I have been stopped much earlier than on 13.04.
Now I encountered the error below when running build-k p6800:
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/ACodec.cpp
frameworks/av/media/libstagefright/ACodec.cpp:53:24: fatal error: sec_format.h: No such file or directory
compilation terminated.
make: *** [/home/lgeng/android/rom/out/target/product/p6800/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
make: *** Waiting for unfinished jobs....
I downloaded the folder that contains the sec_format.h file from https://android.googlesource.com/device/samsung/crespo/. But It is not clear to me where to place the folder.
Thanks.
Click to expand...
Click to collapse
Not much I can tell. You have to provide the manifest.xml and local_manifest.xml if exist. And device tree changes if exist.
1. build-k is for kernel building only. frameworks_av seems not relevant.
2. crespo is another device. Not the right way to get missing file there.
3. With proper settings and manifest, Ubuntu 12.04 to 13.10 (which I'm using) have no apparent different for building.
If you are building cm-10.1, it is mature. No way there is missing file.
With no other info., I guest there is something wrong with your manifest or device tree. Mixing version projects, wrong flags in device tree, etc.
You might need more reading on what is device tree and manifest first.
Good luck!
Hi,
can you help me with integrating device to manifest.xml? I think there's the problem because everything runs fine until I write luch cm_p6200-userdebug, becuase it shows me that the device isn't found and in /android/rom/device, there isn't any folder called /samsung/p6200. I did everything by the guide, I only changed the local_manifest device info to p6200, because I own it. I'm using Ubuntu 14.04. Thanks for your help.
tom411 said:
Hi,
can you help me with integrating device to manifest.xml? I think there's the problem because everything runs fine until I write luch cm_p6200-userdebug, becuase it shows me that the device isn't found and in /android/rom/device, there isn't any folder called /samsung/p6200. I did everything by the guide, I only changed the local_manifest device info to p6200, because I own it. I'm using Ubuntu 14.04. Thanks for your help.
Click to expand...
Click to collapse
Not much details. next time provide detail. At least, send me your local_manifest.xml. It is definitely the source of your problem. You haven't tell which cm you built too.
I don't know what's wrong because I can't see anything in your side.
But I can tell you that device tree of p6200 didn't download. Check the typings of your local_manifest.xml. It should match the one in github.
Good luck!
TO ANYONE, YOU HAVE TO PROVIDE DETAILS. OTHERWISE, I DON'T KNOW HOW TO HELP!
I really don't have time to guess. You have to forgive me if I ignor your post.
From Nexus 7 上的 Tapatalk
Okay, sorry for it, I didn't know you need it. I want to build a Cm-11. I looked at my local_manifest and I think it's correct. Here is it
edify question for our 815's
Taken from one of your script's
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
Installing a .txt into sdcard0/data through .zip in recovery.
I used linux command to find paths for each of the memblocks - but didnt know which path, partition, I am looking for here. /system /userdata etc UHHHH
so to mount to the "sdcard0 /data"directory to install a plain .txt file would be ???
mount("ext4", "EMMC", "??????????????", "/data");
also can I call "/data" anything - like "/datadog" - since this is just a reference to a mount point and is temporary?
One other quicky
First I found this in an edify tutorial -
"/system partition is automatically mounted. this command is needed when you need to mount another partition beside /system or in any condition when recovery mode failed to mount your system partition. the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11 (all partition type commonly rfs, will be differ if you have custom kernel or rom)."
since this is a custom rom does /system still auto mount - meaning in ref to to your code above - was it unnecessary but probably good practice or because this is a custom rom there are changes that move the location for /system. I noticed that " the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11" was not in the memblock paths??
Start my intro to kernels tomorrow - Oh boy
Off subject - I knew Brazil - tough break with the injury though. Next wins - Argentina and Costa(CoastBaby)!! Going to bed now 6:00 AM WHAT.
Lt.col.johncross said:
Taken from one of your script's
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
Installing a .txt into sdcard0/data through .zip in recovery.
I used linux command to find paths for each of the memblocks - but didnt know which path, partition, I am looking for here. /system /userdata etc UHHHH
so to mount to the "sdcard0 /data"directory to install a plain .txt file would be ???
mount("ext4", "EMMC", "??????????????", "/data");
also can I call "/data" anything - like "/datadog" - since this is just a reference to a mount point and is temporary?
One other quicky
First I found this in an edify tutorial -
"/system partition is automatically mounted. this command is needed when you need to mount another partition beside /system or in any condition when recovery mode failed to mount your system partition. the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11 (all partition type commonly rfs, will be differ if you have custom kernel or rom)."
since this is a custom rom does /system still auto mount - meaning in ref to to your code above - was it unnecessary but probably good practice or because this is a custom rom there are changes that move the location for /system. I noticed that " the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11" was not in the memblock paths??
Start my intro to kernels tomorrow - Oh boy
Off subject - I knew Brazil - tough break with the injury though. Next wins - Argentina and Costa(CoastBaby)!! Going to bed now 6:00 AM WHAT.
Click to expand...
Click to collapse
I don't know what's your objective.
Some points to note:
1. command in updater-script use the function defined in updater-binary. Which are not necessarily a Linux executable command. These commands only valid in the updater-script.
2. You can only mount to an existing directory (mount point) which has not been mounted before. The mount command in Linux is a shell command which is executed by /bin/bash.
3. /system is mount by init following the sequence in .rc files. In recovery, a program is running to provide the interface for I/O. It doesn't require /system partition.
4. No matter which rom (stock or custom), the content of /dev are defined in kernel. Partitions info. is read from the PIT (partition info. table). Kernel will initialize the device at boot accordingly. They are similar to a harddisk partition.
5. our tab has emulated int. sdcard. It is part of the /data, at /data/media.
Hope these might help
earlier question simplified
My problem is with the mount command in a zip file to be used on our Carbon ROM partitions.
My goal is to make 4 different .zip files that can be installed with the recovery software. Each zip places one (the same) simple.txt file into a different folder then the previous zip did.
After I install the 4 zips I should be able to use my file manager app to view the simple.txt in each of the following folders
/sdcard0/data so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
/sdcard0/Download so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
/Root/data so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
/Root/system so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
This should give me what i need to fill in what I am missing on understanding this.
Thanks - I hope that this understandable
Off subject - Argentina taken care of biz - Costa is dead to me - Next winners Argentina and Germany
Just about there
6GB with intel I5 -1TB- is now setup as a dual boot with Windows 8.1 and Ubuntu 14.4. All the packages are installed etc.
My linux flavor is ARCH or Manjaro (arch based) - Not a big fan of unity, but since I did not want any pitfalls for support reasons I will use Ubuntu for now.
I now have a descent grasp on GIT and repo, as well as installing cyanogen on one supported device. It would appear that to install on our device any of the custom roms I would just need to provide a local manifest with the proper projects.
I am a little fuzzy on a few things but I think if you could please post two (i815's) local manifest's for two of our newer kitkat roms say Omni & Slim I should be able to figure out my answers or at least narrow down my misunderstandings to exact questions.
Thanks
All Hail GERMANY - - that final game was a real snooze fest.
daniel_hk said:
I don't know what's your objective.
Some points to note:
1. command in updater-script use the function defined in updater-binary. Which are not necessarily a Linux executable command. These commands only valid in the updater-script.
2. You can only mount to an existing directory (mount point) which has not been mounted before. The mount command in Linux is a shell command which is executed by /bin/bash.
3. /system is mount by init following the sequence in .rc files. In recovery, a program is running to provide the interface for I/O. It doesn't require /system partition.
4. No matter which rom (stock or custom), the content of /dev are defined in kernel. Partitions info. is read from the PIT (partition info. table). Kernel will initialize the device at boot accordingly. They are similar to a harddisk partition.
5. our tab has emulated int. sdcard. It is part of the /data, at /data/media.
Hope these might help
Click to expand...
Click to collapse
I'm going to see my mom for 2 days. I'll see if anything missing when return.

Categories

Resources