How to build AOSP for Nexus 7? - Nexus 7 Q&A, Help & Troubleshooting

I would like to mess with trying to install my own customized ROM's to my Nexus 7, but the first place to probably start is with being able to build AOSP as-is from source.
As I understand currently, building is only supported on Linux and OS X, but I can easily get Ubuntu 10.04 and re-partition my HDD to give it about 100GB (if that much is even needed).
Looking at:
http://source.android.com/source/initializing.html
I need to choose a branch and setup the Linux environment. I'm a bit confused as to what branch I should choose though. I want the latest source of Android available at the time, so I should pick the master branch? Or since I'm only building for the Nexus 7, should I choose it's device-specific branch instead? Although looking at:
http://source.android.com/source/build-numbers.html
the Nexus 7 is only at android-4.1.1_r1.1, but I could of sworn I heard there was r4 out already.
As for setting up the Linux environment, I hope I can just follow all the commands listed there without any problem.
Proceeding on with:
http://source.android.com/source/downloading.html
It looks like a pretty straightforward process that I'm also hoping can be done successfully if I follow the commands exactly as presented. I don't have a proxy nor the need for a local mirror either.
And then moving onto:
http://source.android.com/source/building-devices.html
Some stuff there I find a little bit confusing. It would seem I have to first get proprietary drivers, which all 4 seem to be placed conveniently at:
https://developers.google.com/android/nexus/drivers#grouper
From there, I imagine I can move the script that's bundled inside to the root of the source folder, run it, and follow the instructions. I don't exactly know what the root of the source folder is, but it would probably be obvious once I did start trying to build this. But once I did find it, I would run (using Nvidia's Graphics driver for the example) sh extract-nvidia-grouper.sh in Terminal, and it would place the right files where they need to be.
I don't understand the make clobber part too well at all; should I run this on the very first build, later builds, or all builds?
And once the source and drivers are all downloaded and available, I should then run lunch full_grouper-userdebug and then finally make -j# (# being some number in accordance with how many cores on my CPU I have). I have a triple-core CPU at 3.5Ghz, and I have the ability to unlock to quad-core at 3.3Ghz (but prefer to stay on triple). Should I just run -j32? Also will this build the Kernel as well, or will I have to get the source for that and compile it separately?
And once the build completes, my plan from there was to just go back to Windows and flash it. And if I managed to get it to flash and boot properly, I assume I would of succeeded with compiling AOSP from source
I noticed that userdebug part on full_grouper-userdebug gives "root access and debuggability". Does this mean it comes with some program like Superuser or SuperSU already installed? Or does this mean I can easily install those?
Perhaps after I get comfortable with the basics of flashing AOSP as-is, I can then try to mess with different types of optimizations, like Linaro and perhaps even messing with many types of optimizations from different kernels like faux123 has done .
I also have a 360kb/s DSL connection, so downloading the entire source the first time will probably take a good while. But once I have the source, I take it I don't have to redownload the entire thing for patches and stuff?
Any and all guidance is welcome

Bump before I go for tonight

Bump

You have a bunch of questions. I will answer some. And while I whole-heartedly support learning to build you don't need to build to flash roms.
The best advice I can give you is to just start building. You have found a bunch of instructions and links, obviously. Go ahead and begin, and tackle problems as they arise.
Environment
Okay...really the hardest part is setting upi the environment, if you don' t know linux. After downloading and installing Java and the SDK, make sure you add them to your path.
Most guides will have adding the path in the directions. But make sure to check that it works! It will be extremely frustrating, and you won't know what is wrong. Go to a random directory, Documents would be good, and enter java -version and then adb devices. If the computer says it cannot find the commands, then your path is the problem.
Make sure to setup udev. It is easy, Google it.
Building
Branch
You want to build from the tags.
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r4
For the proprietary blobs, whatever directory you repo sync from (~/android/system or whatever) is the root directory. run the extraction from there.
when the proprietary blobs are extracted, and the source has been downloaded, these are your commands.
Code:
. build/envsetup.sh
lunch
Lunch will return a list of devices, Grouper is the Nexus 7, it is number 4. eng and user-debug do have root access, but SU and SuperSU are more than just root, they manage the root access for your apps as well. You can download them from Play or install them as a flashable-zip.
Choose 4 and then
Code:
make otapackage
don't worry about the -j# part. Your machine almost definitley cannot handle -j32. It is -j4 by default, that should be fine for your cpu.
If you want to enable faster builds, you can enter
ENABLE_CCACHE=1
before make otapackage, but it will take up a lot of space on your hd. Your subsequent builds will use some thing from your intial build instead of rebuilding them each time (kernel and other things). So even if you repo sync, some changes won't be reflected in your later builds. For instance, if you do not clean your prebuilts and build system, your build date in the build.prop will always stay the same as the first build.
The way you clear the build directory and make new everything is with make clean or make clobber. You can run it before any build, but the build will take much much longer than one that uses prebuilts. Non-clobbered and with ccache enabled are the fastest of all. But subsequent builds are pretty fast even without ccache.
When you want to update your source, you can just go to your root dir and repo sync. It will only update your source, it won't take nearly as long.
Okay, I answered more than I intended. There are a million guides that show you every step in the process.
Don't ask anymore generic worry questions...you're ready. You understand more than most people do before their first build before I even posted. Get started and if you run into problems, search. If you can't find the answer, then come back and ask us.
Good luck. it is easy, and very satisfying.

I finally got around to installing a Virtual Machine, and Ubuntu 10.04 After doing that, I fully updated Ubuntu, installed VMWare Tools, and then proceeded to start trying to acquire the AOSP source.
Getting sun-java-6 was a bit tricky, but not too hard (I ran the commands exactly as listed on the site, but the package didn't exist; had to get it from somewhere else). After that, I proceeded to do everything else, except CCache (I didn't know what .bashrc was, but I'll look further into this with future AOSP builds).
I then made the folder, did repo sync, and I'm now acquiring the source now from android-4.1.1_r4. As a quick question, does it matter whether I choose to build from android-4.1.1_r4, or master? Would master be more up-to-date?

espionage724 said:
I finally got around to installing a Virtual Machine, and Ubuntu 10.04 After doing that, I fully updated Ubuntu, installed VMWare Tools, and then proceeded to start trying to acquire the AOSP source.
Getting sun-java-6 was a bit tricky, but not too hard (I ran the commands exactly as listed on the site, but the package didn't exist; had to get it from somewhere else). After that, I proceeded to do everything else, except CCache (I didn't know what .bashrc was, but I'll look further into this with future AOSP builds).
I then made the folder, did repo sync, and I'm now acquiring the source now from android-4.1.1_r4. As a quick question, does it matter whether I choose to build from android-4.1.1_r4, or master? Would master be more up-to-date?
Click to expand...
Click to collapse
Sorry for late answer, no, use the r4 branch as it is more up to date. Also, make clobber every time isn't needed but you should as it remove then entire out folder (wich is where compiled stuff go) and this make sure you rebuild a clean thing.

Building CyanogenMod 10
Dunno if this is of any interest, but I have a thread started with a complete walkthrough for building CyanogenMod10 for Nexus 7.
Most of the info is the same, and there are some tips in the comments as well.

espionage724 said:
I would like to mess with trying to install my own customized ROM's to my Nexus 7, but the first place to probably start is with being able to build AOSP as-is from source.
Click to expand...
Click to collapse
So, how did you get on? I've been following the same path I think - repo sync the source and follow Google's own tutorial on compiling Android but with the added step of incorporating the binary drivers for the grouper.
I've built the .img files using make -j8, that all works, fastboot flash worked, but I get no video out when booting up using the new OS. I can ADB into the Nexus and it's certainly booted and working okay apart from, I'm guessing, the missing binary drivers.
I've used each of the 5 binary driver scripts to populate the "vendor" directory in the root of the downloaded source before compiling from scratch, but perhaps I've missed a step, so I'm curious as to whether you've got a fully working AOSP+binary driver compile working.
(By the way, my build environment was Ubuntu 12.04 64bit, SDK r20.0.3, Android 4.1.1 (JRO03R) source, Sun Java 1.6, and it all seems to work well using 8 threads on a Core i5 2500K + 4GB RAM).
Edit:
I re-ran the binary extraction, did a make clean; make clobber, and re-compiled - and now video works. Everything works now apart from the compass, camera and rotation sensor. I also tried compiling CyanogenMod from source, too, and had the exact same three problems. Everything works, and works well, apart from camera, compass and rotation sensor. All of which work in the stock Google ROM. Weird.

OK, So I've just compiled an OTA update package from AOSP source... my question is this:
I already have unlocked the bootloader on my wife's Nexus 7, installed Clockworkmod, rooted it, installed busybox, etc, manually on the stock 4.2 update I downloaded from Google on the device when it asked me to upgrade.
Is the otapackage I just compiled going to replace my custom recovery if I flash it as is? I've looked, and it has a "recovery" folder in the .zip, whereas any of the custom ROMs I have downloaded for my phone do not. Do I simply delete this recovery folder, and flash away? Do I need to edit the updater-script? I'm still trying to read and learn about this, but I haven't gotten a good answer from google or searching this site for my specific problem... maybe I'm wording my searches incorrectly.
I would just rather not have to go back and reinstall Clockworkmod... I know that if I want to have busybox, SuperSU, and other apps installed when I flash I'm going to have to add them to the zip and resign... I just don't want to mess my recovery. And being that this is my wife's tab (and not mine to play with, as she pointed out ) I don't want her to get the impression that I'm having to "fix" something I "broke" lol.

hallowed.mh said:
OK, So I've just compiled an OTA update package from AOSP source... my question is this:
I already have unlocked the bootloader on my wife's Nexus 7, installed Clockworkmod, rooted it, installed busybox, etc, manually on the stock 4.2 update I downloaded from Google on the device when it asked me to upgrade.
Is the otapackage I just compiled going to replace my custom recovery if I flash it as is? I've looked, and it has a "recovery" folder in the .zip, whereas any of the custom ROMs I have downloaded for my phone do not. Do I simply delete this recovery folder, and flash away? Do I need to edit the updater-script? I'm still trying to read and learn about this, but I haven't gotten a good answer from google or searching this site for my specific problem... maybe I'm wording my searches incorrectly.
I would just rather not have to go back and reinstall Clockworkmod... I know that if I want to have busybox, SuperSU, and other apps installed when I flash I'm going to have to add them to the zip and resign... I just don't want to mess my recovery. And being that this is my wife's tab (and not mine to play with, as she pointed out ) I don't want her to get the impression that I'm having to "fix" something I "broke" lol.
Click to expand...
Click to collapse
Sorry if a bit late, but here are some answers:
yes, the rom will replace your recovery. but if you delete the recovery folder and delete every line containing the word "recovery" in the updater-script, you should be good to go.
And if you accidentally remove the recovery, you can always flash it back very easily using: "fastboot flash recovery [filename.img]" (your n7 has to be in the bootloader)
And again, yes, you will have to put the extra apps into the zip and update the updater-script to install them too.
Also, you will need the gapps package if you want to use the play store and other google apps.
Hope this helped

Nexus 7 3G does not boot after flashing AOSP
Hi,
I followed the steps provided on source.android.com to build and flash the AOSP for Nexus 7 3G Tilapia. After successful flash, the device does not show anything after Google logo. Please help me out.
Thanks,
Veeren

Compile with ccache makes build time extremely fast.
How to do:
_Open a terminal
_Install ccache:
sudo apt-get install ccache
_Open .bashrc:
sudo gedit ~/.bashrc
_Add these lines:
#ccache
export USE_CCACHE=1
_Save and exit
_Sync source code
_After source synced, run in same terminal (in root directory of your source):
prebuilts/misc/linux-x86/ccache/ccache -M 20G (20G is the size in giga of space allocated for ccache, change it as you want)
_Start building
How to see if ccache works:
_Open another terminal in the root directory of your source and type:
watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s
First build using ccache may be a little much longer but the others will be faster...

veerndra said:
Hi,
I followed the steps provided on source.android.com to build and flash the AOSP for Nexus 7 3G Tilapia. After successful flash, the device does not show anything after Google logo. Please help me out.
Thanks,
Veeren
Click to expand...
Click to collapse
Did you pull the proprietary files for your nexus and include them in the build? I believe things like your video drivers are included in there, so if those are missing....
I think the prop files are available for download from Google on source.android.com... If not, they tell you how to use an included script to pull them via adb. I can't remember... It's been a while since I built vanilla AOSP.
Sent from my Inspire 4G using xda app-developers app

Modifying stock AOSP
I have built AOSP following the Google tutorial.
I am compiling using the master branch and
Code:
aosp_grouper-userdebug
.
I have downloaded and extracted the appropriate proprietary binaries.
I am modifying two files in the source tree (see attachments; search for "// MODIFICATION ADDED HERE" to find my changes). Will these changes work? I am using Eclipse, set up in the exact way the tutorial explains, and I am not receiving any new errors.
When I compile the source using the following commands
Code:
$ . build/envsetup.sh
$ lunch aosp_grouper-userdebug
$ make fastboot adb
and flash it to my device with
Code:
$ fastboot -w flashall
BEFORE my modifications, it works just fine. The android-info.txt file and all the image files are produced properly.
However, AFTER adding the modifications, the build completes with no errors, but android-info.txt and all image files are no longer produced.
Why am I experiencing these problems? What can I do to make it work the way I want?
P.S. YES, I am aware that my modifications are not secure; these are for my own purposes, not for a public build.

Related

[SCRIPT] A Handy Script to build CyanogenMod from source: "It does stuff" [v0.2]

[SCRIPT] A Handy Script to build CyanogenMod from source: "It does stuff" [v0.2]
I know everyone's probably like, hey, since CM is officially released, why do we need this? I'll tell you why. You know how all of the other phones get nightlies? I feel left out. That's why I've created this handy script to walk you through everything from getting source to building and eventually flashing. The script will be updated somewhat frequently as I add features and such. To start off, I'll walk you through how to use it. There are several switches that you can use, such as setup, init, clean, or dirty. Setup will do the initial setup for you, installing packages and repo and rebooting your computer. Init will initialize the CyanogenMod repository on your computer. Clean will build with a "make clean" to be sure everything is fresh. Dirty will, you guessed it, build what I consider a "dirty" build, with no make clean. Much faster, but more prone to glitches. Usage is simply cd'ing to where you saved the file, possibly chmod a+x'ing it (I'm not sure if mediafire retains the permissions set on a file locally), and then running ./buildscript.sh your_option_here. (Example:
Code:
./buildscript.sh clean
will clean your repositories and build from scratch.) Thats it! Have fun, and be safe.
*I am not responsible for any damages, emotional harm, dead puppies or goldfish caused by using this script.
Download: HERE
Come here to report issues, glitches, and/or enhancements.
https://github.com/ytt3r/buildscripts/issues
v0.3(Coming Soon)
Fixed running the radio script
A few minor changes
More aesthetic changes
v0.2
Added an option not to reboot on setup of repo
Aesthetic changes
Added copying of modules to the correct locations
Other stuff I can't remember (maybe, I'm too lazy to diff) lol
v0.1
Initial script: enables users to do several things very easily
You're just trying to make me boot into Linux more often, aren't you? I will definitely be taking advantage of this.
Sent from my CM7 powered captivate
Brilliant.
I still haven't synced the repo, I started to but it ate up so much bandwidth on my network.
This'll do it for you
Sent from my Captivate using XDA App
I am wondering if you can give the exact process we need to run this script in and what os it supports.
Currently trying to run it on an ubuntu install and having some problems. I run setup and it eventually asks to reboot and continue the script, i hit yes and it exits the script. nothing more. I reboot and then try to do the script with init but complains about missing directories.
found some errors when doing setup
E: Unable to locate package lib32z1-dev
E: Unable to locate package lib32ncurses5-dev
E: Unable to locate package lib32readline5-dev
./buildcaptivate.sh: line 22: curl: command not found
Click to expand...
Click to collapse
Are you on a 64 bit system?
Sent from my Captivate using XDA App
ytt3r said:
Are you on a 64 bit system?
Sent from my Captivate using XDA App
Click to expand...
Click to collapse
Its in vmware an very well could be 64-bit, or 32-bit.
looked it up and its 32-bit i guess.
Is the script for only 64-bit?
for the sake of learning something, could i get a laymans explanation of what this does?
or am i on the right track by...
it builds a captivate CM rom from (Android? not samsung) source?
ccdoggy said:
Its in vmware an very well could be 64-bit, or 32-bit.
looked it up and its 32-bit i guess.
Is the script for only 64-bit?
Click to expand...
Click to collapse
Only runs on a 64 bit system.
Trusselo said:
for the sake of learning something, could i get a laymans explanation of what this does?
or am i on the right track by...
it builds a captivate CM rom from (Android? not samsung) source?
Click to expand...
Click to collapse
You can run it every night by saying something like
Code:
./buildcaptivate.sh clean
which will build CyanogenMod clean for you, as an unofficial self-built nightly.
Do Not Run Current Version
This script makes some alarming system-wide changes:
Code:
sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh
and that's just in the first few lines, I haven't even read through the rest of the way through the script yet.
y3ttr, you need to go through this script and find ways of doing this with less system wide impact, and you need to spell out in the OP exactly what system changes are still made (the new apt repositories, for instance, which is a system change you likely won't be able to get around, for instance). Also, I recommend having stuff like the source location and stuff to be a variable that can be changed (for instance, lots of people would prefer to keep source in /usr/src, etc).
Another option you could look into is using a chroot jail for a lot of the build process, so you don't impact the wider system. Also, add some if/else statements so that this can run on something other than Ubuntu 64bit. Shouldn't be that hard.
Edit: i've read through some more of the script, here are some more thoughts:
no need to reboot, use source ~/.bashrc. But even for that, you shouldn't be adding stuff to a users' PATH permanently. Just do it in the script leave it at that.
to make it i386 or x64 compatible, use a uname -p to determine the arch type and a switch statement
do not change the default shell. there should be no need.
too many hard coded paths. use some variables, $PWD, and which to figure out locations and paths.
to make this really cool, have an option to automatically copy it to /usr/local/bin and have it run from cron every night.
have an variable to set where the build root is located, and another one to set where the final builds will be dumped (for instance: build in /usr/src, but place the final builds in ~/cyanogenmod/).
DamnMersault said:
This script makes some alarming system-wide changes:
Code:
sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh
and that's just in the first few lines, I haven't even read through the rest of the way through the script yet.
y3ttr, you need to go through this script and find ways of doing this with less system wide impact, and you need to spell out in the OP exactly what system changes are still made (the new apt repositories, for instance, which is a system change you likely won't be able to get around, for instance). Also, I recommend having stuff like the source location and stuff to be a variable that can be changed (for instance, lots of people would prefer to keep source in /usr/src, etc).
Another option you could look into is using a chroot jail for a lot of the build process, so you don't impact the wider system. Also, add some if/else statements so that this can run on something other than Ubuntu 64bit. Shouldn't be that hard.
Click to expand...
Click to collapse
This removal of sh is required as ubuntu defaults to using dash for some god-forsaken reason instead of bash. so the symlink must be placed in (most people won't even notice a difference for the remainder of their ubuntu lifespans) to guarantee that bash is used for all the building process (as it's required).
also, this isn't meant to truly be "configurable" as you're describing, it's merely meant to be simple/easy for people to build their own nightly (at their own risk)
Kaik541 said:
This removal of sh is required as ubuntu defaults to using dash for some god-forsaken reason instead of bash. so the symlink must be placed in (most people won't even notice a difference for the remainder of their ubuntu lifespans) to guarantee that bash is used for all the building process (as it's required).
also, this isn't meant to truly be "configurable" as you're describing, it's merely meant to be simple/easy for people to build their own nightly (at their own risk)
Click to expand...
Click to collapse
If the build process requires bash, then the build scripts should specify #!/bin/bash, not #!/bin/sh.
E: Unable to locate package lib32z1-dev
E: Unable to locate package lib32ncurses5-dev
E: Unable to locate package lib32readline5-dev
Click to expand...
Click to collapse
I believe are
lib64z1-dev
libncurses5-dev
libreadline5-dev
on a 32bit system. At least from what I gathered reading a CM forum post.
Hopefully that will save a little bit of time for anyone trying to build on 32bit, there are some extra steps once you start compiling, but I still haven't been able to to figure out why I'm getting fatal errors during the syncing/download process. So I have no idea if the workarounds for a 32bit system work for CM7 during the build process.
Here is the CM thread, post #21. Link.
ytt3r, regarding your script...
It does stuff !
Truly priceless quote.
Sent from my SAMSUNG-SGH-I897 using XDA App
Thank you for this! It seems to be working... I don't know if it's the repo or my ubuntu acting weird....
Kernel don't want to build (either manually or with this)
But I was able to do it 2 days ago with the same computer.! Will try again later.

[Webtop] Webtop source code

Motorola released the source code of the Webtop application at sourceforge!!!
Does this mean devs can now easily integrate and improve webtop?
I don't know how the guys at CM7 are going about hacking it or how much they have done towards their own webtop, and even with the source it probably still depends in lots of motoblur hacks and dependencies that are not part of CM7. However, it is indeed more then a big step in the right direction and should help dev's immensely! Very good news, thank you sir
Sent from my MB860 using Tapatalk
Did some more digging, the OP meant to link this URL: http://sourceforge.net/projects/motorola-webtop.motorola/files/ which does contain jaunty jackalope 9.04 as 1.2.0 and maverick meercat 10.10 as 1.3.0...
Just ordered a lapdock so going to start hacking on this. Has anyone tired building a Maverick webtop for the atrix? I am assuming if done then it will be supported by ubuntu till april 2012, so the repositories should work?
i sure hope so, cuz I tried every web top hack on this site and none of them have worked....maybe there is a solution somewhere in those 100 pages filled with mostly noobs asking how to flash or do they need to be rooted to do it lol
Has anyone actually tried building this yet? I don't have a dev box set up that I can use yet but want to play around with this when I get a chance....
would this possibly mean, that there's a chance to port the webtop-function to other devices/smartphones that have HDMI- and USB- Ports?
For example an Xperia Arc working with the Lapdock...
I don't understand the links. From what I can tell, all of these are Jaunty. They are are listed as delta's of each other, but the build instructions all indicate they are still Jaunty.
This is from a quick lookover, not in depth. It may very well be that the readmes are wrong, but I'm not encouraged by the firefox packages I see. I'm going to try to put together the build environment they describe to see if I can build one. If so, then I'll see what can be done after that...this is very back burner, so don't be expecting anything soon no matter how much of an obsession this has become
After some wget magic I was able to download all 4 releases into independent folders, and I've tried building webtop 2.0.0 on 11.10 setup.. didn't work so well. missing dependencies...
I am confused myself on the read-me's they all seem to indicate that you seed with jaunty. and if 1.3.0 is based on maverick then their build process is wrong?!
I've had success using rootstock (slick program) and chroot getting into a emulated amr7 root environment. I've even used my current install of webtop pulled out of my phone (from webtop2sd) and put into my dev machine and got that working well. but getting the packages to build in the explained environment alludes me.
I'm going to try building 1.3.0-133 tonight using a new rootstock pull of maverick. if people are interested I'll post how I grabbed all of the packages off of sourceforge later tonight using wget in 3 easy steps. this is a side project of mine, but I would really like to try and build webtop packages from scratch so that I can build a repo to allow us to up date our webtops with just apt-get to get to the latest edition.
Has any one else had success building the packages?
cpuchip
cpuchip said:
After some wget magic I was able to download all 4 releases into independent folders, and I've tried building webtop 2.0.0 on 11.10 setup.. didn't work so well. missing dependencies...
I am confused myself on the read-me's they all seem to indicate that you seed with jaunty. and if 1.3.0 is based on maverick then their build process is wrong?!
I've had success using rootstock (slick program) and chroot getting into a emulated amr7 root environment. I've even used my current install of webtop pulled out of my phone (from webtop2sd) and put into my dev machine and got that working well. but getting the packages to build in the explained environment alludes me.
I'm going to try building 1.3.0-133 tonight using a new rootstock pull of maverick. if people are interested I'll post how I grabbed all of the packages off of sourceforge later tonight using wget in 3 easy steps. this is a side project of mine, but I would really like to try and build webtop packages from scratch so that I can build a repo to allow us to up date our webtops with just apt-get to get to the latest edition.
Has any one else had success building the packages?
cpuchip
Click to expand...
Click to collapse
I agree with all you said about the build...I just don't see any of them built on Maverick based on their instructions. Please post your wget magic. There 's lots of files and I didn't take time to figure how to do it.
I've gotten as far as you have. I've got the rootstock environment and packages installed. I haven't looked closely at everything, and I don't think the custom moto packages get installed (like I don't see Firefox installed, and what's in the repository is not firefox 8). And no, I haven't figured out from their instructions how to generate the system image to put on the phone. My first goal is to do just that...generate a stock webtop image per the instructions and get it onto the phone. If I can do that, then I was going to try new packages.
I've also downloaded the mentioned cross compiler and installed it, but I haven't gotten much further that that on figuring it out.
Eventually, I would like to get a PPA on launchpad with new packages that everyone can use. I've read that launchpad will now support armel PPAs.
Seems like we're both stuck at the same part. I was thinking of doing the same thing as you, start a PPA at Launchpad.
I believe I can help you with getting a base ubuntu.img that you could work with.
if you follow the torial on this website: https://wiki.ubuntu.com/ARM/RootfsFromScratch
it instructs you on how to build an ext2/ext3 .img file and then unpack the tar into it.
say you want an ubuntu-arm.img file that'll contain your ubuntu system.
mke2fs -F ubuntu-arm.img (we want ext2 or ext3 not ext4, android doesn't support it yet)
dd if=/dev/zero of=ubuntu-arm.img bs=1MB count=0 seek=4096
sudo mount -o loop ubuntu-arm.img /directory/to/mount/to
now finally unpack the tar into the mounted image!
sudo tar -C /mnt -zxf armel-rootfs-200904151837.tgz
sudo umount /mnt
that should get you want you want to start with.
haven't done the maverick build yet. I'll post the wget magic next after I look it up.
---------- Post added at 09:48 PM ---------- Previous post was at 09:32 PM ----------
okay now for the wget magic!
first download the index.html page of the WT-1.3.0-105 page (I assume you want 2.0.0 or 1.3.0 release)
mkdir WT-1.3.0
cd WT-1.3.0
wget http://sourceforge.net/projects/motorola-webtop.motorola/files/WT-1.3.0-X/WT-1.3.0-105_DBN-1/
next strip out everything but the table tags that make up the list of downloads, injecting a <html><body> above the <table> tag replacing what you removed
and </body></html> after the </table> tag replaceing what you removed.
next start wget with the index.html file just saved by first running wget.
wget -i index.html --force-html --content-disposition
on ubuntu I had to add the --content-disposition flag in order for it to properly save the file names. on fedora it did the right thing without that flag.
then wait an hour and you should have in that WT-1.3.0 will have all the 105 files in it!
I've got a two more scripts to unpack all the files. I'll have to look them up. but that should get you going.
AIW that and webtop-panel (and supposedly evbridge...)
those are the packages I care about in the port.
Do you know what package on the source code page contains AIW? (that's the android in window application.)
I haven't had a chance to work on this lately. However, I suspect that those components are pure Moto code, and therefore not required to release. Probably only the binaries are included. That's pure speculation, though.
The readme's say that it's not one to one for the packages they posted and the programs installed from them in our webtops. though reading the new releases on that webtop sourceforge project.. it says it's only the packages they were required to release by oss licensing... so it's probably not posted. the readme file inside of /usr/share/aiw says it's copyrighted and proprietary. So that really only gives us a few options... the easiest of which is isolated the packages we want to maintain and find all the libraries they link/load to dynamically and create a motorola/compatibility/lib/folder to put them all in, and make their execution start up using a change of library path, that way we can update the operating system without affecting those packages.... not my favorite method, but doable.
I've attached an lsof and an ldd of the aiw program. It'd be no small feat to isolate that package.. but it might not be so bad to take the webtopscripts1.6 and find out what packages they hold back.. and then use that list to find what libraries to move across the system. just ideas at this point.
after looking around, it looks like we do not have the source to the motorola specific software (webtop parts). If we do want to move to a later version of ubuntu but still keep things like aiw (android in window) then my thinking would be to jail the current applications that we like (aiw, webtop-panel) those with which we do not have the source to. and then move us to the latest ubuntu (11.10)
My hope is though that the new update to the Atrix will be the latest webtop. That would be much less painful because I believe it's based on 10.10 and we have current support for that through april and then I wont have to bother with this until then............
but I think I'll create a few scripts and automate the whole process of jailing the critical parts of webtop, and see if I can get them to work through the jailed environments.
what do you think?
Yes, definitely we will need to somehow isolate the pieces that have library dependencies moving forward.
Also, in trying to get a non-gnome xfce4 environment while still using webtop-panel, I've come to the conclusion that webtop-panel is a modifed gnome-panel application. It seems to need gnome-settings-daemon, and doesn't like it when you kill gnome-settings-daemon. So I would love to see the source for that to see what they are really doing...probably not going to happen.
Hey are you running a newer webtop then stock 1.2
I see that you're running 2.3.6 (is that from fruitcake derivitive? or 4.5.140?) if so is the firefox/ubuntu newer in it?
I kinda can't wait for the new update to push, I really hope we're getting an update to webtop that would move us to 10.10 or better. That would make my day.
There is another thread where this was discussed, but in short:
webtop 2.3.4: original firefox
webtop 2.3.5: firefox 6 or 7 (I think 6, nut I don't remember offhand)
webtop 2.3.6: firefox 8
Sorry if this is answered elsewhere (and please point me to the correct thread) but does webtop use some kind of modified xorg or some custom x11 derivative? If it's modified that should be published and could help with building our own app.
Sent from my HTC Desire using XDA App
Parastie said:
Sorry if this is answered elsewhere (and please point me to the correct thread) but does webtop use some kind of modified xorg or some custom x11 derivative? If it's modified that should be published and could help with building our own app.
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
It looks like they are using a custom xorg install:
http://sourceforge.net/projects/motorola-webtop.motorola/files/WT-1.3.0-X/WT-1.3.0-105_DBN-1/
http://sourceforge.net/projects/mot....3.0-105_DBN-1/xorg-7.5+6ubuntu3.tgz/download
I don't know how far different it is, but there should be a changelong inside that .tgz file.

[GUIDE] How to Set Up ADB & Build Android with Fedora KDE

Hello all. I have written a guide to setting up & using Android ADB, & building Android, with Fedora KDE. Almost every guide that I've ever seen for setting up ADB, & a build environment for building Android, is always written for Ubuntu, & ONLY Ubuntu. But I choose to work with Fedora KDE. Why Fedora with KDE??? Because I hate Ubuntu. !!!HATE!!! I also can't stand gnome 3.X. I'm sure I'm not the only one who feels this way, so that's why I'm writing this guide. I've tried different linux distros, & I've found Fedora to be the best of all. It is my favorite now. They also seem to be one of the few distros that stays on top of the linux kernel updates. As of 03/20/13, they're already on kernel 3.8.3!!! Other distros stay way behind. Also, with KDE, you can keep the "windoze" traditional desktop look & feel, especially when you use the "folder view" activity. It's great!!! Well, let's get started.
!!!WARNING!!! Before anything else, I will mention this right now. The Dolphin file manager can destroy your Android build with hidden ".directory" files. Please keep this in mind. I will explain this at the end of the guide.
INSTALL JDK6
-I guess I'll mention this 1st, since this can actually be one of the most painful & confusing parts of all. You'll need to install the java jdk6. As far as I know, Android stuff won't work with the newer jdk7. You can find it on oracle's page here:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
-Scroll down & you'll see it. Get the "rpm.bin" version. If your working with 64bit, it should look like this:
jdk-6u43-linux-x64-rpm.bin
-Someone by the name of JR already made a very good guide on how to do this. It is what I followed, & you should too. You can find it here:
http://www.if-not-true-then-false.c...java-jdk-jre-6-on-fedora-centos-red-hat-rhel/
NOTE: When following this guide, be sure to go through only steps 3a & 4a when you reach them. Steps 3b & 4b are for the "non-jdk" jre.
NOTE: The "alternatives" listed in step 4 seems to be some kind of program that creates symlinks for whatever you want, & labels them. When you install, or create the symlinks, you can then use "alternatives" to switch back & forth between the different programs that you make the symlinks for. For example, you can make links for java in jdk6 & jdk7, & then switch to either one or the other, as you please. That way, you can have them both installed, while using only one at a time. You can type "alternatives --config java" to switch, or whatever name you used for the link. For help, type "alternatives --help".
INSTALL SDK
-You can follow these:
http://developer.android.com/sdk/index.html
http://fedoraproject.org/wiki/HOWTO_Setup_Android_Development
SETTING UP ADB
-Download the sdk & unpack it somewhere in your home directory. For example, I like to put mine in "~/Android-Development/sdk" (the ~ symbol is short for your Home folder).
-cd to your sdk tools location. For example, from my Home folder, I would type this:
Code:
$ cd Android-Development/sdk/tools
-NOTE: DON'T TYPE THE DOLLAR SIGN!!! I put it there because that's what you see in the terminal. It's only there for reference.
-NOTE: At any time, you can type "ls", or "ls -l" to see everything in the folder you're currently in.
-Now, execute the android program.
Code:
$ ./android
-Install Android SDK Tools & Platform-tools.
-Install 32bit packages. Since Android is a 32bit OS, you must install the 32bit packages regardless if whether your computer is 64bit or not.
Code:
$ sudo yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686
NOTE: In order to install packages with yum, you must do it as su. You can either type sudo before the command, or you can just type "su" & enter your password to become superuser. If you're new to the command line, it's probably better to use "sudo" instead, that way you won't stay logged in as superuser & potentially mess things up.
-Now, it's time to install the udev rules. Basically, they are the rules that govern whatever device you plug in with USB. You can find all the info on this page:
http://developer.android.com/tools/device.html
-Create an empty file named 51-android.rules to write in. We will create it in /etc/udev/rules.d/
Code:
$ sudo touch /etc/udev/rules.d/51-android.rules
NOTE: "Touch" is a linux command that you can use to create a new, empty file. To see more info on it, type "touch --help", or "man touch" to see the manual page for it. Of course, you can always google it, & anything else as well. Google "linux commands touch".
NOTE: Since this file is in the root user's directories, you will need to enter commands as superuser, or else it won't save. Either type "sudo" before the command, or, if you're comfortable with the command line, log in as superuser by typing "su" & entering your password.
-Now, you can use any text editor to write inside that file you just created. I like to use nano from the command line, so let's use that. ("nano --help", "man nano", google "linux commands nano")
Code:
$ sudo nano /etc/udev/rules.d/51-android.rules
NOTE: In linux, you can copy & paste without even "right-clicking" & selecting copy or paste from the menu. Instead, you can just highlight some text, & go somewhere else & press the mouse middle button to paste it. Highlighting text will automatically copy it, & pressing the mouse middle button will automatically paste whatever you highlighted. No need for "right-clicking" anything. You can do this for the next step.
-Now, from the webpage listed above, just copy & paste the lines with the USB Vendor IDs that you want to use. For example, for Asus, HTC, & Samsung, write these:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
-Save & exit the file.
NOTE: In nano, you can always see important commands at the bottom of the screen. For example, to exit, you hold in the "control" button & press "x".
-Now, check the permissions of the file & make sure everyone can read it.
Code:
$ ls -l /etc/udev/rules.d/
-You should see something like this:
Code:
$ -rw-r--r--. 1 root root 639 Feb 5 14:08 51-android.rules
NOTE: The 1st line indicates whether it's a directory or not. The next 3 lines indicate Read, Write, & eXecute permissions for the user. The next 3 lines indicate Read, Write, & eXecute permissions for the group. The last 3 lines indicate Read, Write, & eXecute permissions for others. The 1st "root" means that root is the user. Root owns that file. The 2nd "root" means that the file belongs to the group root.
-If for some reason you don't see the "r" letters (meaning that it's readable) to the left of the file name, then just change the permissions. Add "read" permissions for all.
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
-Finally, if you didn't do it earlier, now's a good time to do this. Make sure the ADB folders are in your global PATH. This is so that you can use the ADB commands anywhere in the system, no matter what folder you're currently in.
-Return to your home folder.
Code:
$ cd
NOTE: In the linux command line, simply typing "cd" & pressing enter will bring you right back to your Home folder.
-There's a hidden file called ".bash_profile" in your home folder. You can see it if you LIST ALL:
Code:
$ ls -a
-Your global PATH is defined in there. Let's edit it to add the ADB folders.
Code:
$ nano .bash_profile
-You'll see that there's already one line in there with 2 entries that look like this:
Code:
PATH=$PATH:$HOME/.local/bin:$HOME/bin
You can use that as your example as to what the format should look like. The line begins with
Code:
PATH=$PATH:
Then there are 2 entries, with each entry separated by a colon. Each entry must be separated by a colon and NO space.
Code:
$HOME/.local/bin
is one entry, &
Code:
$HOME/bin
is the other entry. Now, we want to add our 2 ADB folders to the list. You can either add each path to your folder separated by a colon & no space, like the example, or you can start your own line. I always like to start my own line underneath that one. So, for example, here's what my new line looks like:
Code:
PATH=$PATH:$HOME/Android-Development/sdk/platform-tools:$HOME/Android-Development/sdk/tools
-Everyone likes to use different folder names. Remember to use the proper path of where you put your folders in.
-Save & exit the file. That's it. Now, reboot your computer, plug in your android device, & test it out. You should be able to type "adb devices" from any folder, & the computer should be able to see it now.
INITIALIZING YOUR BUILD ENVIRONMENT
-For me, this was the hardest part of the whole process, as there wasn't a lot of help on how to do this for Fedora with KDE. Whatever few guides for Fedora I found out there were usually missing something here & there. My goal is to change that & help everyone. I've gone through this multiple times now, including multiple reinstalls of Fedora 18 from scratch.
-You'll need to install lots of drivers & libraries.
NOTE: Use Apper, the software management program, to look up drivers & libs. Apper will show you many different files that have the name that you typed in, whereas yum won't. Personally, I like to look things up with Apper so I can get lots of hits, & then actually download them by typing them in manually with yum. Yum shows you what it's actually doing behind the scenes while it's downloading things, whereas Apper doesn't. If yum gets stuck & hangs, you can actually see what's going on, whereas Apper won't show you anything & will just leave you wondering what's going on.
NOTE: I have found it to be a good idea to always look for the development (-devel) version of anything that you have to install. Not everything has a development version, but some do. For example, if you look up "flex" in Apper, you'll see that there's also a "flex-devel". Be sure to download them both.
-Here is what I went by:
http://fedoraproject.org/wiki/HOWTO_Setup_Android_Development
http://source.android.com/source/initializing.html
http://wiki.cyanogenmod.org/w/Main_Page
http://wiki.cyanogenmod.org/w/Build_for_maguro
-I used the lists on the fedora page, & I also used the lists of required packages for Ubuntu 10.04 & 12.04. I chose to try a build for Samsung Galaxy Nexus, since that's what I have. While going through the Ubuntu lists, you must keep in mind that some of these packages don't exist for Fedora, & many others do exist with slightly different names. It is best to spend some time & look them up 1 at a time using Apper. For example, typing "libxml2-utils" into Apper shows nothing, but typing in "libxml2" shows results. Finally, whatever you still can't find, you must google search it. For example, google search = "fedora libxml2-utils" You'll get clues & answers from what other people have already found about them. I mainly used the Ubuntu lists of necessary libs to download. So, without further ado, here's everything that I did that works for me...
Code:
$ sudo yum install git gnupg gnupg2 flex flex-devel bison bison-devel gperf gcc gcc-c++ make automake kernel-devel zip curl zlib zlib-devel glibc glibc-devel ncurses ncurses-devel xulrunner xulrunner-devel libX11 libX11-common libX11-devel xorg-x11-proto-devel readline readline-devel mesa-libGL mesa-libGL-devel mesa-libGLU
NOTE: You won't need mingw32 & tofrodos.
Code:
$ sudo yum install python-markdown libxml2 libxml2-devel libxslt libxslt-devel perl perl-devel perl-Switch SDL SDL-devel wxGTK wxGTK-devel squashfs-tools pngcrush schedtool
NOTE: If you installed Fedora with the options for development programs, than some of these will be installed already. This list may be a slight bit of overkill, but I purposely wrote down everything anyway, so that way nobody misses anything. I went through hell when figuring this out, so it's better to be safe than sorry.
NOTE: If you've been doing everything logged in as superuser, be sure to exit su when you're not installing things anymore. If you create directories as root user, you won't have permissions to access them under your own name, unless you manually change the permissions. Other permissions issues can arise too.
-After all this, it's just a matter of installing the directories & repo, & following the remaining directions on the CyanogenMod Wiki build guide page. I wanted to sync up with the Jellybean branch, so as an example, I set my directories up like this:
Code:
mkdir Android-Development/Builds/bin
mkdir Android-Development/Builds/CM10.1_Jellybean
-Whenever I download the repo command, I do it like this:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/Android-Development/Builds/bin/repo
-You'll need to add this to your global PATH as well, so be sure to do that, then log out & back in again, or reboot to make it active. Do that, & then continue.
-Then, I go inside the CM10.1_Jellybean folder to do the repo init. (Get ready for repo sync. That takes hours!!!)
-That's pretty much it. : ) Be sure to read through the sites & all their instructions & guides to help you understand everything.
!!!WARNING!!! Here is what I mentioned all the way at the beginning. Please don't forget the most important thing of all: those damn hidden ".directory" files. Any time you change the folder views in Dolphin File Manager, it places a hidden ".directory" file in that folder. THESE HIDDEN FILES WILL DESTROY YOUR BUILD!!! I went through hell with this, trying to figure out what was going on. I always set up the Android folders to show in "details" view mode, so that they're easier to see. Every time I tried to build, it would build for 5 or 10 minutes, & then fail, citing errors in java. I eventually realized that the ".directory" files were the cause of all the problems.
If you change the folder views, you need to get rid of those hidden ".directory" files. You'll have to do it in terminal. A good way to do it is by using the "find" command to find them all, & then pipe the output of that into the "rm" command to remove (delete) them all. ("find --help", "man find", google "linux commands find")
The "find" command can find whatever you're looking for in the current directory, & in all of its sub-directories as well. With the "rm" command, you can also use the "v" option. "V" stands for "verbose". It will show you everything that is being done, as it's being done. As an example, here's how I do it on my computer:
Code:
$ cd ~/Android-Development/Builds/CM10.1_Jellybean
$ find -name .directory -exec rm -v '{}' \;
That will find all of the ".directory" files & delete them all. It works pretty fast too. With the "v" option, it will show you what's going, while it's happening, as well. So, if you're like me & think that it's much easier to see huge lists of folders in "details" view mode, feel free to set it for the current directory & all sub-directories as well. However, DON'T FORGET TO DELETE all of the ".directory" files before you start building, or your build WILL FAIL!!!
Well, as you can see, you can customize some things to your liking. There's plenty of learning involved, so be ready to spend lots of time with everything. Good luck, & have fun!!!
Now, I'd like to add a personal note. After all this, I'm able to build Android from source with no problem now. However, I tried porting CyanogenMod & building ClockworkMod recovery for some Ainol Tab that I have. Long story short, in the end, it didn't work. I learned about having to build your own device tree, & I found myself completely lost in a sea of xml & java that I didn't understand at all. That's when I realized how much I don't know. It's also when I quickly realized the good advice of cyanogen himself...
http://forum.xda-developers.com/showthread.php?t=667298
"... Here's my advice for those looking to make their own Android ROMs.. Stop. Write an app or two first, learn how the system works from a developer standpoint. Learn some Java. ..."
His advice is dead on accurate. Now I know why he says the things he said. I have no previous experience with java, or any other programming language. In trying to do these things, I found myself completely lost in code that I didn't understand at all. How can I possibly mess around with entire ROMs when I don't even know what's going on under the hood???
Since then, I've been concentrating most of my spare time learning java. It's a bit overwhelming to say the least, but I am getting it now. Recently, I took a peek back at all the code that confused me before, & I'm actually starting to understand it all now. I'm no longer lost. Studying java (& xml) is actually working, & quite well too. I can personally confirm cyanogen's advice to be spot on, & well worth listening to.
So, in conclusion, if you're wanting to get into messing around with ROMs & stuff, but you have no programming experience, I think it would be best to take cyanogen's advice & start at the higher levels first. Learn some java (& xml), & learn to build a simple app or two for Android. You'll better learn how the system works that way. That's what I'm doing now, & it's really working for me. Doing this should help you out with ROMs, & app development too. Well, I hope this is helpful to everybody looking to get into all this stuff. Good luck, & have fun!!!
Glad I'm not the only Fedora user building android around here. I admit, I'm no good at java, but I have really only been focusing on kernel stuff for my device. Good luck to anyone using this.
XirXes said:
Glad I'm not the only Fedora user building android around here. I admit, I'm no good at java, but I have really only been focusing on kernel stuff for my device. Good luck to anyone using this.
Click to expand...
Click to collapse
I guess different people will have different experiences depending on what kind of knowledge they have. For me, I ran into trouble when I tried to port CyanogenMod to a different device on my own. I found that my knowledge was not quite up to par. Studying java is helping me in regards to both ROM development, & app development as well. It's just what I need because I also want to make games.
Very nice guide. I can tell you spent a lot of time putting this together. thank you!
I already had a mostly working Android SDK, and was successfully building kernels for my Ainol Elf2. However, I was never able to build the Elf2 ported version (by Christian Troy) of Cyanogen 10. Perhaps after starting over with my Java installs, this will work now. I have had the Android SDK installed for quite some time, but after v4.2, it would no longer update itself. Now it does.
Not that I want to use 4.2 on my Elf2. I hate they dropped Bluez and now USB Bluetooth dongles no longer work. That is a show stopper for my Elf2. However, my newly purchased Samsung GS3 might benefit nicely. I plan on starting to build a new kernel for this tonight.
BTW, I am still on Fedora 14 32bit, because I also hate Gnome 3 and the latest KDE's as well. My F14 is still kicking along just fine, with updates manually compiled by me.
Nice Job!
Thanks for sharing!! Good job!!
lexridge said:
Very nice guide. I can tell you spent a lot of time putting this together. thank you!
I already had a mostly working Android SDK, and was successfully building kernels for my Ainol Elf2. However, I was never able to build the Elf2 ported version (by Christian Troy) of Cyanogen 10. Perhaps after starting over with my Java installs, this will work now. I have had the Android SDK installed for quite some time, but after v4.2, it would no longer update itself. Now it does.
Not that I want to use 4.2 on my Elf2. I hate they dropped Bluez and now USB Bluetooth dongles no longer work. That is a show stopper for my Elf2. However, my newly purchased Samsung GS3 might benefit nicely. I plan on starting to build a new kernel for this tonight.
BTW, I am still on Fedora 14 32bit, because I also hate Gnome 3 and the latest KDE's as well. My F14 is still kicking along just fine, with updates manually compiled by me.
Nice Job!
Click to expand...
Click to collapse
Thanks!!! Yes, I did spend quite a bit of time on it. I always try to do everything as perfect as I can.
What a coincidence... It was messing around with my Ainol Novo7 Crystal tab that really pushed me into this journey of learning. I think that one & the Elfii are almost the same. That Christian Troy guy seems to be an absolute Linux master. I hope I can be as good as him someday.
I think many people should use Fedora. It may not be so easy for beginners, but the more people that help by writing helpful guides for different things, the easier it will be to transition to. It's really great. I even run it on my little Acer Aspire One A522 netbook with no problems.
Sent from my Galaxy Nexus using xda premium
PotatotreeSoft said:
Thanks for sharing!! Good job!!
Click to expand...
Click to collapse
Thank you!!! I hope it helps many people.
Sent from my Galaxy Nexus using xda premium
Thanks for "going the extra mile" (x10!) and taking the time to lay out such a well-organized procedure. Describing potential pitfalls is quite valuable as well. Sharing learning experiences helps everyone. And good luck with Java.
!!!WARNING!!! Here is what I mentioned all the way at the beginning. Please don't forget the most important thing of all: those damn hidden ".directory" files. Any time you change the folder views in Dolphin File Manager, it places a hidden ".directory" file in that folder. THESE HIDDEN FILES WILL DESTROY YOUR BUILD!!! I went through hell with this, trying to figure out what was going on. I always set up the Android folders to show in "details" view mode, so that they're easier to see. Every time I tried to build, it would build for 5 or 10 minutes, & then fail, citing errors in java. I eventually realized that the ".directory" files were the cause of all the problems.
Click to expand...
Click to collapse
You can disable this via:
Menu: Settings > Configure Dolphin > General > Behaviour and set it to common view for all folders. Found here
hi, im stuck ins this step
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/Android-Development/Builds/bin/repo
how can i make this work??
what im missing??
sorry and thanks
plmosqueda said:
hi, im stuck ins this step
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/Android-Development/Builds/bin/repo
how can i make this work??
what im missing??
sorry and thanks
Click to expand...
Click to collapse
Oh, hello. Sorry, I've been away for a very long time. It's cause I'm so busy trying to fix my screwed up life.
Were you still having trouble with this??? Does anything happen at all when you type the command??? I haven't done this in quite a long time now, but if I remember right, I think that this command looks like it doesn't do anything, but it really does. Be sure to check your folders for the repo command afterwards. Curl is a program you can use for downloading things. As long as you have it installed, it should at least tell you something when you type it in. By the way, nice Gameboy.
3ndymion218 said:
Oh, hello. Sorry, I've been away for a very long time. It's cause I'm so busy trying to fix my screwed up life.
Were you still having trouble with this??? Does anything happen at all when you type the command??? I haven't done this in quite a long time now, but if I remember right, I think that this command looks like it doesn't do anything, but it really does. Be sure to check your folders for the repo command afterwards. Curl is a program you can use for downloading things. As long as you have it installed, it should at least tell you something when you type it in. By the way, nice Gameboy.
Click to expand...
Click to collapse
Done XD, i was having ṕroblems with the global path. Well in now in Arch. All works fine, im trying to make a custon recovery for alcatel Ot 983
A bit late to the party but just found this great guide , too bad I didnt find it one year ago It took me almost a full day to figure all this out using Eclipse Kepler to dl the sdk and Nano to write new rules (had to find the rules...) ...
But all in all once you have done it one time seems to me the process is more straitfoward than with a comparable ubuntu system
this well written guide deserves more publicity!
Thanks!

Debian Buster WSL2 Kernel / ROM Builder [replaces VM]

Okay I don't have enough time to update this whole description, no one volunteered to host the VM so now I only have a Debian Buster WSL2 (Windows 10 latest) build environment. You can make kernels and ROMs from it. It has a built in XFCE4 and all the features listed below. It will build kernels for you from source and place them in AnyKernel3 zip files ready for flashing in the ~/ directory. Build scripts are provided for Op8T 5G custom and GPUOC RadioActive Kernels from my GitHub (modded for performance + battery). You can use this guide and get full audio and a GUI and all you need to build.
Try out this build for Debian Buster for WSL2:
First you need to ensure you are on a recent build of Windows, go to windows Updates in settings and download the latest.
Next open a Powershell Command Prompt in Admin mode. Type:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Restart your PC, then get back into an Admin Powershell prompt and type:
wsl --set-default-version 2
Next you can download this tar.gz distribution, it's quite big (6GB zipped -> 14GB unzipped). Apparently you can import a tar.gz directly, so I changed it from a .zip file to .gz: https://mega.nz/file/DkARXIjD#hGu8TjxaA__YrRsfqfWJw9-2ViyyntyK5U8JdClor6A
Easily move WSL distributions between Windows 10 machines with import and export!
wsl --import <DistributionName> <InstallLocation> <Full path to .tar/.tar.gz FileName>
After import, you should type: login: user password: user (also the sudo password) change the Global Git settings to your own email and username.
Open the command line.
Set your username: git config --global user.name "FIRST_NAME LAST_NAME"
Set your email address: git config --global user.email "[email protected]"
Then if you want to set up SSH between your WSL2 instance and NoMachine, download NoMachine here for your host PC: https://www.nomachine.com/download/download&id=8 then follow the steps to generate an SSH key, which will be located at ~/.ssh.
ssh-keygen -m PEM -t rsa -b 4096
Use the directory default ~/.ssh/
Then copy this file: ~/.ssh/id_rsa.pub to ~/.nx/config/authorized.crt
In the NoMachine GUI, you should select Configuration, Use a key based authentication key which you provide, then provide the path to the private key \\wsl$\debian\home\user\.ssh\id_rsa and check the box Import the key to the connection file.
To get to the XFCE4 GUI, you should type login: user password: user, then run /.nomachine.sh
It will post the IPV6 address you need to enter into the configuration into NoMachine on Windows 10. It changes every time you open it (WSL2 problem).
Now you should be able to connect to the GUI and use all the dev tools built in. Or you can just use the command line if you're more comfortable there. You'll probably need to do some more Googling to get everything setup the way you like. There are 2 examples in this file for an Op8T RadioActive modded kernel from my GitHub repos with a ./Build-Clang12.sh script you can use to see how to build a kernel. It it fully automatic. It will generate the zip specified in that file in the ~/ directory which can be flashed to a device via EX Kernel Manager or FK Kernel Manager. Best of luck!
Great job mate. I hope this is the kick off and boost up kernel development on the MI9 ??
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
kickassdave said:
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
Click to expand...
Click to collapse
Thanks Dave - this is the absolute easiest way to build a kernel. Yes it took forever to get working, a lot had to do with bad Xiaomi source code and Android 9 package requirements for building kernels. You can simply download, install, click Goto Build, click on QClang8_Build, copy/paste it's text from Geany into the open terminal, sit back and wait for the build to finish. Then once it completes, you click on Built Kernels and you have your image ready. A few more steps obviously outlined in the post to transfer to the host machine (cp Image-dtb /media/sf_VMxfer) and pack via Android Image Kitchen, copy to the device, and flash via TWRP. Most features require Magisk patching as well to enable altering in a kernel manager. The mentioned repo (mrslezak) has Fsync toggle, 830GPU overclock, and F2FS file system support (Mauro TWRP has just enabled it, so I'm using it now). I should note as well that this kernel has only been tested on MIUI and Xiaomi.eu builds thus far (anything based on Xiaomi MIUI should work - MIUI Global Dev, China Dev, Xiaomi.eu, MiGlobe, RevolutionOS, etc. as long as it is Android Pie).
I'm waiting on others to jump on board!!!! Hopefully it happens
Excellent guide, will work for almost all pie devices!
Great work OP :highfive:
Regards,
acervenky
Hi, @mslezak @acervenky Can you help me to build kernel for Stock Miui 10 for K20/Mi9t . I followed your guide setup all requirement i just changed the device code name from cepheus to davinci everything went well kernel complied and also created the boot.img with AIK but after flash it is through back me to recovery.
Can you Please help me with this.
@acervenky fixed that by applying the patch in the Desktop Mi9_Build_Tools/Required_Patches_to_Compile_Xiaomi_Source/cosmin_kernel-module.c copy that to /kernel/module.c, he can chime in here. Or check out his repo he has one on Github that compiles already QUAX kernel I believe with a bunch of stuff added already over stock.
Good job. Compiled a kernel for mi9t pro (raphael) with your detailed guide.
Can you help with "make modules" command?
I need to make xt_HL.ko module, but it not compiling ((
Not needed anymore, made it successfully.
Can you compile q kernels with this?
asgardpark said:
Can you compile q kernels with this?
Click to expand...
Click to collapse
Yes! Just don't replace .dtsi and module.c files for now.
Regards,
acervenky
New Q build VM coming soon. GCC10 x64 and Arter97 GCC9 x32 toolchain.
Just a notice here I have a VM almost ready to upload that can build Mi9 source. It's a ton of patches to stock code but I'll setup a repo with them already applied.
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Yes AnyKernel3 is the easiest
asgardpark said:
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
Click to expand...
Click to collapse
Sure AnyKernel3 is easy, take someone's kernel zip, insert your Image-gz.dtb or Image-dtb into the root of the zip, delete the other kernel, and you should be able to flash it.
got some compile errors today when i tried your wm
/home/user/toolchains/aarch64-linux-elf/bin/aarch64-linux-elf-ar: kernel/resource.o: No such file or directory
I'd first try a: make clean; and: make mrproper;....
But here's more info:
Double click the GoTo Build icon, a terminal will open in the source directory. Then in the terminal: cp /home/user/Desktop/Build GCC10 Cepheus.sh .; chmod +x "Build GCC10 Cepheus.sh"; ./"Build GCC10 Cepheus.sh"; Once done the kernel will be in /home/user/Cepheus-Raphael-Q-GCC10/out/arch/arm64/boot/Image.gz-dtb. /out9TP/ for Raphael, just substitute the build script you need.
If it then still won't build, you'll have to grab the repo again. Type: git pull
Or the safest is a complete re-download: cd ..; rm -rf Cepheus-Raphael-Q-GCC10; git clone --depth=1 https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10.git and repeat the prior copying of the build script to the source directory.
I tested this last night and it worked. If I tried to just drag the script into a terminal window it failed. There could be some dirty files in there not sure how that happened, but deleting and cloning again definitely works. I built both Cepheus and Raphael kernels last night in the VM off a fresh clone of the repo. I'd update I but it literally takes 6hrs + since the files are huge and take forever to compress and upload to Mega. And I have to delete so much off my VM and SSD just to do it. This way you learn something too
I first drag n dropped the file when i got the error, then i remembered when i compiled kernels for my raspberry pi's it also failed if i draged n dropped my build script so i did it the proper way and it worked
Thanks for your WM it's working great
mslezak said:
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Click to expand...
Click to collapse
Could you upload the VM to Google Driver? Thank you!
q659503934 said:
Could you upload the VM to Google Driver? Thank you!
Click to expand...
Click to collapse
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
mslezak said:
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
Click to expand...
Click to collapse
Do you have WSL2 tar file that can build Kernel?

[ROM][COMPILING][HELP]LMX210ULMA K8+ custom rom and kernel Q&A

I am in no way resposible for any negative effects to your device by trying any of this for yourself. Including bricking your device, divorce, nuclear meltdown, zombie apocalypse or any other malfeasance. Try at your own risk.
Hi guys
Im still a jr member here and learning but ive rooted a few phones and ported a twrp and now I want to build a custom kernel and ROM for my new phone the K8+ 2018 LMX210ULMA. I plan to do this all from the phone im building the ROM for using termux and Anlinux to install Ubuntu and all the proper build essentials. So lets get started!!!
First i have some questions and then ill note where i am in my project. Ive actually been working on this for a while using this and that thread but i have some questions i have never been able to find answers to. Like.......
1. Does the kernel source code need to be unpacked in the same folder as the device source code?
2. How can i build seperate modules like bootloader or recovery or anything else.
3. Is there a way for some one who has a locked network carrier device to build a kernel that is unlocked.
4. How do you find device, vendor and kernel trees for a device that hasnt been publicly built yet?
5. When installing dependency libraries to ubuntu what do i do when Ubuntu is unable to locate a package. For examle: lib32ncurses5-dev lib32z-dev and lib32esd1.0-dev
Ok now lets get to setting up the envrinonment or at least what i have so far.
A rooted phone is needed to get the job done as far as far as i know so you might want to work on that first. My particular phone variant doesnt seem to have a recovery option just yet due to some bit of hiding of hiding the fastboot mode but im hoping by compiling a custom ROM and Kernel i can alleviate that and help myself and all the other good folks that want to fully root thier phone and also learn to make thier own custom ROM.
So far im rooted using a temp root that utilizes an exploit called mtk-su. It gives basic root privilages and allowed me to make a couple changes to my build prop like adoptable storage and allow some changes here and there with out upsetting the system partition to much.
You will need adoptable storage storage for this to work as repo will need to unload ton of source code to your device so 32+ gigs of internal storage will be needed.
Im not going to go into the specifics of the two forementiined needs but a quick search should point you in the right direction and get you going.
1. Install termux and installed the basic packages in the welcome plus:
Code:
pkg install libandroid-support libandroid-support-static libandroid-shmem libandroid-shmem-static libusb libusb-static libccid
2. Install Anlinux and follow the instructions to build Ubuntu within the termux environment. Make sure to do it as root which is essential for this to work correctly.
3. Install a vnc viewer. I dont really use it. It would be nice to have a way to use a web browser with in it but so far no go.
4. Once you have Ubuntu built and started its time to install more dependecies. Yay!
Code:
apt-get install sudo
Code:
sudo apt-get install software-properties-common
Code:
sudo apt-get install bison build-essential curl ccache flex libncurses5-dev libsdl1.2-dev libxml2 libxml2-utils lzop pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev git-core make android-sdk gperf openjdk-8-jdk -y
So far i have been able to install all but 3 of the dependecies needed. Lib32ncurses5-dev lib32z1-dev and lib32esd0-dev any one knowing a work around or way to locate and install them please for the love of android speak up.
5. Now lets do some more setting up the build environment with repo. I have tp say repo is a pretty cool tool here but it has its problems. First the repo init command is sketchy and doesnt always work. I had a hard time with it at first. Second even though you tell it which manifest exactly you want to download it will download others as well and draw source code from every other build. This is a problem as it downloads every pre-built toolchain in the repisitory and almost every android repository in existance. They talk about the source code from repo taking up so much space well that is exactly why. Ive been compiling in C++ for years and i have never seen such a mess. But so be it. Maybe the android gods will straighten it out someday and make it easier and consume less space by only downloading the appropriate source code needed by your specific build.
This is the end of this post so i have to finish up on the next BRB
Ok im back. Hows going androids? I am not a robot! But a few of my friends might disagree with statement.
I left off and we were about to finish up the build environment and get repo started so lets do that and i will tell you about the first big snag in the project next to not being able to find those three dependency libraries stated above.
Here we go first we create a new bin folder just for compiling android in the HOME folder of your ubuntu operating system then we set its path, download the repo launcher and set up our scripts.
By the way i probably should have mentioned this earlier but i assume every body at this point has some command line experience and should know that you copy these comnands and paste them one at a time. Please do not copy a whole code block at one time and paste it to your terminal or your gonna have a bad time like when you pizza when you are supposed to french fry.
Code:
mkdir ~/bin
PATH=~/bin:$PATH
cd ~/bin
curl
i can't help you much but i hope you won't brick your device. it would be easier for Mediatek there you can always restore from SP Flash Tool. for Qualcomm your only chance is to put it into EDL mode/ Qualcomm HS-USB QDLoader 9008 Driver with test point and flash with QPST/ LGUP. I recommend to figure out how to unbrick before you start flashing lk
also maybe helpful this link for understanding boot chain
http://www.lieberbiber.de/2015/07/05/mediatek-details-little-kernel
Any body know why i when i try to finish my lil tutorial here i cant do any more code blocks?
it's a bug in forum. i can't even post ls -l
i don't know much about compiling but i would scan lk.bin for strings containing oem fastboot commands (if they still left somewhere), and then scan the whole source code for respective strings in order to find the required build tree
Um well the problem is that im not familiar with the source code components and there are soooooooo
many components and lil info and no common place so far but here to ask questions and where do i start my questions.
Like what is the bootloader source code called. I guess i could load it up in android studio and do a search of all strings that way.
Right now im trying to grasp why all of a sudden 3 lmx210 variants known to be easily bl unlockable are now not. Lg is pkaying dumb or thier drones arent equipped with the proper knowledge
idk download from opensource.lge.com and search for fastboot
Code:
grep -ir fastboot .
kernel-3.18/arch/arm/boot/compressed/sdhi-shmobile.c
kernel-3.18/arch/parisc/kernel/process.c
kernel-3.18/drivers/gpu/drm/i915/i915_params.c
kernel-3.18/drivers/gpu/drm/i915/intel_display.c
kernel-3.18/drivers/gpu/drm/i915/intel_fbdev.c
kernel-3.18/drivers/mfd/si476x-cmd.c
kernel-3.18/drivers/misc/mediatek/usb2jtag/Kconfig
kernel-3.18/drivers/net/ethernet/broadcom/tg3.c
kernel-3.18/include/linux/mfd/si476x-platform.h
btw why don't you cross-compile on linux machine, this would be probably easier as it seems it is well documented.
if one can help you re-enable fastboot in lk then its member @xyz`
Ok i want to do an experimental kernel build for my Alcatel tetra to try some things i hope to implement into my lmx210 build.
Can someone help me figure out to add a few of these options...'
Overclocked cpu or adjustable clock speed
Devtmpfs so i can fastboot other phones
power enabled otg
Loop device
Also which android kernel source should i download. Upstream or experimental or what. I just know i need a 4.4 + kernel
Alexcs.... Its an experimental issue with compiling on phone to see if there is a way to configure the system to allow for every thing needed to be able to do so. I cant always get to my pc and dont always have the option to dual boot or ubuntu. Some folks may not have access at all or only enough time to flash thier phone.
In this case the person compiling could build thier rom on thier device then take it and flash it when they can get to a pc
Ok i need some help here. pleeeeeeeaaaassee
i have been trying to compile a kernel for the Aristo 2 LMX210MA for three days and im about to lose it. My steps this far....
install ubuntu 18 on aristo 2
mkdir -p ~/kernel
cd ~/kernel
copied kernel source from storage and tar xvzf'd it
read the read me file for instruction and to get the name of the prebuilt tool chain. downloaded the toolchain and copied it to the /kernel/msm-3.18/android folder in ubuntu fs and tar xvzf`d it there as per read me file. made a few tweaks to the defconfig file. i wanted to build a devtmpfs and have full fs control over otg devices.
now i run these commands from msm-3.18 folder.........
mkdir -p out
make ARCH=arm O=./out cv1_lao_com-perf_defconfig
every thing goes fine til i run the next command and then it says no such file or directory for the androideabi-gcc file that is clearly in the tool chain and in the right place. and yes i set my path right i yell at the compiler on my phone.
make ARCH=arm O=./out CROSS_COMPILE=$(pwd)/root/kernel/kernel/msm-3.18/android/arm-linux-androideabi-4.9/bin/arm-linux-androideabi- KERNEL_COMPRESSION_SUFFIX=gz -j4
hello is there any one there. Any one at all
Ok i have been trying to compile a rom for months and i cant seem to get any where. I get errors about a freaking gcc wrapper and i have followed the advice i have seen on comoiling rom threads but i still get the errors. Its either that or the toolchains are crap.
Also have a question about compiling lg source code. When all is said and over with will it finish up as a kdz file? Im thinking it has too since thats the only way to flash thier firmware because they are locking up possibilities to unlock the bootloader.
I managed to compile my first kernel tonight. i know the zimage is the one i pack into my spkit image folder but dont know which of the split images to repkace
Ok i think it would be the only one in split image that matches the file type of zimage. I repacked it and flashed it via fast boot but both the repacked and magisk-patched.img return to fastboot upon booting
I wonder what could have gone wrong. The only things i changed were the config_mausb otg hotplug abd devtmpfs
Something i learned from reading the .config file in the out directory after doing the defconfig is that unless you compile your kernel on a pc first and remove a config there is no way to build android or a kernel on your device. Which explains months of aggravation and wonder. Yea they prohibit it but you can change the value and then do as you please

Categories

Resources