yashsingh1/xdaforums huggingface dataset:
[Epic 4G Android Development] AndyYan:
Reviving this thread for personal questions... for [MENTION=4911249]Unjustified Dev[/MENTION] and [MENTION=1517034]Effsi[/MENTION] and others to see:

Well I finally set up my Ubuntu 12.04.2 LTS 64-bit for building for epicmtd, mako and possibly vivo, step by step according to the OFFICIAL CM BUILD GUIDE. Today is my first shot at building and I attempt a CM10.2 build for epicmtd (official guide is for CM10.1, but I modified EVERY branch name to "cm-10.2" and it works until now), but as I go according to the guide, when it's time to "breakfast epicmtd" (or "lunch"), there goes:

While "breakfast mako" returns positive results (sure, first CM10.2 builds are for mako!)

I assume official CM10.2 repo isn't ready for us? Then how could we get builds up?
[Epic 4G Android Development] bthorne79:
The device tree must be added to the device manifest and default manifest or you make your own manifest and have device tree that you can merge in to the repo sync and add your "local_manifest" to the repo manifest to add device specifics in to the CM10.2
[Epic 4G Android Development] AndyYan:
And this means official repo is not ready for us & I have to find a cm-10.2 repo specifically for us, but I don't know any :( Then do I have to wait for official support? Or, as I saw, Nexus 7 (2012) isn't currently officially given cm-10.2 repos but someone managed to pick 4.3 commits and eventually set up his own CM10.2 branch. Is this feasible for an individual like me, with no GitHub account and other services that requires $$$?

Sent from Google Nexus 4 @ CM10.1.2
[Epic 4G Android Development] bthorne79:
Probably not they don't have device specific yet from what I looked at(repo) I'm in the same boat with the gs3 as of now :( maybe in a few weeks
[Epic 4G Android Development] AndyYan:
(sigh) well then I'll have to try porting AOSP 4.3 from Nexus S. :(

Sent from Google Nexus 4 @ CM10.1.2
[Epic 4G Android Development] Unjustified Dev:
too bad if you want 4.3 . I have done a few things myself I will update the kernel

I will work on 4.3 if possible still cant build due to the stupid release tools. all of it wil be on https://github.com/TeamRegular

Kernel updated to 3.0.88 pushed .

Device tree will go 4.3

Releasetool I need to take time to fix it like s2common

gotten close with my device tree [MENTION=4467696]AndyYan[/MENTION] https://github.com/TeamRegular/android_device_samsung_epicmtd fixed the guide specifcally for you

I need to clean up the charger images I will include my own vendor soon

If anyone is wondering about the charger images https://github.com/TeamRegular/andr...mmit/106a33359c2d32666942b9d1aecabc9aa036ac31

It wont work due to the lpm.rc file give me some time
[Epic 4G Android Development] AndyYan:
Yup I saw the updated links! Will give it some shots as soon as I'm home, no matter it succeeds or else :)

Sent from Google Nexus 4 @ CM10.2
[Epic 4G Android Development] Unjustified Dev:
I told you it wouldnt build due to the releasetools :) if I had that fixed there would have been an update to domination . I gues bbelos fixed it he has cm-10.2 working so I guess we have to wait.
[Epic 4G Android Development] bbelos:
Well, this patch fixes that error you see. I have a few other local patches that I haven't uploaded yet.
[Epic 4G Android Development] AndyYan:
WTF you should've unleashed those when you teased us with your screenshot... :rolleyes: I've been working for a whole sleepy afternoon just to make it compile and (after it fails) port AOSP 4.3 from Nexus S (which hangs at boot animation with no adb support)...

Let's see how things go tomorrow... I haven't ever used a patch yet! Today's my first successful compilation (CM10.2 for mako), and I have to learn more...

Sent from Google Nexus 4 @ CM10.2
[Epic 4G Android Development] bbelos:
You may notice that patch has been uploaded for almost a week now :p
[Epic 4G Android Development] Unjustified Dev:
Yayyyyyy now I need to fix up my source

I cherry-picked so you can keep credit :)

I also got the sepolicy one too thanks teamregular is up and running again
[Epic 4G Android Development] Unjustified Dev:
Who's ready to test my crazy commits?

[MENTION=4467696]AndyYan[/MENTION] my source is ready vendor is too
[Epic 4G Android Development] AndyYan:
YES I AM!!! :D Ready to flip the switch in an hour! If my build goes fine, I'll certainly release it and let you guys know.

Sent from Google Nexus 4 @ CM10.2
[Epic 4G Android Development] AndyYan:
Slightly noob question:
[MENTION=4911249]Unjustified Dev[/MENTION] , how do I acknowledge the ".git" location of a git repo? And how do I know what branches are there in it? I built cm-10.2 out of the guessing that "there's a branch called cm-10.1 in git://github.com/CyanogenMod/android.git, so there should be a cm-10.2", but 4.3 for other ROMs use different branch names like "jb4.2", "jellybean", etc. Plus, CyanogenMod uses "android.git", but some use "manifest.git" or "platform_manifest.git"... Just wanna make sure how to know these prior to syncing, especially for compiling from a git repo that's not so widely known online.

---------- Post added at 01:27 PM ---------- Previous post was at 01:26 PM ----------

...And it turns out they're way too crazy :( Waiting on your go to revert the changes, I'm not a source maintainer you see...
[Epic 4G Android Development] Unjustified Dev:
The sync command only points to a file the default.xml which tells git what to sync in every project theres a .git folder by default they have no branch . The only time you need a branch is when you are pushing source if you want to see what happened in that repo cd to it and type git log and navigate up and down on the keyboard to see older or newer changes and press q to exit.
[Epic 4G Android Development] Unjustified Dev:
All my source is up to part [MENTION=4467696]AndyYan[/MENTION] use the muppets for your vendor source and for device use the test branch I included all the patches
[Epic 4G Android Development] AndyYan:
"test branch" is different from what I saw in the TeamRegular github's guide? Point it out plz

Sent from Google Nexus 4 @ CM10.2
[Epic 4G Android Development] Unjustified Dev:
Yeah Its basically the clean cm source with all bbelos patches cm didnt merge them idk why but in the local manifest just change the branch to test and your good to go
[Epic 4G Android Development] AndyYan:
[MENTION=4911249]Unjustified Dev[/MENTION] , check this error (appeared at the final phase of building CM10.2):

Traceback (most recent call last):
File "./device/samsung/epicmtd/releasetools/epicmtd_ota_from_target_files", line 135, in <module>
main(sys.argv[1:])
File "/home/crossgate/android/system/build/tools/releasetools/ota_from_target_files", line 817, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/home/crossgate/android/system/build/tools/releasetools/common.py", line 155, in LoadInfoDict
d["fstab"] = LoadRecoveryFSTab(zip, d["fstab_version"])
File "/home/crossgate/android/system/build/tools/releasetools/common.py", line 227, in LoadRecoveryFSTab
raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))
ValueError: malformed recovery.fstab line: "/sdcard	vfat	/dev/block/mmcblk0p1"
make: *** [/home/crossgate/android/system/out/target/product/epicmtd/cm_epicmtd-ota-eng.crossgate.zip] Error 1

Why is the problem here? Is every patch needed now merged into your source at TeamRegular? Or is that I didn't run "make clobber" prior to building - does that make a difference?
[Epic 4G Android Development] Unjustified Dev:
Make sure your manifest is correct and yes I merged all changes seems like cm didn't though. Yes make clobber or make installclean after syncing and delete device/samsung/epicmtd prior to syncing.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Kernel Source -->
<project path="kernel/samsung/epicmtd" name="TeamRegular/android_kernel_samsung_epicmtd" remote="github" revision="cm-10.2"/>
<!-- Device Source -->
<project path="device/samsung/epicmtd" name="TeamRegular/android_device_samsung_epicmtd" remote="github" revision="test"/>
<!-- Vendor Source -->
<project path="vendor/samsung" name="TheMuppets/proprietary_vendor_samsung" remote="github" revision="cm-10.2"/>
<!-- Samsung Hardware Source -->
<project path="hardware/samsung/" name="CyanogenMod/android_hardware_samsung" remote="github" revision="cm-10.2"/>
</manifest>
[Epic 4G Android Development] AndyYan:
I built. It boots. It runs. But WTF IS WITH THE "TEAM REGULAR" BOOT LOGO? I just can't take my Epic out for walks when these custom kernel logos are in!!! :eek:
[MENTION=4911249]Unjustified Dev[/MENTION] , please at least tell me how to revert this to official CM's "Galaxy S / CyanogenMod" logo (and no progress bar, because [MENTION=3878858]didhiy[/MENTION] 's iteration has one and it doesn't look good). Or better, revert this in the source :D
[Epic 4G Android Development] Unjustified Dev:
Its teamregular kernel at least represent lol . I see he has the boot progress I was just about to add it and to revert it your out of luck nah jk.

cd to kernel/samsung/epicmtd and type

git revert ee75dd595d13cb323e2c5d93124a223e780f3ffa

Every time you sync it will add my logo back sorry man :p TeamRegular 'round here !!!!!!!!!!!!!!!!!!!!!
[Epic 4G Android Development] Effsi:
I don't think I've ever had the urge to show off my phone rebooting / booting up. kids these days...
[Epic 4G Android Development] Unjustified Dev:
Ha lol I was going to make it better but I guess not all my phones share the same bootlogo now
[Epic 4G Android Development] AndyYan:
Nope, E4G (again) is not my primary phone and is usually off, I have to turn it on when I wanna use it. And given that the boot images will stay for relatively long, if it's on a subway then the cute animals will ruin my attempt at being minimalistic...

Are you much older than me? :p

Sent from Google Nexus 4 @ CM10.2
[Epic 4G Android Development] Effsi:
I have no idea honestly lol

if you left it on in airplane mode (since it isn't primary) how long would you go before having to recharge it with minimal usage sitting as an idle device with no radios on? not that it matters just wondering since I don't have another epic to test with since its sadly my primary device :(
[Epic 4G Android Development] AndyYan:
The standby time heavily dependent on ROMs, as power consumption is minimum under Airplane mode, and a little difference could be magnified into days of extra standby time.

When using CM7 or stock FC09, I've had it sleep under my quilt for a full week and it could still report ~20% left. Under CM10.1/10.2, it depletes in 6 days. With PACman and other customization-heavy ROMs, 4 days or less (a 4.1.x PACman build ate half of my battery in an afternoon... and that's one reason why I still hold some grudges towards PACman)

Whatever, it's mostly at home and I have the habit of charging way before it goes out :) But what if the usage is intensive (like you guys in the US)? I'm always curious to know how the Hummingbird CPU fares in daily usages (I wouldn't have bought a Nexus 4 if only I had an Int'l Galaxy S instead of E4G...)

Sent from Google Nexus 4 @ CM10.2
[Epic 4G Android Development] Unjustified Dev:
Get prepared for Pac-man it already has new domination features sorry owain for telling they said they will start nightlies soon for 4.3
[Epic 4G Android Development] Dropple:
device/samsung/epicmtd/sepolicy/device.te":2:ERROR 'duplicate declaration of type/attribute' at token ';' on line 6083:
#line 1 "device/samsung/epicmtd/sepolicy/device.te"
type powervr_device, dev_type, mlstrustedobject;
checkpolicy: error(s) encountered while parsing configuration
make: *** [/home/dropple/jb/out/target/product/epicmtd/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
dropple@ubuntu:~/jb$

how to fix this error ?

Thanks
[Epic 4G Android Development] bbelos:
What are you building? I don't get this error on a CM10.2 build.
[Epic 4G Android Development] Unjustified Dev:
Maybe paranoid android .
[Epic 4G Android Development] Dropple:
I'm building on Omni ROM, and get that error

it says 'duplicate' so what file that i have deleted now?

Sent from my Carboned Epic 4G 4.3
[Epic 4G Android Development] Unjustified Dev:
They don't support those selinux types
[Epic 4G Android Development] bbelos:
The powervr_device type is already defined for you here (line 27), so to fix your error you should delete the first line from epicmtd's sepolicy/device.te file (the duplicate powervr_device line).
[Epic 4G Android Development] Dropple:
after deleted that line

got this error

Error loading context file from /home/dropple/jb/out/target/product/epicmtd/obj/ETC/file_contexts_intermediates/file_contexts
make: *** [/home/dropple/jb/out/target/product/epicmtd/obj/ETC/file_contexts_intermediates/file_contexts] Error 4
make: *** Deleting file `/home/dropple/jb/out/target/product/epicmtd/obj/ETC/file_contexts_intermediates/file_contexts'
dropple@ubuntu:~/jb$
[Epic 4G Android Development] know.patience:
I can't find AndroidProducts.mk in my ./Android/vendor/cm/Product folder. I'm trying to build CM11 for the epic just to get my feet wet. Am I missing something?
[Epic 4G Android Development] Unjustified Dev:
Your missing some code lol . [MENTION=4000778]bbelos[/MENTION] how did you fix the sdcard issue in 4.4 with fuse on devices with only external sdcards? I get the id error.
[Epic 4G Android Development] bbelos:
Uhm, yeah. That's been a real PITA.

In the latest build I posted, I actually just hardcoded the id. Somewhere around this line in MediaProvider you can add something like this:

if (volumeID == -1) {
volumeID = 11184810;
}

That number is for a UUID of AAAA-AAAA. The main drawback of that method, is if you insert a different sdcard, it won't know.

I don't fully understand it yet, but it seems the problem is that MediaProvider is trying to look up the id for /storage/sdcard0 and it doesn't have the permissions to read it. Another method that I've been toying with is forcing MediaProvider to lookup the id for /mnt/media_rw/sdcard0 and relaxing the permissions for /mnt/media_rw. You can try this by adding replacing the path after this line:

} else if (EXTERNAL_VOLUME.equals(volume)) {
if (Environment.isExternalStorageRemovable()) {
String path = mExternalStoragePaths[0];
[B]path = path.replace("/storage","/mnt/media_rw"); // <- ADD THIS[/B]
int volumeID = FileUtils.getFatVolumeId(path);
//if (LOCAL_LOGV) Log.v(TAG, path + " volume ID: " + volumeID);
Log.e(TAG, path + " volume ID: " + volumeID);

And then add "mkdir /mnt/media_rw 0777 media_rw media_rw" to your init.victory.rc (or whatever device you're building for). I would add it before your "mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw" line. That has allowed me to read the actual volume id. I don't know if that's anywhere near a "proper" fix, but it's something.
[Epic 4G Android Development] Unjustified Dev:
Pawit comments about these patches . Two other developers say they can be better implemented. This code is not the same as cm code. I couldn't get it to build

- MediaProvider will never be able to read the correct volume ID because /mnt/media_rw is not accessible by the MediaProvider

- The question is what is the best way to query the volume ID. You could add a new call to Vold (see MountService) and ask it to query it for you. (It should be better than sticking it in the sys prop, which may even end up with stale information. e.g. after the card was removed)

- You need to support non-FAT system (e.g. exFAT/NTFS/ext4 by querying for the UUID) (see CM's MediaProvider)

https://github.com/Evervolv/android...mmit/49bddf1be910340fc4d10e4c2e57e8a4c9b61815

https://github.com/Evervolv/android_system_vold/commit/797846f9eaa1abcc8f066344bb670c2b594441cc
[Epic 4G Android Development] know.patience:
any tips for cherry picking from other repositories? I've been building PAC for a different device and I wanted to cherry pick multiwindow from omni but I'm struggling with resolving conflicts in the code. What I've done so far is edited the files that had conflicts but removing the conflict markers and tried using the recursive strategy -Xtheirs switch. Now my builds just fail.
[Epic 4G Android Development] Unjustified Dev:
That's not going to be easy. If I were you I would contact someone from Pac-man. I think multiwindow is on their gerrit so you would be able to cherry-pick it easily . I can't code but you need to know some java when trying to solve cherry-pick conflicts.
[Epic 4G Android Development] know.patience:
I've been studying up, it seems that a more knowledge of java and C+ is going to be what I need to go to the next level. Multiwindow is still a work in progress on Omni and it doesn't appear anyone has attempted to port to PAC just yet.
[Epic 4G Android Development] bthorne79:
If you guys are interested in a source build try this out needs some work to get a full build but well worth it I've built for my S3 and S4 and I know you will enjoy https://github.com/octo-kat
[Epic 4G Android Development] geralD_carl:
help

No private recovery resources for TARGET_DEVICE generic
build/core/tasks/kernel.mk:91: **********************************************************
build/core/tasks/kernel.mk:92: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:93: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:94: * BoardConfig.mk file *
build/core/tasks/kernel.mk:95: **********************************************************
make: *** No rule to make target `liquid'. Stop.

help me in this plz
[Epic 4G Android Development] Unjustified Dev:
thats not an error
[Epic 4G Android Development] Unjustified Dev:
before you started the next build did you use this when you had the error about the product

make clobber

removes the old build files necessary when you modify something
[Epic 4G Android Development] Unjustified Dev:
try this saves time its from cm-10.1 nightly boot.img i unpacked it

delete kernel/samsung

go to device/samsung/epicmtd and unzip kernel.zip

make clobber and run build script again leave off true or it will download kernel/samsung/epicmtd again

make clobber
./jb-build.sh epicmtd -j4
[Epic 4G Android Development] Unjustified Dev:
That's as much as I know I never got errors what's inside the vendor folder.
[Epic 4G Android Development] Unjustified Dev:
Not errors like that but I did with atom 422. I hope Xboxfanj helps im curious to find out.
[Epic 4G Android Development] Dropple:
so, what should i do?

in vendor/samsung/epicmtd
[Epic 4G Android Development] Unjustified Dev:
Just vendor/ but I dont think it matters its built off cm vendor
[Epic 4G Android Development] Dropple:
or the problem of ccache??

in vendor
[Epic 4G Android Development] Unjustified Dev:
try repo sync -j4 before you build and where did you get Jelly beer repo init script

try reading this

http://wiki.cyanogenmod.org/w/Build_for_epicmtd

follow those steps even the export ccache but dont try to build using their scripts.did you download all those packages from this guide and the guide i had for setting up ubuntu 12.04?
[Epic 4G Android Development] Dropple:
from

https://github.com/BeerGang/android

you can see the error of the ccache, even i have reinstalled ccache

update: same error :(
[Epic 4G Android Development] Unjustified Dev:
export USE_CCACHE=1
export CCACHE_DIR=/home/dropple/jellybeer/prebuilts/misc/linux-x86/ccache/
export CCACHE_LOGFILE=/home/dropple/jellybeer/prebuilts/misc/linux-x86/ccache/ccache.log

specify x with how many gb to use

ccache -MX

i would use 5 to 10
[Epic 4G Android Development] xboxfanj:
Prebuilt/linux-x86/ccache/ccache is now

> prebuilts/misc/linux-x86/ccache/ccache

So move ccache from the first Dir to the second.
[Epic 4G Android Development] Unjustified Dev:
I never knew that no wonder why my builds take so long. I cherry picked ROM control from aokp to get the toggle settings but it fails at building it because it depends on other commits. It lists them but how do I fix it.
[Epic 4G Android Development] Nashdogg:
And this is why I got so frustrated building ROMs. I got all these errors too and never knew how to fix them so I resorted to porting. You guys make it look easy. Props to you :cool:

Sent from my SPH-D700 using Xparent Skyblue Tapatalk 2
[Epic 4G Android Development] Dropple:
I have no idea about the kernel, I have searching boardconfig.mk for epicmtd but no found

Anybody know how to fix my problem?

Stuck on that kernel problem :(
[Epic 4G Android Development] jeffreyjicha:
I wouldn't mind learning to build from source, but I'd want my own computer to do it on.
[Epic 4G Android Development] xboxfanj:
Move the file.

Also, you shouldn't use root when building something. It makes permissions a pain.
[Epic 4G Android Development] DynamicN:
Thank you unjustified for this guide. I would love to build from source but my pc is a 32 bit on Windows Vista Home Edition so I don't think it's possible from what the OP says:( Also a quick question for xboxfanj, how did you get so knowledgable on android development? If you could point me in the direction I'd greatly appreciate it:)
[Epic 4G Android Development] propjockey:
Is your hardware 64 bit compatible? If so...

Dual boot with a 64 bit version of Ubuntu! The Ubuntu setup will make it pretty easy. If you have enough free space on your hard drive, the process to dedicate some of that for Linux is easy enough. Ubuntu will install the GRUB bootloader, which will give you the option to boot to windows or Ubuntu upon start up.
[Epic 4G Android Development] Unjustified Dev:
If you have a 64 bit compatible pc i could help you dual boot.

Do you know your pc model

how much ram

how much hard drive space you need some space if you want to make some partitions if you want i could set it up with teamviewer
[Epic 4G Android Development] Effsi:
or be like me and use a vm :P
[Epic 4G Android Development] xboxfanj:
Weak sauce.
[Epic 4G Android Development] Effsi:
Your mum.

probably nothing compared to your machine :(
[Epic 4G Android Development] DynamicN:
Have no clue if it's compatible lol.

Model is Gateway DX441B and I don't remember how much ram. I would check but I'm at work right now and can't find it by google'ing the specs. If I remember correctly I have almost 200 gigs left on my hard drive.

---------- Post added at 02:06 PM ---------- Previous post was at 02:01 PM ----------

How hard would that setup be? Just wondering
[Epic 4G Android Development] xboxfanj:
Nah my machine probably takes longer. It's midrange.
[Epic 4G Android Development] Effsi:
I'm on a little i5 12.5" laptop, building inside a vm :o I need to get a ssd next

same amount of work as dual booting imo... just need to install vm software of course. then the steps should be exactly the same (ymmv)
[Epic 4G Android Development] xboxfanj:
I've mostly learned through experience, Googling, or asking other people. I can teach you whatever you wanna know.
[Epic 4G Android Development] xboxfanj:
I have Pentium P6200 which is just under i3, so you win.
[Epic 4G Android Development] DynamicN:
Is there any benefit of using vm instead of dual boot or is it just personal preference?

I want to learn how to develope from source, I was lurking around the forums for a while then rooted and started flashing. The more I learn the more I want to learn. It's always been extremely interesting to me to know how and why the system does what it does. If you are willing to teach me I'd definitely listen.

Edit: Quick question off the top of my head is where do I get the source code from?
[Epic 4G Android Development] bthorne79:
Dell d600 :) that's my beater the wife has the fast huge Acer but all my stuff slows it down I delete about 12 gig every few days from the trash and run ccleaner.

Know what ubtunu should I get desktop image or server image

Sent from my Hellfired SGS3

Sprint SGS3 Hellfire™ Maintainer
[Epic 4G Android Development] Effsi:
I can run my normal apps while doing compiling rather than having to boot in to linux and be stuck there until I am done. no chance of screwing up my boot, easy back ups, and movable between machines. snapshots...
[Epic 4G Android Development] xboxfanj:
Add me on GTalk and I can help you out with everything.