yashsingh1/xdaforums huggingface dataset:
[Atrix 4G Android Development] crnkoj:
I think it's still good to have one repo and not several :)

Anyhow on a second note: does anyone get an insane amount of wakelocks while on his build/weekly4? I am getting a ton of them for no apparent reason. I tried to check it and it seems like the wakelocks start after flashing gapps (either the ones with the 2.x market or the ones with 3.x market, even froze/renamed marketupdater). I tried several nonsync and data off options but it's still persisting... The wakelocks are there even in airplane mode. I'll upload a dumpsys alarm later today if one wants to check it. Could actually upload a logcat aswell.
[Atrix 4G Android Development] crnkoj:
Btw i found this two bits of info http://en.wikipedia.org/wiki/Jazelle and http://en.wikipedia.org/wiki/ARM_architecture#Thumb-2

it seems thumbEE is just a further developement of thumb2 which in order should profit us to compile with thumbEE even if dalvikVM "only" supports thumb2
[Atrix 4G Android Development] acerbix:
Dumb question: Where can we talk to the official Atrix-dev team members? I'd like to figure out a good way for us to push our work upstream and make sure they are okay with us doing that. Especially if we get Thumb-EE working (a long shot, I know).

How did you find out about the wakelocks? Did the phone say something, or did you just try a logcat? My phone didnt say anything while it was on kanged CM7 for 4+ days w gapps but I didnt logcat.

Posting the logcat might help.
[Atrix 4G Android Development] acerbix:
Interesting :) So = we could in theory at least try building dalvikVM using -DTHUMB2EE. Will give that a shot soon :)
[Atrix 4G Android Development] acerbix:
Yikes - I was wrong - so there is no compiler option to automagically turn on Thumb-ee, even in the latest gcc (C compiler) : http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/ARM-Options.html#ARM-Options

Which means, that we are stuck with either waiting for Google to update dalvikvm code to use thumb-ee or doing it ourselves. I looked into the amount of work needed. Other folks have thought about it: http://groups.google.com/group/android-porting/browse_thread/thread/a03806c5ea5dcff9?pli=1 but backed off since this is pretty big.
[Atrix 4G Android Development] crnkoj:
about the Atrix-dev-Team Samcripp and Brandon are on irc at times (#moto-atrix) but sam said the best way is to contact turl (id say forums pm or twitter) but as said for the fp code in cm repo it will be hard, but im confident the adt will be happy if you ask them and merge it into their repo.

Sad story for thumbEE (ill look into it on gentoo, i think it supports it O_o have to doublecheck first),

Regarding the wakelocks, if oyu go under settings->system->applications->battery usage and click ont eh graph one of the lines is Awake, for isntance on my atrix it constantly gives wakes (on my nook color that runs cm7.2 aswell i only get wakes when screen is on), second to that you can check "adb shell dumpsys alarm" itll show the wakelocks, and ye in logcat aswell, ill try to attach one of either so you can check (it does seem though that the google apps produce all of these wakelocks - on the atrix, eventhough i use the same gapps on the nook i dont see that behaviour).
[Atrix 4G Android Development] acerbix:
Thanks for info on ADT - also re wakelocks. Didnt know that. I moved on to CM9 - will recover CM7 from backup to test wakelocks. I did see v high battery drain so that might be true for me as well.

Will post what I find here.
[Atrix 4G Android Development] crnkoj:
great, need more eyes on that. as for thumbee, i read around, its as you said merely impossible, would need a specialized compiler for java, which is way out of our scopes :)
[Atrix 4G Android Development] ghost_og:
Re: wakelocks. My build is about on par with what I was seeing on Weekly #2. I'm still running the stock kernel and I get about 1day 6hrs off one charge, with a little over 3 hrs screen time. I did notice that the battery stats seemed to be much more detailed with this build.

I was using faux's kernel on the weekly but wanted to see how the stock kernel worked out for awhile. Other than a few less hours of battery it seems to be running great. No FC's, reboots, or freezes.
[Atrix 4G Android Development] crnkoj:
yes it seems the weekly builds (i only tested #4) have the same wakelock issue, and as said i sort of seemed to narrowed it down to happen after flashing gapps.
[Atrix 4G Android Development] ghost_og:
One possible culprit is GTalk. I was looking at Dev Tools>GTalk Service Monitor and noticed that it sends a "heartbeat" ping to the google servers on a set schedule. I found some more info here. I haven't been brave enough to start messing with ping interval values yet. If you're interested use a DB editor and find Google Services Framework>gservices.db>main and filter using "talk" to find the related values.
[Atrix 4G Android Development] acerbix:
Did you build the kernel or use the binary one?
[Atrix 4G Android Development] ghost_og:
I just used what was in the prebuilt folder. I'm having a completely separate issue trying to build faux's kernel from source, and I'm not sure if it it's due to me building on a 32-bit machine or not.

My zImage always ends up 1mb bigger than the one from his unpacked boot.img. On top of that, it will never boot. I'm using the .config file extracted from my phone when it's running his Enhanced Stock, so I have no idea why I'm having this problem. Not sure if I need to choose additional options from the menuconfig (haven't seen this mentioned in the guides), but whatever I'm doing is not working. :confused:
[Atrix 4G Android Development] acerbix:
Your 32 bit machine should not have a prob building arm kernels since you use a cross compiler to do that. Are you sure you are setting the cross compiler options right, and not building a x86 version instead? Let me know if you need help compiling the kernel.
[Atrix 4G Android Development] ghost_og:
Hmm, I was using this CyanogenMod wiki's insturctions. I used:

export CCOMPILER=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

I saw this in a few other tutorials I was referencing as well. So I should not have used linux-x86? Or is is the toolchaing that I should have changed? Let me know, and I can try what you suggest after I get home from work. If that doesn't work I'll shoot you a PM. Thanks! :D
[Atrix 4G Android Development] acerbix:
The compiler looks good. How did you make the boot img?

*** Edit - Also - did you try using 4.4.3 instead of 4.4.0? Should not make a difference, but...
[Atrix 4G Android Development] ghost_og:
I've been using split_bootimg.pl, mkbootfs, and mkbootimg as described here. And I should have clarified; my zImage was 1mb bigger than the unpacked one from faux's boot.img. That is what made my packaged boot.img larger.

I haven't tried that toolchain yet. I'm going to start from scratch, resync, and also grab the tool chain suggested in the last post of this thread. I know when I checked out the sourcery site, they had quite a few different G++ versions available. Maybe that specific one will do the trick. I'll check back in later with the results. ;)
[Atrix 4G Android Development] acerbix:
Two questions:

- Did you use fastboot, moto-fastboot, or did you create an update.zip file?

- If you used moto-fastboot, did you erase the boot partition first?

To make sure things work I followed the process and was able to cleanly build and test the kernel. PM me if you need help or we can IRC tomorrow evening PT.

Cheers
[Atrix 4G Android Development] ghost_og:
-I've been using fastboot to hotboot them (love that command for kernel testing :)).

-I just used the sourcery toolcahin and it built a zImage that was 2.7mb so it was closer this time, but the packaged boot.img still wouldn't boot up. Building with the prebuilt toolchain now. I'll probably end up PMing you this weekend sometime. Which branch of the kernel source did you pull, the CM_kernel one?

*Update* Ok, well the prebuilt toolchain gave me the correct file size this time: 2.6mb on the money. That's one hurdle. But the damn thing still won't boot. I'm gonna try a few more things. I like how I could build CM7 but not a kernel, lol.
[Atrix 4G Android Development] acerbix:
I'm on ICH - so this one: https://github.com/turl/kernel-MB860.git

Are you using ARCH=arm on your make?

Also - are you doing a "fastboot erase boot" before flashing?

Can you post (on Pastebin) all the commands you use?
[Atrix 4G Android Development] ghost_og:
Is that strictly ICS? or should I be pulling from there too. I was using this one: https://github.com/Atrix-Dev-Team/kernel-moto-atrix4g.

I noticed that turl's is forked from a different faux branch, and the last commit was for a cm7 defconfig. Maybe I'll try that.

Yup, using ARCH=arm and the export CCOMPILE command I posted earlier just gave me the proper file size on the 2nd build, but it still wouldn't boot.

I'm not erasing my boot partition since I'm hotbooting: fasboot boot boot-new.img

I've also been hotbooting faux and clemsyn's kernels in between each of my builds just to make sure things are working correctly, and they are booting up fine. I'll get a little more organized tomorrow and post a pastebin if I still can't get this thing going. Thanks for sticking it out with me, but I'm gonna call it a night. :)
[Atrix 4G Android Development] acerbix:
Its not ics by default - I pull with a -b ics to get the ICS branch. I missed your comment on hot-booting earlier - my bad.
[Atrix 4G Android Development] ghost_og:
[SOLVED} Got it to boot

OMG, I got this sucker figured out, and I boy do I feel dumb. When following these instructions it gives the following output as an example:

% ./split_bootimg.pl boot.img
Page size: 2048 (0x00000800)
Kernel size: 1388548 (0x00153004)
Ramdisk size: 141518 (0x000228ce)
Second size: 0 (0x00000000)
Board name:
[B]Command line: no_console_suspend=1[/B]
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.

This was my output:

% ./split_bootimg.pl boot.img
Page size: 2048 (0x00000800)
Kernel size: 2561764 (0x002716e4)
Ramdisk size: 148400 (0x000243b0)
Second size: 0 (0x00000000)
Board name:
[B]Command line: [/B]
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.

And this is where my trouble came in. Instead of paying attention to the split script's out put when following the guide, I just used their command with zImage where it was supposed to be:

% mkbootimg --cmdline [COLOR="Red"]'no_console_suspend=1 console=null'[/COLOR] --kernel zImage --ramdisk ramdisk-new.gz -o boot-new.img

I removed the --cmdline and used this instead and my kernel worked. Yay. :o :

% mkbootimg --kernel zImage --ramdisk ramdisk-boot -o boot-new.img

:)
[Atrix 4G Android Development] crnkoj:
hmm so i did logcat, dumpsys alarm and a screenshot of my batt stats:

here the batt stats http://dl.dropbox.com/u/24268926/screenshot-1327056930070.png

the dumpsys alarm: http://paste.pocoo.org/show/537715/

and t he logcat http://dl.dropbox.com/u/24268926/logcat.txt

As you can see, from the battery stats it makes random wakelocks even when screen and even wifi are off (i have mobile data to off), for comparisons sake i looked at my nook color running cm7.2 and it was only awak when screen was on (i cant make a screenshot now since im running cm9 on it now and cant do screenshot, but it shows the same behavior as cm7.2, no weird wakelocks)

now if you check the alarm dumpsys part this seems to be the biggest issue:

456 alarms: act=android.intent.action.TIME_TICK flg=0x40000004

and this 98 alarms: act=com.android.server.ThrottleManager.action.POLL flg=0x4

the 41 alarms: act=android.appwidget.action.APPWIDGET_UPDATE flg=0x4 is a widget update for my weather app which only updates if the widget is there and only when screen is turned on, so i dont worry about that, but this one worries me too:

59 alarms: flg=0x4 cmp=com.google.android.apps.maps/com.google.googlenav.prefetch.android.PrefetcherService why do maps need to prefetch stuff and do wakelocks for it ?

as for the logcat one can see google analytics is craping out because it cant reach the host (im using a host blocker, again on both nook and atrix), so this shouldnt be the issue for it aswell, apart from that i dont see any weirdness (well the weatherpro but i tried without the app and got the same wakelocks so i ruled it out). And yes i believe it all started after i flashed the gapps on it, before that i have not seen as many wakelocks (almost none when screen off, very comparable to the nook). now comaring it to the nook might be misleading because nook has no radio/ril so maybe the wakelocks come from there, but its highly unlikely since they are not there before gapps flash, i even tried several different gapps versions (market 2 and market 3 ones, blocking marketupdater and so on). I do not know what the time tick is supposed to be though, which most likely is the culprint to it.

umm sorry guys i have to reupload the logcat.txt since i left some personal data in it... will take a few minutes, but as said i dont think we can find much in the logcat. ok logcat is back up
[Atrix 4G Android Development] ghost_og:
Time tick is just your clock. If maps is like gtalk then it probably has some kind of check-in service too.
[Atrix 4G Android Development] crnkoj:
ye ok but its not there on other phones, so weird...
[Atrix 4G Android Development] acerbix:
Very nice - great job!!! Also - thanks, learnt about hotbooting from you :)
[Atrix 4G Android Development] acerbix:
Can you try freezing/disabling weatherpro and seeing if that helps? Based on the files you posted, that's what I am suspecting is the problem.
[Atrix 4G Android Development] crnkoj:
Hmm, I get the same wakelocks from a fresh cm7 install + gapps without any other apps. I already ruled out any nongoogle or noncm7 apps =/
[Atrix 4G Android Development] acerbix:
Did you try deleting the google maps apk and rebooting?

*** EDIT: Is your GPS turned on? In my tests, google maps is not able to lock onto GPS but other apps do.
[Atrix 4G Android Development] crnkoj:
Gps is off, the wakelocks are without maps present aswell :) do you get the same battery stats graph, with the excessive wakelocks? Because I talked to a few on irc and they see the same behavior on cm7, apparently not on cm9, or on cm7 on other phones. I wonder if it's a glitch in the battery stats, but the short(er than expected) battery life suggests something must be going on.
[Atrix 4G Android Development] acerbix:
So - I compared my dumpsys w/ yours and here are the differences I see:

com.google.android.gsf
1094ms running, 77 wakeups
43 alarms: flg=0x4
16 alarms: act=com.google.android.intent.action.GTALK_RECONNECT flg=0x4
18 alarms: act=com.google.android.intent.action.GTALK_HEARTBEAT flg=0x4

My gsf has 3 wakeups and they are SEND_IDLE events. Your gsf is actively sending RECONNECT and HEARTBEAT events. I dont have a google talk account configured.

also:

com.google.android.apps.maps
856ms running, 59 wakeups
59 alarms: flg=0x4 cmp=com.google.android.apps.maps/com.google.googlenav.prefetch.android.PrefetcherService
com.android.vending

I have just 2 wakeups for this.

Finally:

android
26717ms running, 111 wakeups
1 alarms: act=android.intent.action.DATE_CHANGED flg=0x20000004
456 alarms: act=android.intent.action.TIME_TICK flg=0x40000004
13 alarms: act=com.android.server.WifiManager.action.DEVICE_IDLE flg=0x4
98 alarms: act=com.android.server.ThrottleManager.action.POLL flg=0x4
41 alarms: act=android.appwidget.action.APPWIDGET_UPDATE flg=0x4
52 alarms: act=android.content.syncmanager.SYNC_ALARM flg=0x4
5 alarms: act=com.android.internal.policy.impl.KeyguardViewMediator.DELAYED_KEYGUARD flg=0x4

I have just 2 wakeups. I ignored the DATE_CHANGED and TIME_TICK alarms. The big ones here are POLL, SYNC_ALARM and UPDATE.

I would try turning off google sync for 2 hrs or so and see if that reduces your wakeups.
[Atrix 4G Android Development] crnkoj:
Thanks for the in depth analysis, ill try that! (actually i have tried that but only for an hour some time ago and havent seen anything conclusive, ill try it again and see)
[Atrix 4G Android Development] acerbix:
Can you post the dumpsys before and 3-5 hrs after you turn sync off please?
[Atrix 4G Android Development] crnkoj:
will do, battery is somewhat low now, so have to charge it and will try to get it till tomorrow.
[Atrix 4G Android Development] crnkoj:
quick update on the wakelock thing, im still testing the no sync and no background data, but it seems it has no function on it at all, ill wait a bit more to judge it than.

I have found another bug though, i think someone mentioned it in the weekly cm7 thread i think aswell, namely that when someone calls you and you pick up for 1-2 secs they dont hear you (it often happens to me i pick up and say whatsup, and people dont say anything than i say it again and they respond - happened with a few random people), might have to look into that aswell :)
[Atrix 4G Android Development] v.k:
Fingerprint unlock issues

Hi,

I've been trying to make my own build of cm7 with fp unlock and try to reimplement it to make it work like face unlock or blur lockscreen (fingerprint unlock from the lockscreen with fallback to the pin/pattern unlock). But I can't even manage it to work. FP navigation works, but when I try to change lockscreen to "Finger" and tap "Change fingerprint unlock", the message "TSM Library failed to load... cannot proceed!" appears.

That is how I try to build it (I'm restoring commands from my bash history, so something may be wrong):

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync
rm -rf vendor/motorola
git clone https://github.com/Atrix-Dev-Team/proprietary_vendor_motorola.git -b gingerbread vendor/motorola
cd packages/apps/Settings
git remote add adt https://github.com/Atrix-Dev-Team/android_packages_apps_Settings.git
git fetch adt
git cherry-pick 2032942ae60196c1c92df159f699a07954639c9d (single commit with fp settings, the only difference between fingerprint and gingerbread branches)
cd -
cd frameworks/base
git remote add adt https://github.com/Atrix-Dev-Team/android_frameworks_base.git
git fetch adt
git cherry-pick 3a4b87f651876a954920319fee6c594f2b3f5ba9 (the same thing for framework part)
cd -
cd device/motorola/olympus
git remote add adt https://github.com/Atrix-Dev-Team/android_device_motorola_olympus.git
git fetch adt
git checkout adt/fingerprint (use the whole branch from ADT repo)
cd -
. build/envsetup.sh && brunch olympus

Building completes successfully, after flashing everything works except the fingerprint unlock issue which I described earlier.

Any suggestions?
[Atrix 4G Android Development] ghost_og:
Try these manifests

I'm not too familiar with git, so I'm not really sure if the steps you're using should work.

Instead of manually pulling down all of the FP repos, try using these 2 manifests instead. That way all you need to do is run 'repo sync', and you can avoid having to do all of the manual commands.

You'll notice the default one is the same as the ADT's, except it has "revision = fingerprint" for the 3 FP repos you need.

The local manifest is optional. I just used it to pull down the proprietary files to avoid having to run the extract script from my phone. You can either manually clone that repo, or use the local manifest. Whichever works for you..:)

I had to add the .txt extension to upload. Make sure to drop it before using. Let me know if you're not sure where these go.
[Atrix 4G Android Development] v.k:
Thanks, I think I will try it later. I just want to understand what I'm doing wrong. I use the whole contents of proprietary_vendor_motorola/gingerbread and android_device_motorola_olympus/fingerprint from atrix-dev-team repos. Then I use the latest sources of android_packages_apps_Settings/gingerbread and android_frameworks_base/gingerbread from the original CM repos, register atrix-dev-team repos, fetch theirs contents, pick FP-related commits from the atrix-dev-team repos (there are only one different commit for each repo, am I right?) and apply them to the latest sources from CM repos using git-cherry-pick. I think it should be enough to have the working FP unlock, but it doesn't work for some reason :( All fingerprint proprietaries and settings present in the resulting build. Maybe something in the FP-related code conflicts with the latest CM sources?
[Atrix 4G Android Development] ghost_og:
No, that's probably why it wasn't working. You need to grab the entire repo for each FP branch, not just the last commit. You dont grab the GB stuff at all for those 3 repos.

If all you are doing is grabbing the last commit, then you'll be missing all of the other FP changes.

Think of it this way. If there are 100 files changed to make the FP work, you're essentially changing 1/100 by only using the last commit. All of the other 99 changes would be missing.
[Atrix 4G Android Development] t.s.eliot:
Since you asked for suggestions .....

I'd recommend taking some time to browse the content of the commits required to execute the FP unlock. If you go to github in a web browser, each of the commits will be a link to a page showing the scope of the changes made in the commit. You could actually go line by line to see what was changed in order to implement the FP functionality.

I can't claim to have understood all of it, but at least that helped me get a grasp on the scope of the changes implemented (and a whole new level of respect for the Atrix Dev Team!).
[Atrix 4G Android Development] v.k:
But all the changes that are needed to make FP unlock work represented by single commit. And if you go to CM's gerrit, you'll see that theirs dependencies are merged:

http://r.cyanogenmod.com/#change,9821

https://github.com/Atrix-Dev-Team/a...mmit/2032942ae60196c1c92df159f699a07954639c9d

and

http://r.cyanogenmod.com/#change,9828

https://github.com/Atrix-Dev-Team/a...mmit/3a4b87f651876a954920319fee6c594f2b3f5ba9

So git-cherry-pick should work properly.

But if I use all three fingerprint branches from atrix-dev-team repo it potentially may cause issues if some other features that were merged in the CM repo require changes in the framework or settings parts which are outdated. I think I can try git-rebase to get the latest changes to the fingerprint branches, but I don't know why git-cherry-pick doesn't work if there are only one different commit for frameworks and settings branches.. Anyway, I won't have access to my development computer for a few days, so I cannot check if I am right.

Yes, I have already spent a lots of hours inspecting these changes and other CM lockscreen and settings related code. I have sort of a plan how I will do this, but first I need to manage to work the existing code :D
[Atrix 4G Android Development] ghost_og:
You shouldn't have any issues. Turl has been merging upstream CM changes for awhile now. When acerbix first started this thread the branches were outdated, which is why we had to make custom overlays, but they've been getting regular updates for awhile.

I think your having issues because of the GB repos you're pulling down first. For example, looking at the Settings one: it hasn't had any upstream merges since October. But if you look at the FP one, it's been getting regular upstream merges. So if you're only overlaying the FP commit on top of the ADT gingerbread branch, it's missing months of upstream changes. Looking at the ADT default.xml, they use the CM Settings package, so you're definitely missing things.

I've been using those 3 repos to build working FP kangs for a little over a month and I haven't encountered any CM issues, fwiw. :)
[Atrix 4G Android Development] t.s.eliot:
It is probably not working because you are missing some of the changes. The key packages that have changed are:

frameworks\base

packages\apps\settings

device\motorola\olympus

You get some key changes in the device\motorola\olympus commits:

extract-files.sh

overlay/packages/apps/Settings/res/xml/security_settings_picker.xml

setup-makefiles.sh

system.prop

These pull in additional libraries, add in some compiling instructions, and link the code changes to some of the UI menus.