TeamCody Discussion thread!

Search This thread

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Team Cody!

Member List (in no particular order):


WANTED
- Testers - to beat the hell out of our ROMs
- Graphic Designers - boot logos, wallpapers, banners(one or two people)
- Themers - theme EVERYTHING!!!
- Co-Dev(s) - Do i really know what I'm doing most of the time (the answer to that is "probably not")
- Moral Support - LOL
- Suggestions - anything you got - Lay It On Meh!!
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
todo list:
generalise this :p


  • First, finish the work on "reverse mounter"; as it is *technically speaking* easy (for me, to write scripts, that do things); and is pretty straight forward (no aimless edits or so)
  • fix gps in omni
  • fix video recording in omni
  • udpate twrp
  • switch to wlan0 in omni

random trolling lol :D
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Compiling CM11/Kitkat for pico!

I assume you have knowledge of building with source, even if not, I don't really care (for there are a lot of guides).

First, get *all* the required packages installed. As for what I mean by *all*, is not really a question for me to answer. I used <insert-random-guide-from-xda> here, and the source.android.com's guide on initializing, just to be sure.

As for java, I use openjdk. *most* sources today support openjdk, elseways, either, you could force it to be compatible by removing just ONE line in build/core/main.mk

So, that's the packages part.

As for syncing sources, as most guides say, you DON'T need to use a ~/system folder or anything. You can use a folder, anywhere.

Just open up a shell, wherever you want to get the sources synced, and type in the following commands.

I assume you have the repo tool installed. IMHO, you should really create a "bin" folder in your homefolder (short linked as "~/") using the following commands:
Code:
mkdir -p ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Then, open up your ~/.bashrc file, using Geany (a better alternative to Gedit, perhaps :confused: ), using the command:
Code:
geany ~/.bashrc

Just insert this line, randomly (preferrably at the end of the file).

Code:
PATH=$PATH:/home/<insert-your-username>/bin


Now, for syncing sources. Make sure you are a directory above working folder.
Code:
mkdir -p <insert-ROM-name>
cd <insert-ROM-name>

Now, that you are inside the working folder, take your pick about the ROM that you are going to compile. This tutorial is for CM11, so i'd be running the following command.

Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0

Yes, you can reference this from a cm10.2 source that you've already downloaded, and this will reduce the size required to download. Why, you could even reference this from an ICS source (just saying, not meant to be even tried).

If you aren't really building for mac, I'd suggest that you don't download the darwin repos.

Short way that I use:
Run following command in working folder.
Code:
mkdir -p .repo/local_manifests
grep "darwin" .repo/manifests/default.xml > .repo/local_manifests/local_manifest.xml

Open up local_manifest.xml using
Code:
geany .repo/local_manifests/local_manifest.xml

Add these lines on top:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>

and the following line at end.
Code:
</manifest>

Now open up "search and replace" dialog box.

Search for:
Code:
<project
and replace with:
Code:
<remove-project

Voila, you've removed all the unnecessary darwin repos.

Now, for repo syncing.

I'd seriously suggest that if you live in parts of the world where the internet speeds are less than 1 m'b'ps (~128 k'B'ps (worst case, mine's around 60 k'B'ps, and I've known people with speeds ranging 30 k'B'ps), you'd sync just one repo at a time (the -jx).
run:
Code:
repo sync -j1

Else, if you have a super fast internet connection, please don't brag. Use a higher number, preferably 3, or 4.


Now, sync these repos, while I attend my classes. I'd return back and write part 2.
edit: part 2; go here: http://xdaforums.com/showpost.php?p=49349691&postcount=8
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Compiling CM11/Kitkat for pico! PART 2

reserved

Also, yes, you could use this localmanifest here: https://github.com/PicoKat/local_manifest/blob/dev/local_manifest.xml

but, you'd miss out the learning process :p

Anyways, this post would take up part 2 of the tutorial.


This is purely device specific. and, there's already a guide on android development section (of this device), the reason why I didn't make a new thread.


part 2 begins here:

Ok, so, you'd synced the repos?

Now, as opposed to roomservice, I'd prefer manually cloning the device tree, kernel, and vendors.

Clone a device tree (galaxyfreak's, or mine), into /device/htc/pico.
Clone the kernel sources from here: https://github.com/PicoKat/android_kernel_htc_pico
Clone the vendor tree from here: https://github.com/PicoKat/android_vendor_htc_pico
(note: if you are using my device tree, that has ION, you'd have to use my vendor tree, with updated blobs here: https://github.com/vineethraj49/android_vendor_htc_pico)

Ok, so that part's setup.



Now, lets move on to cherry-picking, and/or patching some stuff (from legaCyMod).
Note: you could have just added these to local_manifest too...

android_build:
Hopefully, you should know how to add remotes, and working with them, if not, click on the show content, below (as a sample for android_build):

Code:
git remote add legacymod git://github.com/legaCyMod/android_build.git
git fetch legacymod cm-11.0
git cherry-pick <commit-id>

where commit id's the looong "number" following /commit/ in the URL.


1. always rebuild build.prop
2. bringing back squisher
3. Removing TTS data
4. Revert adding auditd
5. add kitkat sdk versions
6. Revert "add drawables for all densities" (seriously, this saves space.)
7. adding support for our recovery :p

frameworks/av:
1. enable meta mode for video msm7x27a
2.bring back support for legacy omx
3. support legacy qcom audio variant

vendor/cm:
1. bring back squisher
2. revert adb authentication (yea, screw adb while dev'ving
3. remove ze bloats

Next, clone media-legacy to hardware/qcom/media-legacy, and display-legacy to hardware/qcom/display-legacy.


waait!!!!

You need to do some patches in some files. required to fix up camera.

patch two files, manually, making some sense out of this:
frameworks/base: https://github.com/szezso/vivo_cm11_patches/blob/d819363fe7d181e73841d3fa35c1b8c0c7d7c046/frameworks_base.patch
frameworks/av: https://github.com/szezso/vivo_cm11_patches/blob/2f1c87f4453c1c7c88e3c7d2b011994f894fe669/frameworks_av.patch

The next step:

Get prebuilts, seriously.

Code:
cd vendor/cm
./get-prebuilts

Then, "cd" back to root of source dir.

Run the following commands:

Code:
. build/envsetup.sh
brunch pico -j4

Hopefully, you should see an output package by the end of <insert-time-directly-propotional-to-crappiness-of-computer>
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
For batch-resizing bootanimation (in linux):

resizing part:

Code:
for file in *.png; do convert $file -resize 320x320! $file; done

you'd know which part to edit ;)


for zip'ing part:
Code:
zip -r -y -q -0 bootanimation.zip *

will edit this later :p
 

v_superuser

Senior Member
Jan 3, 2013
485
1,492
25
Jammu
Using CCahe

Now something very important who gonna compile ROMs, use CCache. It'll spped up the building process. ;)
CCache - Compiler cache

How to use?

> Open a Terminal(Ctrl+Alt+T)
>
Code:
gedit /.bashrc
[You can use any alternative to gedit :p )
> Add the following lines to it:

Code:
export USE_CCACHE=1
export CCACHE_DIR=/[COLOR="Red"]source[/COLOR]/prebuilts/misc/linux-x86/ccache

Source here is the folder in which you have the code downloaded.

>
Code:
cd source
>
Code:
prebuilts/misc/linux-x86/ccache/ccache -M [COLOR="red"]25G[/COLOR]

25G = 25 GB of space to be used as CCache. ;) You can use any value in this. :D

How does ccache work ?

Well , in short , what it does is that for C and C++ programs it caches the output. One it detects that the program is getting repeated it directly sends out the output and thus reduces the time of compilation.

After using ccache you will really feel the difference in the compilation speeds of your ROMs and kernels. //Copied. :p

Credits - Red Devil. ;) :p
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
I use CCACHE, but the only difference is that I don't specify the directory. also, I did a "apt-get install ccache" long ago, and set file size according to that. :D Its still working just as fine.

and oh, yes, adding that USE_CCACHE=1 to .bashrc is required ;)
 
  • Like
Reactions: v_superuser

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
IRC and you!

In case you came here via my signature, sorry for that. But really, you need to know some stuff about IRC, before going to a channel. The pico channel is #pico :fingers-crossed:

So, you might have heard about IRC, even logged into one (freenode, probably, the webclient of it), (and most probably saw that there was no activity and just closed that browser tab).

Let's take a timeout here to talk about IRC.

Instead of me talking about IRC, (and you being too lazy to Google stuff (not intended to those who solve problems themselves (not noobs (?) :wink: :wink:))), here's a nice article by Rey Bango that you might want to read: IRC is Back: Here's Your Starter Guide

So, instead of me talking blah blah, and you skimming through most parts, which I assume, you did in the above article (considering you taking the energy to read it), here's what you need to know about Freenode:

..but in terms of development, from my experience, most developers tend to jump on Freenode - and rightfully so.

So, just to let you know, in those channels (where you thought there was no activity), there actually is a lot of discussion going on. You just don't know it yet.

So? What am I supposed to do? Keep a browser tab open? Don't expect me to say "Exactly not!" because that too is a viable option, though not very practically possible.

Here's where bouncers come in. Known as BNCs, here's what they do:

A bouncer (BNC for short) is a piece of software used to relay the communication between an IRC client and the network it is connected to, acting as a Proxy.

So, whats the point you ask? The reasons and benefits of using a bouncer are many and include hiding the real IP you are connecting from, protecting your nickname and channel from being taken on networks that don’t provide channel-/nickname registration and most of the time they’ll also notify you of private messages that came in when you’ve been disconnected – of course only when the bouncer can stay online being connected from a server.

Coming as either free or paid (either of them being useful, nonetheless), and cutting all the tech jargon, they allow you to "stay online" allowing you to close that browser tab you feared to keep open.

So, in case you actually read through the above quoted text, software!? Being connected from a server? Nah, just kidding. Here's where online BNC providers come in. They provide you a username, (and of course a password, which you need to select), and they host for you the BNC software (in most cases, ZNC).

Most BNCs allow caching of messages, i.e. buffered playback. Their servers are connected 24x7. You, the user, connect to their server, and through their server join the channels. You then, disconnect from their channel. Poof! But, their server still remains connected to the channels, and logs the messages in the channels, and any PMs sent to you. The next time you connect to their server, it gives you all the logged stuff, and it gets cleared. The next time you disconnect, ... Well, you get the flow.

Questions. That's what you go to IRCs for (mostly. I do it for the conversations :p). How exactly do you ask questions? Similar to on XDA, but slightly different. I couldn't have said better than l3dx's answer on stackexchange:
  • Rule #1: Don't ask to ask
  • Rule #2: Behave as you would do in a real life conversation
  • Rule #3: Be patient. If there is no activity, it usually means that no one has read what you wrote yet. If no one responds, they don't know or didn't notice. You can re-try after a while, or ask if anyone has any clue with regards to your question x minutes ago.

What does Rule #1 mean?
Something very similar to what zxcdw said in the comments:

"Don't ask to ask. Just ask". Don't ask people "Anybody around?" or let alone highlight others to ask if they are around. It's just easier to drop your question, hang around and wait. Ask again in a few hours or so.

Also, use English, in most channels, if possible. Stay safe, don't open any unknown links or links to untested software, scripts and stuff. Stay safe.

IRC clients help you stay connected. A few simple google searches will get you going in the right direction. I personally use XChat IRC on Linux, but there are a lot of other good IRC clients available too.

Free bouncers should do, mostly. I use bnc.im, seen people using EliteBNC, some people installing ZNC in their own private servers that are online 24x7, YMMV.

That's about it for IRCs. Happy chatting!

P.S. Make sure you ask the right questions in the right channels.
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
sys2cache... something to help with less /system partition size.

note: this would be running at boot, with busybox, so,...

Code:
# algo:
#       if read(switch_file=1)
#       goto case 2.
#       else case 1:
#       get /system size
#       get /data size
#       get /cache size
#       check /cache remaining size
#       check for files in /system
#       check for the following folders
#       name            generic size    priority
#       ./etc           3.1M                6
#       ./vendor        36K                 9
#       ./addon.d       12K                 8
#       ./core          76K                 7
#       ./xbin          1.6M                5
#       ./fonts         18M                 1
#       ./usr           21M                 2
#       ./media         4.8M                3
#       ./bin           5.5M                4
#
#       switch = 0;
#       file folder_list;
#       for i in list_args
#       if (getsize($i) < getfreesize(/cache))
#           mv $i /cache/$i
#           mount bind /cache/$i /system/$i #fix syntax
#           ifexists(/system/$i)
#               switch = 1;
#               folder_list >> $i
#           else
#               switch = 0; break;
#       else
#           echo "fak this, we're out of space!"
#       fi
#
#       echo $switch > switch_file
#
#       sync; exit!
#
#
#
#       case 2:
#
#           for i in xargs(folder_list)
#           do
#               mount bind /cache/$i /system/$i #fix syntax
#           done
#
#           sync; exit!
#
#
#
# todo:
#       * actually code this shiz
#       * better error checking
#       * add logging
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
shameless bump.

since my board exams are over (sort of; only CS is left); i thought of building something for pico (a looong time since I did so).

Waht do I build?

At first thought; one *pure* CM9 build with *some* cherry-picks;
another; an updated CM11 build (updated sources and stuff)...

fixing up omx and stuff on Omni is on the "to-do" list and going to take some 'time' to do; so don't expect it to be fixed already :silly:

So; which one do I 'invest' time in? :cyclops:
 
  • Like
Reactions: vaibhav1 and mirhl

Top Liked Posts