Adding a wireless charger to my Galaxy Note Edge.

I have always been fascinated with wireless things. I keep waiting for the wireless, battery-less vacuum cleaner, too, but that is a story for another time. I really like my note edge, and I recently decided to do some upgrades, like a screen protector, a new battery, and now, a qi wireless charger.


Here’s what I bought: (Again, not a kickback add.)

IC ICLOVER Smart Phone Ultra Slim QI Wireless Charging Receiver Chip&Wireless Charging Pad For Samsung Galaxy Note Edge N9150-https://www.amazon.com/dp/B00S9IKNAC/ref=cm_sw_r_other_apap_mq4crIL8UNcSp

This kit allows you to install the wireless charging receiver into the back of your existing cell phone case, and for $15, came with the charging pad. It sounded to good to be true. So, I decided to be the lab ray for the rest of you and try it out. Bottom line, if you read no further in this post: buy it.


The qi receiver (literally “energy” receiver, which is what qi stands for) comes with a peel-and-stick strip that allows you to hook it up in about 30 seconds. A tip though: as you can see, I covered my Sim card with a piece of paper, so the qi wouldn’t stick to it, so I could remove my Sim card easier. I then added an extra piece of Scotch tape, to make sure it stayed in place. The connection for this charger was already there, just waiting to be used.


It’s hard to tell in the photo, but it does cause a slight “bulge” in the back of the case, but it is not noticeable when holding the phone.

Once the case is closed, plug in the base and simply set the phone on it to start charging. A green light tells you it is charging, a red light tells you there is power. You can place the phone on there sideways, upsidedown, etc, must make sure it is centered or the could will not line up and it will not charge.

Overall. It works great. Some statistics for the curious:

After several time tests, it averages a charge of 0.25% per minute, or 1% every 4 minutes. So it is not super fast. More of an all night charger.

100% = 400 minutes = 6 hours, 40 minutes.

It tends to get warm. After charging, it is consistently around 115 degrees Fahrenheit for both the phone and the base unit, measured with an infrared thermometer.

Just like with normal charging. My phone beeps to tell me it is charging when I set it on the base, and my LED light for charging comes on. So your phone thinks it is plugged in.

There really are only two downsides:

#1. You can’t really use the phone while charging it this way, as it needs to stay centered on the base.

#2. It charges so slowly, I suspect you could drain it faster than it could charge with heavy use.

But, for those times, you could always just use an old school cord. Overall, I think it is worth it for my nightstand, and I am thinking of getting a charging base for my desk at work.

Linux – keep it simple.

Free Pirate Pixel Art

In my continued efforts to learn app design and code, I have been making some new artwork to be used (Lord willing) in an Android game. This artwork is completely my own creation (for better or worse) and is built using Pixel Art Builder, a free app on the Google Play Store. You are welcome to use or abuse the art in my repository:

https://github.com/alaskalinuxuser/artwork/tree/master/pirate_pixel_art

Linux – keep it simple.

use add-resource to add

use <add-resource> to add

Another error during a build. I’ve covered this before, using a different technique to remove that line. This time I really want the line to stay and work, so let’s take a look at the error:

[CODE]
device/samsung/tblte-common/overlay/frameworks/base/core/res/res/values/config.xml:424: error: Resource does not already exist in overlay at ‘config_deviceHardwareWakeKeys’; use <add-resource> to add.
[/CODE]

So, I opened device/samsung/tblte-common/overlay/frameworks/base/core/res/res/values/config.xml, and changed this:

[CODE]
<!– Hardware keys present on the device with the ability to wake, stored as a bit field.
This integer should equal the sum of the corresponding value for each
of the following keys present:
1 – Home
2 – Back
4 – Menu
8 – Assistant (search)
16 – App switch
32 – Camera
64 – Volume rocker
For example, a device with Home, Back and Menu keys would set this
config to 7. –>
<integer name =”config_deviceHardwareWakeKeys”>65</integer>
[/CODE]

To this:

[CODE]
<!– Hardware keys present on the device with the ability to wake, stored as a bit field.
This integer should equal the sum of the corresponding value for each
of the following keys present:
1 – Home
2 – Back
4 – Menu
8 – Assistant (search)
16 – App switch
32 – Camera
64 – Volume rocker
For example, a device with Home, Back and Menu keys would set this
config to 7. –>
<add-resource type=”integer” name=”config_deviceHardwareWakeKeys”>65</add-resource>
[/CODE]

Notice that it now has a tag to add that resource, since it did not exist already. This did clear up the error. The vote is still out if that method was an acceptable fix.

Linux – keep it simple.

Battery trouble!

A friend of mine recently called me up with a battery problem. He had done some troubleshooting on his own, and already come to the right conclusion, but he wanted a second opinion.

His Galaxy S5 Active had a strange issue: if he unplugged his phone, it would reboot or die even though he had over 70% battery left. However, of he put his phone in power saving mode, it would work like it was supposed to. If the phone was plugged in, he could use it all day. So he figured that he needed a new battery, and he was right.

Lithium ion batteries have to meet a special safety standard, and from what I understand, that means that they have a special charging and discharging protection circuit. Here is a little except about it from http://batteryuniversity.com, where you can read all about it:

“Further layers of safeguards are solid-state switches that measure the current and voltage and disconnect the circuit if the values are too high. The protection circuits of Li-ion work on this on/off basis. (See BU-304b: Making Lithium-ion Safe.) All switching devices have a residual resistance that causes a slight increase in overall battery resistance and a subsequent voltage drop.”
In any event, of you have a cell phone battery that performs as normal, but once reaching a certain percentage above 0 it does suddenly or randomly reboots, then most likely this circuitry in the battery has failed. It is easy to think there may be another problem, say with the phone, because the battery still holds a charge. As for my friend, a new battery had him up and running in no time flat.

I recently purchased a new battery for my note edge, not because of this issue, but because the battery did not hold a charge for as long as I thought it should. Turns out I was correct. They say a cell phone battery is only good for 3 years, and that includes the time on the shelf before you started using it. It will last a long time, but performance will diminish over time.

Here what I bought (and no, this is not some sort of kickback add):

Samsung 3000mah Battery for Samsung Galaxy Note Edge – Non-Retail Packaging – https://www.amazon.com/dp/B00RYS9UIY/ref=cm_sw_r_other_apap_Yhn2fEg4qCmPC

It was only $12, and took about 3 minutes to replace because I stopped to take a picture (which takes a while when your usual camera is the phone you are working on). If you have had a phone for more than three years, I highly recommend a new battery. The difference was immediately noticeable!

Linux – keep it simple.

Ship, Captain, and Crew!

Ready to set sail for high adventure? Having trouble deciding which one of you and your friends are going to pay the tip at dinner? That’s why I put together this little dice game, Ship, Captain, and Crew. Praise God, it even works!

You can check it out on the Play Store:

https://play.google.com/store/apps/details?id=com.alaskalinuxuser.shipcaptainandcrew&hl=en

And hopefully soon on F-Droid ( I submitted the project, and it was accepted, just waiting to post to the repository).

device-2017-03-08-124806

Here’s the description:

A classic dice game for up to four players!

This simple game requires a lot of luck and a very small amount of skill. In times past, this game was used as a gambling or drinking game by sailors and merchants alike. You must procure a ship (6), a captain (5), and a crew (4), the remainder is your cargo.

Once you have your ship, captain, and crew, you can click on dice that you wish to hold in order to save them rather than roll them. You can also choose to keep them all if the conditions are right. The “point” or high score is always visible, and that is a big help to the “hammer” or the last player.

This game is open source and add free! So grab a couple friends and set sail for high adventure with this fun little dice game. If your lucky, you may even strike “midnight”!

It is an open source app, and you are welcome to check out the code on my github page.

Linux – keep it simple.

Testing out List Views in Android app development

Today, in my Android App Developer Course by Rob Percival, he showed us how to make lists in our apps. As is his style, he shows us the meat and potatoes of something, and then challenges us to garnish it.

During the challenge, we were supposed to make the list clickable, and when clicked, have it pop-up with a toast to say what item in the list you clicked on. This is mostly just a note for my own reference, but after completing the challenge, Rob showed us a much cleaner way to do that. His method reduced 2 of my lines down to one. Here’s what I did:

MainActivity.java

[CODE]

package com.alaskalinuxuser.testlistviews;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.view.View;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;
import java.lang.String;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Defining the list view that I want by id.
        final ListView theList = (ListView) findViewById(R.id.theList);

        // Defining an array of names.
        final List myList = new ArrayList();

        // Adding names to the array list.
        myList.add("Dad");
        myList.add("Mom");
        myList.add("Brother");
        myList.add("Sister");
        myList.add("Uncle");
        myList.add("Aunt");
        myList.add("Grandma");
        myList.add("Grandpa");
        myList.add("First Cousin");
        myList.add("Second Cousin");
        myList.add("Double Cousin");
        myList.add("Friend");

        // Defining an adapter, to adapt my array list to the correct format.
        ArrayAdapter<String> addaptedAray = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myList);

        // Using the adapter to adapt my array list to the defined list view that I declared already.
        theList.setAdapter(addaptedAray);

        // Setting up a listener to "listen" for me to click on something in the list.
        theList.setOnItemClickListener(new AdapterView.OnItemClickListener() {

            // Overriding the generic code that Android uses for list views to do something specific.
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int z, long l) {

                /*
                 * My method, that I came up with during the class....
                 */
                // Converting the integer of "z" to a string with the name of the item clicked in the list.
                String a = (String) myList.get(z);

                // Logging that I tapped said item in the list.
                Log.i("tapped", a);

                // A simple toast to inform the user of what they clicked on in the list.
                Toast.makeText(getApplicationContext(), "Hi " + a , Toast.LENGTH_LONG).show();

                /*
                 * The method that Rob showed us in the class.... Much simpler code, very straight forward.
                 * public void onItemClick(AdapterView<?> adapterView, View view, int z, long l) {
                 *
                 * Toast.makeText(getApplicationContext(), "Hello " + myList.get(z) , Toast.LENGTH_LONG).show();
                 *
                 * }
                 */

            }
        });


    }
}

[/CODE]

activity_main.xml

[CODE]

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.alaskalinuxuser.testlistviews.MainActivity">

    <ListView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:id="@+id/theList" />
</RelativeLayout>

[/CODE]

Herein lies the key part, though, where I differed from the instructor….

my way:

[CODE]

public void onItemClick(AdapterView<?> adapterView, View view, int z, long l) {

    /*
     * My method, that I came up with during the class....
     */
    // Converting the integer of "z" to a string with the name of the item clicked in the list.
    String a = (String) myList.get(z);

    // Logging that I tapped said item in the list.
    Log.i("tapped", a);

    // A simple toast to inform the user of what they clicked on in the list.
    Toast.makeText(getApplicationContext(), "Hi " + a , Toast.LENGTH_LONG).show();

[/CODE]

The better, cleaner way, as shown by Rob:

[CODE]

public void onItemClick(AdapterView adapterView, View view, int z, long l) {

 Toast.makeText(getApplicationContext(), "Hello " + myList.get(z) , Toast.LENGTH_LONG).show();

 }

Note Edge Screen Protector

When it comes to screen protectors, I prefer glass. Recently, I decided that it was high time that I purchased one for my Galaxy note edge. Here’s what I bought (this is not one of those add kickback deals, just a link to what I bought):

Note Edge Screen Protector,ChYu@Full Coverage Premium Tempered Glass Film Protector for Samsung Galaxy Note Edge N9150  https://www.amazon.com/dp/B01DP4425G/ref=cm_sw_r_other_apa_YgzNybAKTJNPF

It works really well and looks great! But what I thought I would share was that it was a little harder to put on properly than other glass screen protectors that I have used in the past. Particularly the curved part for the “edge”. I kept getting it on there in such a fashion that the edge was not perfectly aligned, causing a small gap at the edge, which resulted in a ” clicking ” sound when I would press on it, as the glass would flex back to make good contact with the edge.

So, I’d you buy one, take my advice: start your application at the edge, and roll it onto the flat party of the device. That way your edge is aligned for the curved part of the screen and glass protector. Once I realized this, it went on in second and fit like a glove.


Here is a picture with it on my note edge, with a fresh install of RR nougat.

Linux – keep it simple.

Free icons: six sided dice!

I needed some dice for games that I am making. It was difficult to find free to use for anything dice icons online, so I ended up creating my own. I used Gimp to make the set. Nothing fancy, but may be useful for you. I just used a gradient fill and then put black dots on the squares for each side of the die.

I applied the Apache-2.0 license to these, so feel free to use or abuse them to the maximum extent possible!

http://www.mediafire.com/file/qni04n6cywtk0ed/aklu-dice.tar

Linux – keep it simple.

​A timer app…

Well, my first open source app just hit the play store:
https://play.google.com/store/apps/details?id=com.alaskalinuxuser.hourglass

As well as F-droid:

Hourglass (Set variable timers with audible alarm and vibration) –https://f-droid.org/app/com.alaskalinuxuser.hourglass
Here’s the description:
Hourglass – a timer application.
A simple application that can be used to start a

timer from one second to one hour. The app can then

be closed or left open, while a status bar notification

reminds you that you have a timer in progress.
Upon reaching 00:00, an audible bell as well as a 

short vibration and visual pop-up will indicate that your

timer has ended.
Great for reminding yourself to do something, or for

use while playing games that require timers! And,

best of all: THIS APP CONTAINS NO ADDS!

You can go to my github for the source, and I’ll be breaking some of the highlights down in another post.
Linux – keep it simple.

Fixing a WiFi hotspot issue

While working on the JFLTETMO (Samsung Galaxy S4) I ran into an error with the WiFi hotspot, but only after flashing my custom kernel. So, I grabbed my USB cable, and pulled a logcat over ADB, while trying to use the WiFi hotspot feature.

Here’s what the logs read:

[CODE]

01-26 10:42:10.483 578 723 D AudioService: Stream muted, skip playback
01-26 10:42:10.488 264 624 D SoftapController: Softap fwReload – Ok
01-26 10:42:11.622 578 712 D wifi : set interface wlan0 flags (UP)
01-26 10:42:11.622 578 712 I WifiHAL : Initializing wifi
01-26 10:42:11.622 578 712 I WifiHAL : Creating socket
01-26 10:42:11.631 578 712 I WifiHAL : Initialized Wifi HAL Successfully; vendor cmd = 103
01-26 10:42:11.631 578 712 D wifi : Did set static halHandle = 0x9c9380e0
01-26 10:42:11.631 578 712 D wifi : halHandle = 0x9c9380e0, mVM = 0xb42f8000, mCls = 0x201fb2
01-26 10:42:11.631 578 712 D wifi : array field set
01-26 10:42:11.645 578 712 E wifi : failed to get channel list : -95
01-26 10:42:11.645 578 712 D wifi : set country code: US
01-26 10:42:11.651 578 10453 I WifiNative-HAL: Waiting for HAL events mWifiHalHandle=-1668054816
01-26 10:42:11.651 578 10453 D wifi : waitForHalEvents called, vm = 0xb42f8000, obj = 0x201fb2, env = 0x9cc0ecd0
01-26 10:42:11.654 264 624 D SoftapController: SoftAP started successfully
01-26 10:42:11.751 10455 10455 E hostapd : Configuration file: /data/misc/wifi/hostapd.conf
01-26 10:42:11.765 10455 10455 I hostapd : rfkill: Cannot open RFKILL control device
01-26 10:42:11.785 10455 10455 E hostapd : Using interface wlan0 with hwaddr d0:22:be:45:9e:d0 and ssid “AndroidAPun”
01-26 10:42:11.854 264 624 D SoftapController: /data/misc/wifi/sockets already exists
01-26 10:42:11.855 264 10471 D SoftapController: SoftapController::threadStart…
01-26 10:42:11.855 264 10471 D SoftapController: /data/misc/wifi/sockets already exists
01-26 10:42:11.856 578 712 D SoftApManager: Soft AP is started
01-26 10:42:11.871 10455 10455 I hostapd : wlan0: interface state UNINITIALIZED->ENABLED
01-26 10:42:11.871 10455 10455 I hostapd : wlan0: AP-ENABLED
01-26 10:42:11.871 578 712 E wifi : wifi_get_supported_feature_set returned error = 0xffffffa1
01-26 10:42:11.872 578 609 E BatteryStatsService: no controller energy info supplied
01-26 10:42:11.898 264 624 D CommandListener: Setting iface cfg
01-26 10:42:11.900 264 624 D CommandListener: Trying to bring up wlan0
01-26 10:42:11.909 264 624 D TetherController: tetherInterface(wlan0)
01-26 10:42:12.052 264 624 D TetherController: Setting IP forward enable = 1
01-26 10:42:12.058 264 624 D TetherController: Starting tethering services
01-26 10:42:12.060 264 624 D TetherController: Sending update msg to dnsmasq [update_ifaces|wlan0]
01-26 10:42:12.060 264 624 D TetherController: Tethering services running
01-26 10:42:12.064 578 578 D Tethering: got Sim changed to state LOADED, mSimAbsentSeen=false
01-26 10:42:12.064 578 628 D ConnectivityService: requestNetwork for uid/pid:1000/578 NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
01-26 10:42:12.067 578 735 D Ethernet: got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 50
01-26 10:42:12.068 578 712 D WIFI : got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 50
01-26 10:42:12.068 578 712 D WIFI_UT : got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 50
01-26 10:42:12.069 923 923 D PhoneSwitcherNetworkRequstListener: got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 50
01-26 10:42:12.072 578 707 W ConnectivityExtension: ConnectivityExt jar file not present
01-26 10:42:12.103 578 628 W ConnectivityExtension: ConnectivityExt jar file not present
01-26 10:42:12.104 578 628 I Tethering: Finding IPv4 upstream interface on: {InterfaceName: rmnet_usb0 LinkAddresses: [10.44.167.240/30,] Routes: [0.0.0.0/0 -> 10.44.167.241 rmnet_usb0,] DnsAddresses: [172.20.64.179,172.20.64.180,] Domains: null MTU: 1410 TcpBufferSizes: 2097152,4194304,8388608,262144,524288,1048576}
01-26 10:42:12.104 578 628 I Tethering: Found interface rmnet_usb0
01-26 10:42:12.105 264 624 D TetherController: setDnsForwarders(0xf0064 0 = ‘172.20.64.179’)
01-26 10:42:12.106 264 624 D TetherController: setDnsForwarders(0xf0064 1 = ‘172.20.64.180’)
01-26 10:42:12.106 264 624 D TetherController: Sending update msg to dnsmasq [update_dns|0xf0064|172.20.64.179|172.20.64.180]
01-26 10:42:12.110 264 624 V NatController: enableNat(intIface=, extIface=)
01-26 10:42:12.125 10499 10499 I dnsmasq : started, version 2.51 cachesize 150
01-26 10:42:12.125 10499 10499 I dnsmasq : compile time options: IPv6 GNU-getopt no-DBus no-I18N DHCP no-scripts no-TFTP
01-26 10:42:12.125 10499 10499 W dnsmasq : warning: no upstream servers configured
01-26 10:42:12.125 10499 10499 I dnsmasq : DHCP, IP range 192.168.49.2 — 192.168.49.254, lease time 1h
01-26 10:42:12.126 10499 10499 I dnsmasq : DHCP, IP range 192.168.48.2 — 192.168.48.254, lease time 1h
01-26 10:42:12.126 10499 10499 I dnsmasq : DHCP, IP range 192.168.47.2 — 192.168.47.254, lease time 1h
01-26 10:42:12.127 10499 10499 I dnsmasq : DHCP, IP range 192.168.46.2 — 192.168.46.254, lease time 1h
01-26 10:42:12.127 10499 10499 I dnsmasq : DHCP, IP range 192.168.45.2 — 192.168.45.254, lease time 1h
01-26 10:42:12.127 10499 10499 I dnsmasq : DHCP, IP range 192.168.44.2 — 192.168.44.254, lease time 1h
01-26 10:42:12.127 10499 10499 I dnsmasq : DHCP, IP range 192.168.43.2 — 192.168.43.254, lease time 1h
01-26 10:42:12.127 10499 10499 I dnsmasq : DHCP, IP range 192.168.42.2 — 192.168.42.254, lease time 1h
01-26 10:42:12.127 10499 10499 I dnsmasq : read /etc/hosts – 2 addresses
01-26 10:42:12.128 10499 10499 I dnsmasq : Closing wildcard listener family=2
01-26 10:42:12.128 10499 10499 I dnsmasq : Closing wildcard listener family=10
01-26 10:42:12.129 10499 10499 I dnsmasq : using nameserver 172.20.64.180#53
01-26 10:42:12.129 10499 10499 I dnsmasq : using nameserver 172.20.64.179#53
01-26 10:42:12.146 264 624 V NatController: runCmd(/system/bin/iptables -w -t nat -A natctrl_nat_POSTROUTING -o rmnet_usb0 -j MASQUERADE) res=0
01-26 10:42:12.168 264 624 V NatController: runCmd(/system/bin/ip6tables -w -A natctrl_FORWARD -g natctrl_tether_counters) res=0
01-26 10:42:12.190 264 624 V NatController: runCmd(/system/bin/iptables -w -A natctrl_FORWARD -i rmnet_usb0 -o wlan0 -m state –state ESTABLISHED,RELATED -g natctrl_tether_counters) res=0
01-26 10:42:12.221 264 624 V NatController: runCmd(/system/bin/iptables -w -A natctrl_FORWARD -i wlan0 -o rmnet_usb0 -m state –state INVALID -j DROP) res=0
01-26 10:42:12.245 264 624 V NatController: runCmd(/system/bin/iptables -w -A natctrl_FORWARD -i wlan0 -o rmnet_usb0 -g natctrl_tether_counters) res=0
01-26 10:42:12.285 264 624 V NatController: runCmd(/system/bin/ip6tables -w -t raw -A natctrl_raw_PREROUTING -i wlan0 -m rpfilter –invert ! -s fe80::/64 -j DROP) res=1
01-26 10:42:12.337 264 624 V NatController: runCmd(/system/bin/iptables -w -D natctrl_FORWARD -i wlan0 -o rmnet_usb0 -g natctrl_tether_counters) res=0
01-26 10:42:12.373 264 624 V NatController: runCmd(/system/bin/iptables -w -D natctrl_FORWARD -i wlan0 -o rmnet_usb0 -m state –state INVALID -j DROP) res=0
01-26 10:42:12.405 264 624 V NatController: runCmd(/system/bin/iptables -w -D natctrl_FORWARD -i rmnet_usb0 -o wlan0 -m state –state ESTABLISHED,RELATED -g natctrl_tether_counters) res=0
01-26 10:42:12.405 264 624 E NatController: Error setting forward rules
01-26 10:42:12.435 264 624 V NatController: runCmd(/system/bin/iptables -w -F natctrl_FORWARD) res=0
01-26 10:42:12.464 264 624 V NatController: runCmd(/system/bin/ip6tables -w -F natctrl_FORWARD) res=0
01-26 10:42:12.494 2699 2715 E MP-Decision: Error(-22) changing core 3 status to offline
01-26 10:42:12.494 2699 2715 E MP-Decision: Error(-22) changing core 2 status to offline
01-26 10:42:12.494 2699 2715 E MP-Decision: Error(-22) changing core 1 status to offline
01-26 10:42:12.541 264 624 V NatController: runCmd(/system/bin/iptables -w -A natctrl_FORWARD -j DROP) res=0
01-26 10:42:12.577 264 624 V NatController: runCmd(/system/bin/iptables -w -t nat -F natctrl_nat_POSTROUTING) res=0
01-26 10:42:12.614 264 624 V NatController: runCmd(/system/bin/ip6tables -w -t raw -F natctrl_raw_PREROUTING) res=0
01-26 10:42:12.616 578 628 E NetdConnector: NDC Command {82 nat enable wlan0 rmnet_usb0 1 192.168.43.0/24} took too long (507ms)
01-26 10:42:12.618 578 628 E TetherInterfaceSM: Exception enabling Nat: java.lang.IllegalStateException: command ’82 nat enable wlan0 rmnet_usb0 1 192.168.43.0/24′ failed with ‘400 82 Nat operation failed (No such device)’
01-26 10:42:12.620 264 625 D TetherController: Sending update msg to dnsmasq [update_ifaces|wlan0]
01-26 10:42:12.623 264 624 D TetherController: untetherInterface(wlan0)
01-26 10:42:12.695 264 624 D CommandListener: Setting iface cfg
01-26 10:42:12.699 264 624 D CommandListener: Trying to bring down wlan0
01-26 10:42:12.948 10455 10455 I hostapd : wlan0: INTERFACE-DISABLED
01-26 10:42:12.966 264 624 D TetherController: setDnsForwarders(0xf0064 0 = ‘172.20.64.179’)
01-26 10:42:12.966 264 624 D TetherController: setDnsForwarders(0xf0064 1 = ‘172.20.64.180’)
01-26 10:42:12.966 264 624 D TetherController: Sending update msg to dnsmasq [update_dns|0xf0064|172.20.64.179|172.20.64.180]
01-26 10:42:12.968 10499 10499 I dnsmasq : using nameserver 172.20.64.180#53
01-26 10:42:12.968 10499 10499 I dnsmasq : using nameserver 172.20.64.179#53
01-26 10:42:12.984 264 624 D TetherController: Stopping tethering services
01-26 10:42:12.984 10499 10499 I dnsmasq : exiting on receipt of SIGTERM
01-26 10:42:12.986 264 624 D TetherController: Tethering services stopped
01-26 10:42:12.997 264 624 D TetherController: Setting IP forward enable = 0
01-26 10:42:13.002 578 716 D ConnectivityService: releasing NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
01-26 10:42:13.101 578 707 W ConnectivityExtension: ConnectivityExt jar file not present
01-26 10:42:13.504 2699 2715 E MP-Decision: Error(-22) changing core 3 status to offline
01-26 10:42:13.505 2699 2715 E MP-Decision: Error(-22) changing core 2 status to offline
01-26 10:42:13.505 2699 2715 E MP-Decision: Error(-22) changing core 1 status to offline
01-26 10:42:13.875 264 10471 D SoftapController: Get event from hostapd (INTERFACE-DISABLED )
01-26 10:42:13.877 578 627 D NetworkManagement: onEvent: 618 90 IfaceMessage active INTERFACE-DISABLED
01-26 10:42:13.877 578 627 E NetdConnector: Error handling ‘618 90 IfaceMessage active INTERFACE-DISABLED ‘: java.lang.ArrayIndexOutOfBoundsException: length=5; index=5

[/CODE]

There is a lot in there, but one of the highlights is that it did start the interface, set it up, and then couldn’t forward anything on it:

01-26 10:42:12.405 264 624 E NatController: Error setting forward rules

So, I ran back through my configurations, and compared them to the original CM configs, and found two things that I should enable. You can check out the commit here:

https://github.com/alaskalinuxuser/android_kernel_samsung_jf/commit/fe3fae847fe12c48515513654ac1dba2e088a0e2

Essentially, I enabled Reverse Path Filtering, you can read about it here. Basically, it filters out what should be ignored or included as a packet to/from your network. I can’t believe that I missed that. Seems pretty integral to packet forwarding, routing, and other “path” tools for packets. By God’s grace, enabling it fixed the problem and made the WiFi hotspot work again!

Linux – keep it simple.