Building your own ROM

rukin5197

Well-known member
May 26, 2011
1,105
628
0
Visit site
Maybe someone can help me understand... We have sources so why decompile apks? Why not just build them like you want to start with?

I'm sure it's much easier for people to open up a terminal and type in a short command rather than learn git and have to build apks over git. It's sure easier for us, but easier for them at the same time.
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Well personally, I hate looking through smali files that give you few clues as to what the function calls are or how they interact. Too much of a guessing game for me.

With source code, there's no guessing game, and usually comments to help you understand what is happening and why. ;)
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
Trying to set everything up and I get this.

Code:
[SIZE="2"]mike@mike-Theatrelite:~$ sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
[sudo] password for mike: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source[/SIZE]

I have Java JDK6 and Android-SDK.
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
You have to get sun java6 from a different source, I can't remember if I used lucid or multiverse or both:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
// or
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"
 

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Well personally, I hate looking through smali files that give you few clues as to what the function calls are or how they interact. Too much of a guessing game for me.

With source code, there's no guessing game, and usually comments to help you understand what is happening and why. ;)

As gannon said, its easy to type one command to get it to recompile and another to get it to compile. I began learning programming last year and so doing the de and re compiling is pretty simple since I sorta want to see the source change a couple things and build.

Also I'm on windows 7 and I have no idea what git is or where to find the source code for the apps I was modifying. Apktool seemed pretty straight forward since it takes all the files in the given folder and compiles them into an apk.

If I can't get this tool to work and xda doesnt yield anything, where exactly would I start to build apps from source... I've followed googles directions on their development pages.

Sent from my VM670 using Tapatalk
 

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Ok, I failed to sign the apks after building them, and the system didn't like it. After signing the app I modified, it installed perfectly :)
Now I can mod to my hearts content and not worry about those irritating .9.pngs :D
Its really simple using apktool actually, although I'm sure the original source is much easier to understand since it contains comment lines.

I'm still interested in the original source, where can I find that? Somewhere with git???

Sent from my LG-VM670 using Tapatalk
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
You have to get sun java6 from a different source, I can't remember if I used lucid or multiverse or both:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
// or
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"

Using both those returned nothing, so I assume that have the right ones

Code:
m[SIZE="2"]ike@mike-Theatrelite:~$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
[sudo] password for mike: 
mike@mike-Theatrelite:~$ sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"
mike@mike-Theatrelite:~$ [/SIZE]
 

flapjack.fiasco

Well-known member
Sep 13, 2011
776
102
0
Visit site
Ok, I failed to sign the apks after building them, and the system didn't like it. After signing the app I modified, it installed perfectly :)
Now I can mod to my hearts content and not worry about those irritating .9.pngs :D
Its really simple using apktool actually, although I'm sure the original source is much easier to understand since it contains comment lines.

I'm still interested in the original source, where can I find that? Somewhere with git???

Sent from my LG-VM670 using Tapatalk

Start out with the OP of this thread. It walks you through step-by-step.

Sent from my LG-VM670 using Tapatalk
 
  • Like
Reactions: anthonycr

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Start out with the OP of this thread. It walks you through step-by-step.

Sent from my LG-VM670 using Tapatalk

Right. Why didn't I look there first :banghead:

Sent from my LG-VM670 using Tapatalk

Edit: wait, but how can I get the source code without being in Linux, since all the pulling commands are Linux?
 
Last edited:

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Using both those returned nothing, so I assume that have the right ones

Code:
m[SIZE="2"]ike@mike-Theatrelite:~$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
[sudo] password for mike: 
mike@mike-Theatrelite:~$ sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"
mike@mike-Theatrelite:~$ [/SIZE]

Those commands shouldn't return anything unless there is an error. So now you run the original apt-get install commands, and you should get the proper java. ;)
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
I'm trying to make a manifest converter for Leslie's ICS box so that folks can sync from the local mirror instead of having to each pull down their own data independently (at several GB per user, I'm sure). Problem is, the CM9 manifest.xml looks like this:

Code:
  <remote  name="github"
           fetch=".."
           review="review.cyanogenmod.com" />

Which corresponds to this change:

Code:
commit 89acec784fd50305cc55d05ecb3416fcd7c3eb0e
Author: Koushik Dutta <koushd@gmail.com>
Date:   Wed Feb 29 10:44:16 2012 -0800

    switch to whatever protocol people init the repo with
    
    Change-Id: If99f3f646a25918abeaccfaf29d63e6a73d6a827

diff --git a/default.xml b/default.xml
index 2a0ba15..6eebcc8 100644
--- a/default.xml
+++ b/default.xml
@@ -5,7 +5,7 @@
            fetch="https://android.googlesource.com/" />
 
   <remote  name="github"
-           fetch="http://github.com/"
+           fetch=".."
            review="review.cyanogenmod.com" />
 
   <default revision="refs/heads/ics"

Now the problem I'm having is, how the heck does the repo script translate ".." into "http://github.com/"? I'm thinking it must be relative to the default remote for the manifests:

Code:
icsbox:~/src/test$ cd .repo/manifests
icsbox:~/src/test/.repo/manifests$ git remote -v
origin	git://github.com/CyanogenMod/android.git (fetch)
origin	git://github.com/CyanogenMod/android.git (push)
icsbox:~/src/test/.repo/manifests$

So, taking "git://github.com/CyanogenMod/android.git" and chopping off the project name and adding ".." yields "git://github.com/CyanogenMod/.." which is equivalent to "git://github.com/".

Does that make sense, or have I had too much coffee?

Regardless, can anyone point me to documentation for relative paths in repo manifests just to be sure?
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
CM has officially grown from a l33t project into a big, lumbering beast:

Code:
commit ab1991f33d9da9453bddf0b5f779c561603ba844
Author: Steve Kondik <shade@chemlab.org>
Date:   Thu Mar 29 15:27:14 2012 -0700

    cm: Kill this meme already.
    
     * Change -KANG to -UNOFFICIAL since too many people just don't get it.
    
    Change-Id: I1992c0dab85f54c23ed4553a3c649775ade55893
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
I'm trying to make a manifest converter for Leslie's ICS box so that folks can sync from the local mirror instead of having to each pull down their own data independently (at several GB per user, I'm sure). Problem is, the CM9 manifest.xml looks like this:

Code:
  <remote  name="github"
           fetch=".."
           review="review.cyanogenmod.com" />

Which corresponds to this change:

Code:
commit 89acec784fd50305cc55d05ecb3416fcd7c3eb0e
Author: Koushik Dutta <koushd@gmail.com>
Date:   Wed Feb 29 10:44:16 2012 -0800

    switch to whatever protocol people init the repo with
    
    Change-Id: If99f3f646a25918abeaccfaf29d63e6a73d6a827

diff --git a/default.xml b/default.xml
index 2a0ba15..6eebcc8 100644
--- a/default.xml
+++ b/default.xml
@@ -5,7 +5,7 @@
            fetch="https://android.googlesource.com/" />
 
   <remote  name="github"
-           fetch="http://github.com/"
+           fetch=".."
            review="review.cyanogenmod.com" />
 
   <default revision="refs/heads/ics"

Now the problem I'm having is, how the heck does the repo script translate ".." into "http://github.com/"? I'm thinking it must be relative to the default remote for the manifests:

Code:
icsbox:~/src/test$ cd .repo/manifests
icsbox:~/src/test/.repo/manifests$ git remote -v
origin	git://github.com/CyanogenMod/android.git (fetch)
origin	git://github.com/CyanogenMod/android.git (push)
icsbox:~/src/test/.repo/manifests$

So, taking "git://github.com/CyanogenMod/android.git" and chopping off the project name and adding ".." yields "git://github.com/CyanogenMod/.." which is equivalent to "git://github.com/".

Does that make sense, or have I had too much coffee?

Regardless, can anyone point me to documentation for relative paths in repo manifests just to be sure?
Looks like it defaults to what you use when you run init:
Code:
switch to whatever protocol people init the repo with
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
Looks like it defaults to what you use when you run init:

Right. It does look that way. But if you read .repo/repo/docs/manifest-format.txt, you will note a lack of documentation on the specifics of the project fetch attribute. Are there any other docs around that explain the details better? I really don't want to go hunting through python code to find out because I am really not very literate in python (and don't care to be).
 

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Question: I can't decompile non-deodexed apks right?

Sent from my LG-VM670 using Tapatalk

Edit: ignore this question. I was able to compile the apks.
 
Last edited:

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
I'm also trying to figure out how to get my build tree synced back in time (say, to N days ago). But I'm enough of a git noob that I can't figure it out. I have a script that parses manifest.xml and runs through all the directories but I don't know the command to sync the git tree.

If you look in manifest.xml for CM9, for example, you will see the default revision is "refs/heads/ics". So let's take the first project entry, which is "build". It uses the default so...

Code:
$ cd build
$ git checkout refs/heads/ics
error: pathspec 'refs/heads/ics' did not match any file(s) known to git.
$ git show-ref | grep ics
569e20838ebaf6e7ce1fc517602a9976e67f6e1c refs/remotes/github/ics
569e20838ebaf6e7ce1fc517602a9976e67f6e1c refs/remotes/m/ics

So .. uhh .. where is "refs/heads/ics" and how do I sync to it?
 

something15525

Well-known member
Dec 13, 2010
59
3
0
Visit site
Run repo sync -j1

Sent from my LG-VM670 using Tapatalk 2 Beta-4

I'm getting the same problem. Trying this now. Why is the regular command not working?

Just a theory, I am at a different house with slower internet...could it be because the internet hear can't handle multiple threads trying to grab from sources at the same time?

EDIT: It didn't work. Took longer to get the same error.
 
Last edited:

Members online

Forum statistics

Threads
943,144
Messages
6,917,506
Members
3,158,841
Latest member
kirk781