yashsingh1/xdaforums huggingface dataset:
[Desire HD Android Development] ADB100:
WiFi Tethering and IPTABLES.

After a bit more searching and testing I have almost fixed my issue with the built in WiFi Tethering. This page helped - http://code.google.com/p/android/issues/detail?id=38563

I have typed the command into the terminal window:

iptables -tnat -A natctrl_nat_POSTROUTING -s 192.168.0.0/16 -o rmnet0 -j MASQUERADE

And now WiFi Tethering works. I just need to get this command into a startup script but don'e know how to?

I have added a file names '77tether' to the /system/etc/init.d folder that looks like this:

#!/system/bin/sh

iptables -tnat -A natctrl_nat_POSTROUTING -s 192.168.0.0/16 -o rmnet0 -j MASQUERADE

But is doesn't work. I assume I need to do something to get this script to run with SU permissions on boot?

Andy
[Desire HD Android Development] KirovAir:
Try:

su -c "iptables -tnat -A natctrl_nat_POSTROUTING -s 192.168.0.0/16 -o rmnet0 -j MASQUERADE"

Not sure if this will work though..
[Desire HD Android Development] ADB100:
Just tried it, but no sorry it doesn't work. I suspect it is denied permission to run as it needs SU permission? Not sure how I do this from a init.d script with Android?

Anyone know?

Andy
[Desire HD Android Development] Mustaavalkosta:
init.d scripts are run as root afaik. Try adding ~60 seconds delay before that script is run in case those network processes are initialized after your command thus resetting them.

#!/system/bin/sh
sleep 60
iptables -tnat -A natctrl_nat_POSTROUTING -s 192.168.0.0/16 -o rmnet0 -j MASQUERADE

I did this with some other tweaks I use that were reset after init.d script was run. I don't know how iptables work in relation to the rest of the system so I can't say that this will work but it's easy enough to test.

Edit: Oh and you can also check active iptables rules by running iptables -L in case you want to check if those rules are reset on network type change or something like that.
[Desire HD Android Development] ADB100:
Thanks for the tip. Just tried it and it didn't work :( Maybe it takes longer to initiate the network stuff? I'll try a longer sleep time and see if this works around it?

Andy
[Desire HD Android Development] Mustaavalkosta:
Have you checked with iptables -L that those iptables rules aren't recreated everytime you turn on or off tethering? If this is the case, the easiest way to run that would probably be some sort of ScriptManager widget which you can click on your homescreen after turning on tethering.

Edit: Nevermind, I checked myself and looks like those rules change when I switch to tethering. I can't see natctrl_nat_POSTROUTING chain anywhere though even after I ran the iptables command. Oh well, it's been a while since I had to work with iptables. Maybe I'm reading this wrong. :p
[Desire HD Android Development] fmaskarin:
hello everyone,

I just unlocked bootloader, flashed latest twrp on my friends desire hd and installed cyanogenmod m3 (hoping it is the most stable one) and the only problem I have is that the gps does not work. Any help or suggestion would be appreciated.

Thanks ;)
[Desire HD Android Development] wtpitr:
Try to update Radio to the latest one (17.14.11_M) You'll find it in the forum.
[Desire HD Android Development] snappycg1996:
Thank you so much

I just wanted to say, major major thanks to the developer of this amazing ROM! :D I tried several 4.2 and 4.1 Jelly Bean ROMS, and they all got slow and laggy eventually, or I had freezes, or crashes with them.

I'm running the 04/15/13 nightly, becauase I heard it's a really good version. :) I had ONE random reboot, after the first day of having the ROM. Nothing else yet at all, it's really smooth and fast too! Battery life is really good for me too, the ROM is rock solid, stable, and extremely quick! And it's 4.2.2 Jelly Bean! :))) The latest JB on the Inpire... that's amazing. :)

Thank you so much for this amazing ROM, Mustaavalkosta! :D

I have one question, how is everyone's battery life? With EDGE on all day, for about 8 hours, and some texting, it's about 20 percent. I have had this same battery since I got the phone, when it was first released. I think I may need a new battery, but I was wondering what everyone else is generally getting. :) I know the battery life on the Inpire's are generally not that great. :P

Again, thanks for this amazing ROM! Seems to be the best so far :)
[Desire HD Android Development] gc_geforce:
WOW this ROM is great! I have been testing some sense ROMs and Pac-man ROM and they still have problems with bluetooth and GPS. I have flashed the April 24th nightly ROM and it is rock solid plus the GPS and bluetooth just works with no mods or updates. This is looking like a very good every day ROM.

Very Nice...

Thanks
[Desire HD Android Development] bestfil:
[*]I had reboots in 15.04 version, after update the issue has gone.

[*]Preview is grey (unavialable) for a few minutes but only in default gallery viewer. After changing to "QuickPic" problem has gone.

So it's not the problem of fast or slow sd card access.

---------- Post added at 08:32 PM ---------- Previous post was at 08:26 PM ----------

In my network Play/POLAND I have to use 2 apns. One for the internet, one for mms.

Once I managed with it by changing apn's manually. But still I can't merge both apns into one...

---------- Post added at 08:47 PM ---------- Previous post was at 08:32 PM ----------

I don't think that it depends of sd card access timeout. If with Quick Pick works fine why shouldn't work properly with default app?

If You "just" build this ROM from CM original sourcecode, can You link the original thread with cm10.1 nightlies on CM site? I could post there some things about desired improvements...
[Desire HD Android Development] humzaahmed155:
Latest radio with latest nightly, GPS locks on with 10/11 sats in about 5 seconds.
[Desire HD Android Development] gc_geforce:
So you are talking about "July 2012: Radio 12.69.60.29_26.17.14.11_M - AT&T Inspire 4G 3.20.502.52 (Latest)", as the latest?
[Desire HD Android Development] humzaahmed155:
Yep, that's the one, if you have a Inspire 4G use the radio for that phone
[Desire HD Android Development] gc_geforce:
Thanks, I have a Desire HD and have that one installed.

:good:
[Desire HD Android Development] xZeroMancerx:
I've heard some users talk about pizza bean ? What exactly is different about it ?
[Desire HD Android Development] rjand:
Battery life is very good, but there are that many variables it is really impossible to compare with what other people may get. With little usage and a strong signal I can get about 4 days on a battery, with a weak signal and little use I may get about 8 hours, with high use (screen on) and a weak signal I may get about 2 or 3 hours.

Don't try and merge them, just remove MMS from the Internet APN.
[Desire HD Android Development] MusikMonk:
Here you go:

And keep in mind:
[Desire HD Android Development] Mustaavalkosta:
QuickPick may not use MediaProvider, it may have its own independent scanning service which may be faster creating previews. There's no original CM site for cm10.1 nightlies for ace since there are no official builds for ace. You can try CM's jira but they will most likely just close your ticket without a second look since this is unofficial build.
[Desire HD Android Development] ivanhoe74:
Just to clarify things:

In Your internet APN settings there's a line called APN type, and the values are probably default,supl,MMS. You are supposed to delete MMS from that line. ;)
[Desire HD Android Development] shredzone:
I just dirty installed M3 over JellyTime 42 R6.1... I know, this is frowned upon, but I was too lazy to start from scratch, and to my surprise it even worked. :laugh:

My DHD feels a lot snappier with M3. I'll now give it a test drive. Thanks for this great ROM, Mustaavalkosta!
[Desire HD Android Development] plopdawg:
Ive been updating with pipeliner's updates until he quit doing it..understandably. been on the m3 since it came out and today upgraded to 4-24-13 nightly AND upgraded the radio to the current 26.17.14.11. This rom is fantastic. bluetooth works, gps lock in under 2 minutes, camera works (shows green on preview...known issue, but not an issue really), plus Jelly Bean keeps getting better and better.

Only note is the inspiremod that is posted on page 1 does not brand the phone as Inspire 4g. It keeps it Desire HD. I used the original inspiremod_0.5.zip to brand it (probably doesnt matter if it's branded or not).

Thanks a ton and keep up the awesome work!!! This ROM makes this phone worthy of sticking around through another upgrade (unless you have to have 4g LTE) :D
[Desire HD Android Development] bestfil:
Nop...

My "internet" APN has, by default, setting as below:

APN type: default, supl

In my "mms" APN the type is: mms.

As I figured the problem is that "rom" chooses the this apn, which is "default" and with APN (second option) "internet". If there isn't "internet" value - I haven't got access to internet.

So once I managed with it to manually choose between APNs thus when I want to receive MMS I have to change active APN from internet to mms.

But CM rom automatically switches the APN to this one which has "defalut" in apn type. So I had to delete "default" from internet apn to get it working properly.

But still the problem exists: there is no fast switching program for 4.1+ android to switch APNs and/or I couldn't merge these two APNs, because one has to have APN "internet", second one "mms".

I hope You still follow my explanations.

I tried to set go sms to download mms using its internal mms settings, but it failed...
[Desire HD Android Development] Mustaavalkosta:
Those inspiremod zips that I host are essentially the same as the old one. I just stripped obsolete gps.conf stuff and added some permission casts to ensure correct permissions. Are you sure you didn't unintentionally flash -nobranding version? Well, doesn't really matter which one you use. There was a request for nobranding version somewhere so I did that and a bit more. :)
[Desire HD Android Development] iopetja:
I had the same problem and similar situation:

1) Delete both APN's

2) Restore defaults

3) Check that "internet" has no mms

4) Click SAVE changes

5) Activate/deactivate airplane mode

6) delete old "sending" items, and test with new mms from default messaging app first.

Nevermind the apn choice, mine is also on internet, and all works after above steps.

----

If I helped, please hit the Thanks...

DHD smoothie by Mustaavalkosta's M3
[Desire HD Android Development] xpurtwitness:
What kind of behavior is expected if we don't remove "mms" from that line in the APN?

Also, given the numerous APNs on my list, have I got the right one selected? It's the default.
[Desire HD Android Development] xZeroMancerx:
Yes, you have the right one selected and I haven't had MMS issues
[Desire HD Android Development] Z_0r10n1S:
Tried with Scriptmanager? Can help to run as root on boot with a friendly gui.
[Desire HD Android Development] iopetja:
[MENTION=1178793]xpurtwitness[/MENTION]:

MMS looks like "sending" but is never sent.

Where did you get all that?8-)

Check if you have the issue, delete them all and restore defaults. If you don't have the issue, don't touch anything ;)

----

If I helped, please hit the Thanks...

DHD smoothie by Mustaavalkosta's M3
[Desire HD Android Development] xpurtwitness:
Does this apply to all MMS types (multiple recipient, single recipient with picture/attachment, etc.)? At one point, I was told someone didn't receive a picture I sent, but I think lately they have. I've also been able to send/receive group messages. (Stock messaging app.) Yesterday, I did a completely clean install of 0424 nightly (had been getting crazy lockups and reboots with the dirty flash) with all apps getting a fresh install from the Market, rather than TiBa. So this will be the best chance to test it out. :fingers-crossed: I'll follow up!

As far as where I got all those APNs, I suspected they were included as default....this is a full format (except SD card) and clean install! So, they shouldn't have lingered from any past tweaks or builds, unless I'm mistaken.
[Desire HD Android Development] ADB100:
I haven't as Mustaavalkosta says the init.d scripts run as root so I suspect it won't help - but thanks for the suggestion.

I am thinking that maybe the WiFi Tether initiates its own iptables changes on startup of the application but they may be incorrect? I am not sure how I can check this? Anyone?

Andy
[Desire HD Android Development] plopdawg:
*noted* i am an idiot. I was just clicking and clicking and excited about updating, and i did download and flash the "unbranded" inspiremod. I take it all back :D This ROM is 100% awesome. Thanks.
[Desire HD Android Development] bestfil:
No, they're only: default,supl

In another APN for mms I have got:

APN: mms (2nd line of settings)

APN Type: mms (14th line of settings)

---------- Post added at 07:56 PM ---------- Previous post was at 07:52 PM ----------

As I said: it's impossible because my stock APNs are already divided: one for internet, one for MMS. In internet APN there is no mms value in "APN Type". "mms" value (without any "default", or "supl" or any other) is only in MMS APN.

---------- Post added at 08:19 PM ---------- Previous post was at 07:56 PM ----------

Unfortunetly...

It doesn't work. The only way to force the ROM to download MMSs is to change in internet APN description name (2nd line) from "internet" to "mms" and complement the rest of lines like mms centre, etc. with values form mms APN

OR to force MMS APN to be used (delete "default" from internet APN, and set MMS as active).

---------- Post added at 08:25 PM ---------- Previous post was at 08:19 PM ----------

Of course after manual change from Internet to MMS APN I haven't got internet access, obviously...

---------- Post added at 08:37 PM ---------- Previous post was at 08:25 PM ----------

But there isn't any forum with unofficial build? Where do You get the source code from?

Or maybe I misanderstood and You get official source code from another CM supported device, then You make some changes to port it to DHD and then build it?

And You don't change anything in this ROM, not at all??

ANYWAY. The ROM is awesome! The fastest and the smoothest I've ever had on my DHD! THANKS!

And next thing: an't You gonna help synergye with su in cfX?
[Desire HD Android Development] rjand:
Just checkin, but have you disabled Wi-Fi when trying to send / receive an MMS?
[Desire HD Android Development] gc_geforce:
So far the only thing that does not work for me is recording video, when you play it back the video is all garbage.

When I use double shot from googleplay recording and play back is fine.
[Desire HD Android Development] Mustaavalkosta:
This is source built, not a port. I use as much untouched CM code as I can without breaking anything. There is a handful of local repos to enable hardware support for ace. Original device repo is from synergye's cm10/cfx 4.1 builds but it has got plenty of new stuff from various sources. Kernel is based on synergye's KangBang kernel and also Andromadus' htc7x30-3.0 kernel. Everything is publicly available on github if you want to get more information about where's everything coming from.

We (team+contributors+others) have been working on the su/permission issue all along although I can't say that I have been able to provide much help due lack of knowledge of Android's security mechanisms, but this is a discussion for cfx thread.
[Desire HD Android Development] Mustaavalkosta:
It does that sometimes but it should generally be ok. IIRC, Pnoire said that clearing data for gallery may fix persistent messed up video recording. I rarely get borked videos and never persistently so I have no personal experience of fixes for it.
[Desire HD Android Development] andrewnelson23:
I didn't have to adjust my apn at all in order to send/receive mms. But after clean-flashing 4/23, I did flash a user-themable mms.apk, and I wonder if that made a difference or not.

Here's the link to the mms i used. http://xdaforums.com/showthread.php?t=2133552&highlight=sizing&page=25

By the way, Mustaavalkosta, thank you for the very nice rom. It's really clean, very fast, and it has good battery life. I'm coming from pac-man, which had a lot to offer, but it was pretty laggy and annoying. And the battery wasn't very good. Have you ever looked into building Rootbox or Orca Project?
[Desire HD Android Development] bestfil:
I haven't noticed what is the wi-fi status. I'll check it.

It doesn't bother - enabled or disabled, still MMS is not working.

I heard something about APNs merging, but as I said - the problem is with 2nd line of its settings: when it's "internet" there than internet works, if "mms" internet doesn't work. I tried to put there "*" but it does not do anything. Maybe if there was some cheat to merge these to strings "intenet" and "mms" in the 2nd line of APN SETTINGS, it could work...
[Desire HD Android Development] fable86:
To make mms work please uncheck the mms report in setings then work everything ok :o
[Desire HD Android Development] bestfil:
It's still disabled. Nothing changes. But thanks.
[Desire HD Android Development] fable86:
have u delated the mms apn ?:)
[Desire HD Android Development] bestfil:
cool, slow app which causes ROM slowing down...

I don't recommend.
[Desire HD Android Development] gc_geforce:
Thanks Mustaavalkosta! that worked, I cleared the data of the gallery and now the videos are fine. You have done an awesome job with this ROM, and it is the most sable fast ROM that I have used. :good:
[Desire HD Android Development] SupremeBeaver:
Has anybody managed to successfully pair a Sixaxis controller with their phone on this rom? It worked for me on ICS, but on this rom it doesn't. When I attempt to pair it using the app Sixaxis Controller, it just throws a message "No controller found - please connect it via USB cable". It already is connected...
[Desire HD Android Development] andrewnelson23:
You must be doing something wrong. Its an mms.apk. doesn't slow the phone down at all. At least not for me.
[Desire HD Android Development] Mustaavalkosta:
Are you trying to use it via USB cable or bluetooth? If the latter, does it work with cfx? If yes, then it's probably CM's BT MAP commits breaking it.
[Desire HD Android Development] SupremeBeaver:
Bluetooth. I haven't tried it with cfx so not sure, but with aospX it worked. Mustaavalkosta, do you think you could get it working?
[Desire HD Android Development] Mustaavalkosta:
Difficult to say with this little information, but I think if I did revert those BT MAP commits some BT car kits won't work anymore so it's basicly choosing whether A or B works and I don't want to break car kits (utility > entertainment). :(
[Desire HD Android Development] SupremeBeaver:
Understandable. Perhaps you could provide a flashable zip for those who don't really use car kits?
[Desire HD Android Development] Mustaavalkosta:
These MAP patches are done for frameworks/base and settings app in addition to BT app which pretty much kills any chance for any practical way of creating flashable zip as it would have to be updated with nightlies as two of the most active repos are frameworks/base and settings app. If you can confirm whether it works with cfx (it has no MAP patches currently afaik) that would help to confirm if it's even these MAP patches or something else completely (which in turn may also open more ways to fix it).
[Desire HD Android Development] SupremeBeaver:
I see. I will try flashing cfx to see if it works. Cheers.
[Desire HD Android Development] DesertEagleSlim:
any chance of adding ability to have a center clock in status bar? or am i being a pain in ass?

btw great rom im coming from cfx and aokp. had to leave cfx because of issues with the open master rom updates.
[Desire HD Android Development] Mustaavalkosta:
Oh and of course logcat may also shine some light on what's going on but I don't put my money on that. Previous BT logcats have been pretty jibberjabber for me. :) I checked kernel config for possible drivers for sixaxis stuff but couldn't find anything that would seem even remotely promising.

Center clock requires framework modifications which means it's on CM's hands to implement it as this rom follows their decisions about features (as the name suggests).
[Desire HD Android Development] SupremeBeaver:
Mustaavalkosta, I have installed the latest stable version of CFX and can report it suffers the same problem as this rom, it doesn't work. I then decided to give an old ICS rom a try since I remembered it worked there, and viola, it connects flawlessly.

Is there anything you could do? I know any changes could interfere with car kit connection, but perhaps you could make a zip as an update to your M3 rom, that way it doesn't need to be overwritten by the nightlies and only those who are interested (i.e me) can flash it. Of course this is all assuming you can figure out how to fix it.
[Desire HD Android Development] Mustaavalkosta:
Well, I can do test build for you without MAP commits but I don't think it's those if it's not working on cfx either. Most likely it's something else. Developer is very vague on his website about the requirements.

Non-standard protocol doesn't tell much.
[Desire HD Android Development] SupremeBeaver:
Yeah it looks like something else is the cause so a test build without these MAP commits may be pointless.

I was always under the impression that stock AOSP and Cyanogenmod had the necessary bluetooth stack to allow connecting gamepads, that's why I find it so strange it doesn't work on JB for Ace. Maybe the jelly bean builds for DHD don't have full bluetooth capabilities yet.

Would it be possible to rip the necessary bluetooth files from ICS and implement them in JB? That's the only thing I can think of doing, but Im no dev.
[Desire HD Android Development] Mustaavalkosta:
Yeah, bluetooth was pretty weird to get to work in 4.2 in the first place. It's pretty much impossible to give any assessment about this as long as I don't even know what's exactly broken. Could be kernel, could be something in frameworks, could be something in bluetooth app, could be something else... a needle in a haystack comes to mind. :)

If you want to sacrifice some more time for this, get a logcat when you are trying to use that gamepad.
[Desire HD Android Development] SupremeBeaver:
I'll need to have the android SDK installed to do that right? I have a really old version on my laptop which isn't recognizing adb, so I'll need to update that before I can get a logcat. I don't really have the time now to do it, maybe someone else could give it a go, someone with a sixaxis and the necessary app Sixaxis compatibility checker. But from the responses here, it doesn't seem like anyone cares for this feature :(

The whole reason why I want this to work is because I wanted to use the controller to as a wireless remote for my music players, but I have actually found an alternative solution which involves using my headset buttons and it works just fine, so getting the gamepad to work isn't a priority. But it would be awesome if it did work.
[Desire HD Android Development] andrewnelson23:
Yeah adb was updated for 4.2. Just take this .zip, extract it, and replace it with the one you have. Or just download it, extract, cd to where you downloaded it and adb logcat > c:/user/desktop/logcat.txt.
[Desire HD Android Development] Mustaavalkosta:
Catlog app will do just fine if you don't want / can't setup SDK.
[Desire HD Android Development] SupremeBeaver:
I managed to do it on my computer, thanks andrewnelson23 for that adb file and instructions.

It seems near the bottom of the file there are plenty of references to bluetooth and sixaxiscontroller. It looks like bt_vendor.conf can't be found which may be the cause. Hopefully this is helpful Mustaavalkosta.

edit: I should mention the logcat was generated after I press the pair button in the sixaxis controller app, after which it says no device detected in the app. But I think only the data near the end is useful because most of it generated itself without me even pressing anything.