[Q] Moto X 2014 & Cisco AP - X 2014 Q&A, Help & Troubleshooting

I have a Moto X (2014). I need to use it in various locations with Cisco APs. The problem I'm having is that after entering a network pass code, the network transitions directly to saved and never actually connects.
Logs on the phone show:
"WPA: CCMP is used, but EAPOL-Key descriptor version (3) is not 2"
The access points aren't mine to control or I'd patch them.
My desire is to disable pmf in /data/misc/wifi/wpa_supplicant.conf, but every time I toggle wifi the file seems to get regenerated with pmf=1 instead of the desired pmf=0.
Any thoughts? Or ideas when we might see a fix ala:
Code:
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index d95c1bd..f8825d2 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -1756,6 +1756,9 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_addr,
wpa_msg(sm->ctx->msg_ctx, MSG_INFO,
"WPA: Backwards compatibility: allow invalid "
"version for non-CCMP group keys");
+ } else if (ver == WPA_KEY_INFO_TYPE_AES_128_CMAC) {
+ wpa_msg(sm->ctx->msg_ctx, MSG_INFO,
+ "WPA: Interoperability workaround: allow incorrect (should have been HMAC-SHA1), but stronger (is AES-128-CMAC), descriptor version to be used");
} else
goto out;
} else if (sm->pairwise_cipher == WPA_CIPHER_GCMP &&
The patch above isn't mine but I'm not yet 'old enough' to post links to external things. Just FYI, I didn't fix the C code, I just hacked up the overlay conf below.

[solved] PMF workaround for Moto X (2014)
Every single time I go to ask a question it's too soon.
If you have this phone and you're trying to connect to a CISCO AP that you either can't or won't update, here's a work around that should get you online.
Requirements
* Rooted
* Basic ADB use
* Basic linux commands
Code:
adb shell
su
cp /system/etc/wifi/wpa_supplicant_overlay.conf /sdcard/
On your computer
Code:
adb pull /sdcard/wpa_supplicant_overlay.conf .
perl -i -pe 's/pfm=1/pfm=0/' wpa_suplicant_overlay.conf
adb push wpa_supplicant_overlay.conf /sdcard/
Turn off wifi
Back on your phone.....
Code:
adb shell
su
mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system
cp /sdcard/wpa_supplicant_overlay.conf /system/etc/wifi/wpa_supplicant_overlay.conf
sync
Reboot. Once your phone reboots, turn on wifi and you should be able to join if you were having the same problem I was with a few APs.
I'd like to thank /etc/init.qcom.wifi.sh for pointing me in the right direction.
NOTE:
This hack is a dirty, dirty hack. It completely disables pmf which is a fairly nice part of 802.11w
It hasn't reached mass adoption yet, but it's a shame I needed to disable this. A more pragmatic fix would be to fix the wifi driver to fall back as the patch in my first post does.

Awesome conversation I'm having with myself, but hey somebody might use this...
I wrote a stupid app so I could toggle the hack I did on/off for when I'm not using a crippled wifi AP. It's fugly but it works. The apk is at https://neverlight.com/MotoXWifiHack.apk

If you'd rather get the source and build it yourself, and I wouldn't blame you, I put it up here:
https://github.com/jstelzer/MotoWifiHack

Related

Google's ION Android Build for HTC Kaiser - Development and Downloads Thread

This is the Development and Downloads Thread for the ION Build of Android for our Kaisers.
Any Non Development Questions will be Ignored in this Thread
Only Development related content will be posted here.
All non development related questions need to be directed to this thread: Questions and Troubleshooting
First Thanks to Vilord for the work, and thanks to whoever he thanked (Martin, Okibi, etc etc)
Working:
Data Connection
Google Services
Call Waiting
GPU Graphics Acceleration
Work In Progress: (not by me)
Camera
GPS
WIFI
Instructions: (adapted from Vilord's vogue post)
For some people ROM and Radio make a difference in whether or not certain aspects of the phone work. I am using Shifu's 6.1 V08 WWE Naked ROM with Radio 1.65.24.36
Before I boot haret, while still in WinMo, I always complete 1 call, so I call my voice mail, then once it connects I hang up. I'm not sure if completing a call like this actually helps, but I do it anyway. If you are not able to make calls, try this step.
Step 1: Download the files:
-Download ExtractToRootOfSDCard.zip below and extract *everything* to the root of your SD card
-Download system-ion.img from below, rename it to system.img and put it in the root of your SD card
-Download zImage from below and put it in the root of your SD card
-Download the newest initrd.gz file, extract it to your SDCard and overwrite the initrd.gz file that was in the ExtractToRootOfSDCard.zip
Step 2: Run it!
-Run Haret, and it should boot into android.
Reports have shown that starting over with the fresh data file (data.gz) instead of using your existing data.img produces better results.
Be aware of the fact that it will take a long time to extract the data.img file from the data.gz archive during your first boot. It took about 5 minutes for me.
At first your orientation may not return to portrait mode after closing the keyboard, if this happens fix it by:
Going to Settings > Sound & Display > Under Display Settings UNCHECK "Orientation"
Download the system-ion.img file (then rename it to system.img put it in the root of your SD card)
Download the kernel aka zImage (then put it in the root of your SD card)
Download the latest initrd.gz file from Vilord's google code page
reserved for updates
reserved for updates
Thanks for the thread, I'll update this post later with my ION system.img that has the original key layout along with bash and busybox tools added. Other than that, it's the current one you posted.
For anyone new to developing Android, here's what to do (thanks to everyone for these scripts):
system.img
Code:
mkdir stock-system && mkdir temp
sudo mount -o loop system.img stock-system
genext2fs -d stock-system -b 300000 -a system.ext2
sudo mount -o loop system.ext2 temp/
[B]---Make Changes---[/B]
sudo mkfs.cramfs temp/ system.1.5.img
I've attached genext2fs as well (thanks dzo)
initrd.gz
Extract--
Code:
gunzip initrd.gz && cpio -i < initrd.cpio
Compress-- (within directory)
Code:
find ./ | cpio -H newc -o | gzip > ../myinitrd.gz
data.gz
Is simply a gzipped ext2 img file.
We've been putting busybox and bash into the initrd... since it doesn't take up much space it allows more customization of the initrd environment...
Could you let me know what of my vogue stuff doesn't work on kaiser and what you need to change to make it work? It may be easy to adapt the vogue stuff to be compatible with both.
Installed ok. With a couple notes:
During first boot, got stuck at the terminal screen with nothing happening after the Data.img was extracted.
Rebooted, booted fine.
Noticed that 320x480 looks retarded as a screen resolution for Kaiser
Reset resolution to 336x448 and rebooted.
Crashed in terminal with Oops #11 (seriously, thats what it said)
Reset resolution to 320x428 looks fine. I'll probably try a few higher resolutions to get more screen real-estate.
Also, I was initially not able to install items from the Market. They download fine, but when the 'install' starts, it throws an error. This may have to do with attempting to download two things at one time. I later retried the download and both items installed fine.
In initrd.gz/init file:
When it boots, it complains of "no telephony database. Will check for Android apn on next boot:"
Code:
SQLITE3="/bin/sqlite3"
[B]DB="/data/data/com.android.providers.telephony/databases/telephony.db"[/B]
if [ -e $DB ] ; then
if [ "`$SQLITE3 $DB 'SELECT numeric FROM carriers;' | grep 310995`" != "310995" ] ; then
echo Creating android apn
"$SQLITE3" "$DB" "INSERT INTO carriers VALUES(NULL, 'Android' , '310995' , '310' , '995' , 'internet' , '*' , '*' , '*' , NULL, NULL, NULL, NULL, 'null' , 'default' , 1);"
fi
else
[B] echo No telephony database. Will check for android apn on next reboot[/B]
fi
After that it says "chmod: 1000 no such file or directory."
Code:
if [ -d /data/app ] ; then
if [ -d /sdcard/AndroidApps ] ; then
echo Copying Applications
cp /sdcard/AndroidApps/* /data/app
[B] chown 1000 1000 /data/app/*[/B]
fi
fi
Example of Questions being asked in wrong thread
enatefox said:
...all the other stuff you said, then...
How can I debug bootup?
Click to expand...
Click to collapse
Please refer questions like this to the "Questions and Troubleshooting Thread"
enatefox said:
In initrd.gz/init file:
When it boots, it complains of "no telephony database. Will check for Android apn on next boot:"
Code:
SQLITE3="/bin/sqlite3"
[B]DB="/data/data/com.android.providers.telephony/databases/telephony.db"[/B]
if [ -e $DB ] ; then
if [ "`$SQLITE3 $DB 'SELECT numeric FROM carriers;' | grep 310995`" != "310995" ] ; then
echo Creating android apn
"$SQLITE3" "$DB" "INSERT INTO carriers VALUES(NULL, 'Android' , '310995' , '310' , '995' , 'internet' , '*' , '*' , '*' , NULL, NULL, NULL, NULL, 'null' , 'default' , 1);"
fi
else
[B] echo No telephony database. Will check for android apn on next reboot[/B]
fi
After that it says "chmod: 1000 no such file or directory."
Code:
if [ -d /data/app ] ; then
if [ -d /sdcard/AndroidApps ] ; then
echo Copying Applications
cp /sdcard/AndroidApps/* /data/app
[B] chown 1000 1000 /data/app/*[/B]
fi
fi
Click to expand...
Click to collapse
The chown line has been fixed and will be uploaded soon.
The no telephony database line should go away after first bootup. Does it not?
MBurris: the setupmodem.sh script you have must be an older version as I had already removed the lines you mentioned. Anything else?
now I understand, you want the stuff added back *in*
It is done, added to ppp-on-dialer where it belongs.
Also completely fixed the data.gz stuff by eliminating data.gz. Now the initrd will create a new data.img if there isn't one there.
support for data.img backups from bootup as well, just create a /sdcard/backup folder
@Vilord: Have you added the new stuff into your latest initrd.gz (on google download)?
Edit: After I used the latest files from google download all the files on my SD card are totally gone :s. I booted Android Original ION hero build, and back in Windows all files are gone on my SD card :s
Hi there, dunno if this belongs to the ION question and answer thread, but could anyone be able to make one of the roms with this:
http://android-unleashed.com/2009/06/htc-hero-theme-1-2-for-the-android-g1.html
Cause i think this theme would be very cool on this ion builds..
Still having issues with the phone not waking up.
Using pm.sleepmode=1, otherwise, as you know, the battery life lasts about 2 hours.
KAIS110
radem205 said:
@Vilord: Have you added the new stuff into your latest initrd.gz (on google download)?
Edit: After I used the latest files from google download all the files on my SD card are totally gone :s. I booted Android Original ION hero build, and back in Windows all files are gone on my SD card :s
Click to expand...
Click to collapse
I think this is due to corruption on the SD card, coupled with the creation of a large file (data.img). I'll post an updated initrd in an hour that has filesystem checking on the SD card before it tries to do anything else, that should avoid wiping out people's stuff.
EDIT: sorry, hit go advanced and post by accident and double posted
JeckyllHavok said:
Hi there, dunno if this belongs to the ION question and answer thread, but could anyone be able to make one of the roms with this:
http://android-unleashed.com/2009/06/htc-hero-theme-1-2-for-the-android-g1.html
Cause i think this theme would be very cool on this ion builds..
Click to expand...
Click to collapse
I'm with you. 3 threads and no real response at getting themes. I tried it myself by manually overwriting the apps, data files and framework as the update would but it hangs at boot or crashes mercilessly once the desktop appears beyond nonfunctional.
mburris, that's what prompted me to post the question about how to debug bootup. This is every bit a development issue. Those are signed apps that override the ION ones and they should "just work" so what's wrong and who's at fault . Plus it's hard for us to really troubleshoot users' issues with modems and startup without something better than dmesg. Then users can attach a log to their posts for us to look at.
Posted to the vogue people:
Okay the initrd.gz on google code has been updated yet again.
This time is a major update with repaired bell SMS (thank you Martin), new libgps (thank you Steven), and statically linked filesystem checks (that was me).
On my phone, it took about a minute to create a new data.img (*don't use data.gz!!!*)
You'll want to use martin's new zImage from here
MBurris, does it just work now, or is there still some tweaking for kaiser?
---
For themeing, it is *very* difficult to theme an ion build. Much easier to theme the opensource builds, but they aren't as fast.
For themeing, it is *very* difficult to theme an ion build. Much easier to theme the opensource builds, but they aren't as fast.
Click to expand...
Click to collapse
How difficult are we talking? Mssmision had two ION builds with Hero. What's involved?
Latest initrd and zImage:
336x448 resolution works again! SOOO much nicer than the non-4:3 included with the install package you posted...
Noticed the Blue LED blinks now... Something good coming?
Data, Market, Txt, calls, call-waiting, all work.
GoogleTalk works again,
runs SOOOO fast....

[ROM] [WIP] Custom rom for MetroPCS users (Based off CM6)

I have decided not to build a ROM anymore. Instead, I have been working on the "Proxy Configuration Tool for Alternate Carriers" so that you can use almost ANY ROM (including CM6) with MetroPCS AND Cricket, yes, the Proxy Configuration Tool for Alternate Carriers will also support Cricket.
As you can see, the Proxy Configuration Tool for Alternate Carriers is an open-source project and you can contribute to it.
Here's the current TODO list:
- BUG: Proxy actually not updating properly when setting it through the sqlite db.
- Find out the correct ip for the mms proxy server for both MetroPCS and Cricket.
- Find out the correct network interface used by the Motorola Droid on FroYo.
- Find out the correct eri.xml file for cricket.
- Setup screen first time it runs & check for the following on every boot.
- Automatically setup APN.
- Check build.prop and modify it if it's needed (backup too) (ask for restart if modified)
- Check /data/eri.xml and install the new one if it's needed (backup too) (ask for restart if installed)
- Check for u2nl binary, if not available install it in /system/bin/, it's in the assets folder. (ask for restart if installed)
- Check for sqlite3 binary, if not available install it in /system/xbin/, it's in the assets folder. (ask for restart if installed)
- Drop database tables and replace them with appropriate Carrier Settings in: /data/data/com.android.providers.telephony/databases/telephony.db
- Document, organize and maybe improve configuration screen.
- It needs a better icon.
As you see, at this point is not complete, mostly due to the fact that the Proxy is not changing properly unless you reboot. It must be a stupid mistake on my part. I have been really busy lately and I have only been working on this when I get some free time, I figured somebody could contribute to this
If you'd like to test it go to the github link here and click on the Downloads tab and there should be an alpha version in there. I'll be building new versions whenever I clear out any of the items in the TODO list above.
Thank you.
[RESERVED]
How do you get metropcs on the Dinc....I would love to know
Sent from my ADR6300 using XDA App
there's shops that will flash any cdma phone over to metro. That's why you see sprint and verizon phones with bad ESN #s selling on craigslist
mexicanigga said:
How do you get metropcs on the Dinc....I would love to know
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
- Use the ##778 programming instruction just like as if you were flashing a Droid Eris.
- Find somebody (a dealer most likely) to put the ESN into MetroPCS's database.
- Flash this rom (hopefully it'll be completely done soon)
WOW!! Ok I am currently running CyanogenMod 6.0RC1 on a HTC Sprint Hero and had a vendor here in town who gets ALL Verizion\Sprint CDMA phones on MetroPCS hook me up. He uses DamageControl 1.0 and everything works except the market of course..It does work on WiFi however.
My problem began when I just did NOT have consistent internet. It just was hit and miss. WiFi worked no problems. So I started messing around with different ROMS with NO luck at all. I have wiped and wiped (phone and SD card)everything you could do..Still notta!!! So I am super curious if this would work? I really just need my dam internet to work..It would be awesome if it was on this CyanogenMod 6 ROM...It's smoking and appears to be the best ROM I have found for a Hero..Man if anyone could help me get this baby on the net...I would be willing to pay. I think my settings are off honestly...HELP!
Your thoughts?
CyborgNM156 said:
WOW!! Ok I am currently running CyanogenMod 6.0RC1 on a HTC Sprint Hero and had a vendor here in town who gets ALL Verizion\Sprint CDMA phones on MetroPCS hook me up. He uses DamageControl 1.0 and everything works except the market of course..It does work on WiFi however.
My problem began when I just did NOT have consistent internet. It just was hit and miss. WiFi worked no problems. So I started messing around with different ROMS with NO luck at all. I have wiped and wiped (phone and SD card)everything you could do..Still notta!!! So I am super curious if this would work? I really just need my dam internet to work..It would be awesome if it was on this CyanogenMod 6 ROM...It's smoking and appears to be the best ROM I have found for a Hero..Man if anyone could help me get this baby on the net...I would be willing to pay. I think my settings are off honestly...HELP!
Your thoughts?
Click to expand...
Click to collapse
It will work for you, but you must be sure to take one very important step before you attempt this, or you will end up with a bricked phone.
Buy a HTC Droid Incredibile
Using this rom, or any other rom for the incredible on a device that is not an incredible will result in an unusable phone, if not bricked forever!
Teksu said:
It will work for you, but you must be sure to take one very important step before you attempt this, or you will end up with a bricked phone.
Buy a HTC Droid Incredibile
Using this rom, or any other rom for the incredible on a device that is not an incredible will result in an unusable phone, if not bricked forever!
Click to expand...
Click to collapse
That's completely right.
The beauty of what I'm doing here, is that, just like I did for the Droid Incredible and the Droid, it could also be done for the Hero and the EVO, since CM supports all of these devices. As long as the source is completely open of course.
Once I fix these issues with the u2nl binary not working properly, I'll update my winzip and build the "roms" for the Droid, EVO and Hero.
For now, this build above only works for the Droid Incredible.
Nice would this work for my flash metropcs hero? Please let me know.
Thanks
velazcod said:
I have forked and prepared a vendor repo to build CM6 for MetroPCS on the Dinc.
DO NOT FLASH THIS UNLESS YOUR PHONE IS ON METROPCS AND YOU KNOW WHAT METROPCS IS.
Reason why I did this was so that anyone that wanted to "flash" a Dinc/Droid to MetroPCS didn't have so much of a hard time doing it, and also so that everything worked out of the box (including internet on apps, connected to wifi or not).
I also managed to build a little service "app" that runs on the background and detects changes on the state of wifi connections, and it activates/deactivates proxy (and u2nl) depending on that.
Wifi Disconnected = Proxy/U2NL activated
Wifi On = Proxy/U2NL deactivated
When proxy/u2nl is active, all data goes through MetroPCS's proxy server, otherwise use wifi's internet connection.
At this point, it works great, but it's unfinished.
- Calls and SMS work perfectly with no issues at all.
- MMS can be sent and received with no issues either.
- On wifi, everything works perfectly.
- On MetroPCS data, only browser works, for some reason the u2nl binary it still not working properly.
This is meant to be free and open sourced. Not a paid solution.
The "proxy switcher" also has a configuration screen which allows to change the configuration. You can use a custom proxy, activate/deactivate proxy/u2nl, etc.
If you have the time and know about this, please figure out a way to make the u2nl binary work properly, or contact me, my twitter is in my signature, or you can PM me and we can gchat or email. I have had limited time to work on this these past few days.
Everything is open sourced,
vendor config is here http://goo.gl/ISk6
"wifi switcher" (for proxy) is here: http://goo.gl/2wwM
Also,
If you are interested on doing this on the Motorola Droid, here's the vendor config:
http://goo.gl/kuX3
Here's a built rom, if you'd like to test it
http://bit.ly/aBa5Qr
As soon as you install it, let it boot, and open APN configuration (use AnyCut or BetterCut).
Edit the one that says "metropcs" and on on the username, make replace "MDN" with your phone number, press menu, save, and then click on the radio button for that entry. After that, MMS will work.
This is based off CyanogenMod-6.0.0 and it hasn't been modified at all. All credits go to the CyanogenMod team
Click to expand...
Click to collapse
I'll tell you what work for me.
You need to the u2nl.zip from whiterabbit.org
In that file you will find the autostart.sh file for htc hero eris under metropcs folder.
I have to edit the autostart.sh file in order to work getting rid off some lines.
This is the file I'm using. autostart.sh
export PATH="$PATH:/system/bin"
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A OUTPUT -o rmnet0 -p 6 ! -d 10.223.2.4 -j REDIRECT --to-port 1025
u2nl 10.223.2.4 3128 127.0.0.1 1025 >/dev/null 2>&1 &
exit 0
and that's all
I've pushed the files via adb in Clockwork recovery console mounting system and data
adb shell su
cd /data/
mkdir opt
chmod 0777 /data/opt/
chmod 0777 /system/bin/
exit
adb push autostart.sh /data/opt/autostart.sh
adb push u2nl /system/bin/u2nl
adb shell
chmod 0777 /data/opt/autostart.sh
chmod 0777 /system/bin/u2nl
reboot
Result is working
ahernandez4110 said:
Nice would this work for my flash metropcs hero? Please let me know.
Thanks
Click to expand...
Click to collapse
That question was answered in the post right before yours.
diegov600 said:
I'll tell you what work for me.
You need to the u2nl.zip from whiterabbit.org
In that file you will find the autostart.sh file for htc hero eris under metropcs folder.
I have to edit the autostart.sh file in order to work getting rid off some lines.
This is the file I'm using. autostart.sh
export PATH="$PATH:/system/bin"
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A OUTPUT -o rmnet0 -p 6 ! -d 10.223.2.4 -j REDIRECT --to-port 1025
u2nl 10.223.2.4 3128 127.0.0.1 1025 >/dev/null 2>&1 &
exit 0
and that's all
I've pushed the files via adb in Clockwork recovery console mounting system and data
adb shell su
cd /data/
mkdir opt
chmod 0777 /data/opt/
chmod 0777 /system/bin/
exit
adb push autostart.sh /data/opt/autostart.sh
adb push u2nl /system/bin/u2nl
adb shell
chmod 0777 /data/opt/autostart.sh
chmod 0777 /system/bin/u2nl
reboot
Result is working
Click to expand...
Click to collapse
Yeah, if you take a good look at the vendor source I posted on the OP, this is basically what I'm doing (especifically this file). At first I tried building u2nl from scratch that didn't work, then, just to try it, I tried the u2nl binary found in whiterabbit.org and that didn't work either.
There's still something wrong with this setup I'm using, but I haven't been able to track it down yet, I did this about 2 weeks ago but lately I haven't had the time to troubleshoot it all
Link to your ROM is dead.
Been trying to get the new Skyraider 3.0 to work on Metropcs
dannystang said:
Link to your ROM is dead.
Been trying to get the new Skyraider 3.0 to work on Metropcs
Click to expand...
Click to collapse
Sorry, I was messing with some files and screwed up the links.
I'm currently rebuilding it again with a few changes I made and also sync'd everything with CyanogenMod's source.
Will post new link tonight and also have builds for the Motorola Droid and HTC EVO.
Updated OP with latest build. This is based on latest CM6.
http://bit.ly/incredibleMetro
http://bit.ly/bh4wbh - Google Apps (Latest)
Thanks! I couldn't sleep so I finally figured it out
I mounted the Skyraider 3.0 RC2 release, everything works except hulu on data without wifi which is ok cause metro is slow data anyhow.
I read past instructions to get data to work I just used whiterabbit u2nl File but it seems he has a "new" folder with an edited autostart which when I pushed it on works fine...
No need to edit anything, I can switch on and off wifi no problems...
dannystang said:
Thanks! I couldn't sleep so I finally figured it out
I mounted the Skyraider 3.0 RC2 release, everything works except hulu on data without wifi which is ok cause metro is slow data anyhow.
I read past instructions to get data to work I just used whiterabbit u2nl File but it seems he has a "new" folder with an edited autostart which when I pushed it on works fine...
No need to edit anything, I can switch on and off wifi no problems...
Click to expand...
Click to collapse
That is strange, nothing works for me except the browser, as in, only the proxy is working and not the u2nl... I'll work on this tomorrow again
diegov600 said:
I'll tell you what work for me.
Result is working
Click to expand...
Click to collapse
+1 This worked for me on Skyraider 3.0 RC2.
Thanks!!!
Will try it on CM6 now.
Edit: Won't work on CM6 NIGHTLY 08/24.
Works on IncredibleDoes AOSP - FRF91.
I got it working on CM6 RC3.
Now we just need Skyraider with the Froyo Final
Why did you guys have to use the edited autostart though?
Wondering why mine works and its so different...

MILESTONE CM7 RC4 USB Tethering with Linux

I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
tether
hey can u do a easy steps for doing this???
DISCLAIMER: If you don't fully understand what I've written in the first post, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
Be prepared to reinstall ROM if you have big issues. It means DO BACKUPS!
Only for CyanogenMod 7.0 RC4 (it should work on newer versions, but I haven't tested it.)
Copy Usb-new.apk on root of your sdcard.
Copy setup.txt on root of your sdcard.
Get a shell (ADB, or Terminal emulator).
Become root ( su )
cd /sdcard
sh setup.txt
reboot the phone.
Connect the USB cable, and choose Phone as a modem.
On the pc (Linux, any distro should work)
sudo modprobe cdc-acm
echo nameserver 8.8.8.8 |sudo tee /etc/resolv.conf
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
and then open the browser!
I haven't tested setup.txt on my phone, only in a android-like directory hierarchy on my pc. I won't be online until Monday.
Try to understand everything!! And be careful.
The most difficult part was compiling Usb.apk, which I've attached now.
maxximino said:
I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
Click to expand...
Click to collapse
Hi
I am trying to send the AT Command directly from the terminal of the phone:
stop ril-daemon
cat /dev/ttyGS0 &
echo -e 'ATI\r' > /dev/ttyGS0
But the terminal is like not responding. Why?? Did someone try??
Thank you very much for the help.

[FIX] Final fix for nonworking WIFI on unlocked ATT Atrix in some countries

So guys, here is a quick tutorial how to fix your nonworking wifi in certain countries. The problem for it not working is that motorolas wifi driver is missing some country codes ... i guess they still live 20-30 years back, if anyone has the will to do it, we might post on motos forums to change the driver int he upcoming updates/releases. Here is the link to working wifi drivers: http://www.megaupload.com/?d=V8TGAY0C
if anyone can host it on a better location, feel free to do so.
I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR PHONE, YOU OR TO ANYTHING THATS IN RELATION WITH THE PHONE OR YOU.
this tutorial will be for use with adb shell (if anyone wants to make a script or a batch or even cwm flashable out of it, be my guest, i dont really have the time and my knowledge is a tad limited in doing those things )
Prerequisites:
1.the wifix.zip
2.adb on your computer with at least some adb/linux terminal knowledge
3.rooted ATT Atrix (i tested it on mine thats from ATT and several others did too, dont know if anyone tried with the bell or other atrix's but im sure it should work)
4.some common sense
5. i assume you have am external sdcard aswell (if not swap the sdcard-ext for sdcard only to use the internal card)
Code:
TURN OFF WIFI in the settings/wireless networks menu
1.connect phone to computer with us on usb mass storage mode and without adb debugging, create a folder called wififix on your external sdcard, unzip and copy the three .bin files to that folder
2.do the safely remove on windows/linux and than change connection to none, disconnect usb, enable adb debugging and reconnect your phone to the usb
3. run cmd/terminal
4. write as follows, after each line press enter:
adb shell
su (allow su on your phones display if its the first time you are using adb with su)
mount -o rw,remount -t ext3 /dev/block/mmcblk0p12 /system
rm /system/etc/firmware/wifi/*.bin
cp /sdcard-ext/wififix/*.bin /system/etc/firmware/wifi/
chown root /system/etc/firmware/wifi/*.bin
chgrp root /system/etc/firmware/wifi/*.bin
chmod 755 /system/etc/firmware/wifi/*.bin
reboot
5. let your phone reboot, disconnect usb, unlock phone, enter pin, enable wifi and its working.
Feel free to comment in the thread and help eachother with problems and ideas
Updated link due to request and megaupload being down, fee free to host it if you want to: http://filesave.me/file/13333/wififix-zip.html
Where was this driver taken from?
lg optimus 2x /system dump
the driver itself is a tad older version as the one moto has, but everything works for me fine now, several other users reported the same. i wanted to use the driver from the UK atrix (from orange) but its identical with the one from the ATT atrix (even the nvram.txt has region US in and not UK ...), so for the time being this is the only way for a few of us to have a fully functional phone.
one more thing, everyone who uses the fix and it works for him please post on motorolas forum that you have the problem:
https://supportforums.motorola.com/thread/50598
i started the thread just add that its not working.
and I was thinking how can wi-fi be related to country/location?!
because I remember in the old thread that several users from the same country (Qatar) reported the same problem.
I just sent an e-mail about your thread to one of those users who was in contact with me via e-mail while trouble-shooting his problem.
Thanks and gold luck.
Ye, just post in the moto forums that he/you have the same problem.
Does not work
on the line: chmod -R 0755 /system/etc/firmware/wifi
I get: Bad Mode
then I use: chmod 755 /system/etc/firmware/wifi/*.bin
and after reboot the same problem... WiFi appears for few seconds and gets lost
crnkoj, since this is the case. do you think using the market enabler app to spoof the SIM carrier will make wifi work in non-supported countries?!
uhm, did you copy the files over properly? the thing is its working for me fine and several others have confirmed this to work. Honestly i dont know why it wouldnt work, did the method from akizakian work for you at least? with the modified and locked settings.db?
genatsvale said:
on the line: chmod -R 0755 /system/etc/firmware/wifi
I get: Bad Mode
then I use: chmod 755 /system/etc/firmware/wifi/*.bin
and after reboot the same problem... WiFi appears for few seconds and gets lost
Click to expand...
Click to collapse
Tried that, it wont help. Market enabler spoofs the mcc and mnc, which comes from the sim card itself. The problem here becomes once you have cellular signal and turn on wifi, at that point wifistatetracker request country code from the cellular network, sets it to the one in which country you are and than the driver doesnt reckognise the code and blocks wifi. If you would take lets say a german sim card and put it in in your country wifi still wouldnt work, if you would take your sim card go to germany, turn on wifi and it would work. im trying to get something solved int eh motorola forums but until now only one guy is responding (not sure if hes motorola staff or whatsoever).
CyberPunk7t9 said:
crnkoj, since this is the case. do you think using the market enabler app to spoof the SIM carrier will make wifi work in non-supported countries?!
Click to expand...
Click to collapse
Still doesnt work for me. I can see my wireless, and can connect to it. but if I try to go to the market, or anywhere using the browser.. nada
uhm, but your laptop can use the wifi? is it any special encryption maybe, maybe you have to do vpn or stuff?
did you try ping from a terminal emulator?
guys, motorola is gonna fix it with an update it seems
https://supportforums.motorola.com/thread/50598?start=15&tstart=0
I made an update.zip for CWM if you need it. THis way you just have to apply the update after SBF/root. It SHOULD work....I did not try it.
Thanks Dennis, i was too lazy to do it
crnkoj said:
So guys, here is a quick tutorial how to fix your nonworking wifi in certain countries. The problem for it not working is that motorolas wifi driver is missing some country codes ... i guess they still live 20-30 years back, if anyone has the will to do it, we might post on motos forums to change the driver int he upcoming updates/releases. Here is the link to working wifi drivers: http://www.megaupload.com/?d=V8TGAY0C
if anyone can host it on a better location, feel free to do so.
I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR PHONE, YOU OR TO ANYTHING THATS IN RELATION WITH THE PHONE OR YOU.
this tutorial will be for use with adb shell (if anyone wants to make a script or a batch or even cwm flashable out of it, be my guest, i dont really have the time and my knowledge is a tad limited in doing those things )
Prerequisites:
1.the wifix.zip
2.adb on your computer with at least some adb/linux terminal knowledge
3.rooted ATT Atrix (i tested it on mine thats from ATT and several others did too, dont know if anyone tried with the bell or other atrix's but im sure it should work)
4.some common sense
5. i assume you have am external sdcard aswell (if not swap the sdcard-ext for sdcard only to use the internal card)
Code:
TURN OFF WIFI in the settings/wireless networks menu
1.connect phone to computer with us on usb mass storage mode and without adb debugging, create a folder called wififix on your external sdcard, unzip and copy the three .bin files to that folder
2.do the safely remove on windows/linux and than change connection to none, disconnect usb, enable adb debugging and reconnect your phone to the usb
3. run cmd/terminal
4. write as follows, after each line press enter:
adb shell
su (allow su on your phones display if its the first time you are using adb with su)
mount -o rw,remount -t ext3 /dev/block/mmcblk0p12 /system
rm /system/etc/firmware/wifi/*.bin
cp /sdcard-ext/wififix/*.bin /system/etc/firmware/wifi/
chmod -R 0755 /system/etc/firmware/wifi (you can use chmod 755 /system/etc/firmware/wifi/*.bin )
reboot
5. let your phone reboot, disconnect usb, unlock phone, enter pin, enable wifi and its working.
Feel free to comment in the thread and help eachother with problems and ideas
Click to expand...
Click to collapse
_Dennis_ said:
I made an update.zip for CWM if you need it. THis way you just have to apply the update after SBF/root. It SHOULD work....I did not try it.
Click to expand...
Click to collapse
Contribute, collaborate, conquer!! Outstanding.
It just seems strange that the OS wouldn't let you choose your country, like most routers already do... or is that taboo? Is wifi on Android mobile/cellular dependent? If so... what think tank came up with that...? How does Windows (desktop) handle this? It's not like laptops don't go on airplanes and visit other countries!!! BTW I can't believe I had to specify 'desktop'... I was thinking/worried ... "What if someone thinks I mean Windows (phone)." Seriously... who has a Windows phone? Let me re-phase... Who would be reading this specific thread and have a windows phone?
genatsvale said:
on the line: chmod -R 0755 /system/etc/firmware/wifi
I get: Bad Mode
then I use: chmod 755 /system/etc/firmware/wifi/*.bin
and after reboot the same problem... WiFi appears for few seconds and gets lost
Click to expand...
Click to collapse
The fix for that is to switch the numbers and -R, chmod expects to the the numbers first.
Code:
chmod 0755 -R /system/etc/firmware/wifi
Guys, before applying this method to my Bell Atrix (using it in Qatar, WiFi not working), I need to know:
1) Given it's a Bell Atrix, is there anything different I need to do?
2) Which root method should I use?
3) Did Bell's update fix this? Will this conflict with Bell's update? I'm planning to update my software once I get WiFi working.
Thanks
Can I apply this fix AFTER deodexing?
NOT WORKING for me either.
Rooted using Gladroot.
Non-deodexed Bell Atrix.
Followed all instructions.

Fire TV 2 - Ubuntu (Headless) Install Guide

This guide is intend to help you with "installing" Ubuntu 14.04 (12.04 also works) on the Amazon Fire TV 2 after @rbox recovery has been setup. Only headless mode is possible, similar to Ubuntu Server, but it still makes a nice little ARMv8 development box. Starting X.org or running systemd based Linux distributions will likely never be possible due to features missing from the Amazon kernel. Creative use of the framebuffer is possible if desired, maybe eventually a terminal emulator could be started. As long as you don't mount and modify mmcblk0pX there should be no possible way to mess up Android or brick the device. It's 100% reversible by just removing the SD card. You accept all responsibility for what you do with this work should something go wrong and the device becomes inoperable. With disclaimers and precursor knowledge out of the way let's get started.
To follow this guide you will need:
A micro SD card (2 GB+ recommended)
A Linux system
To login into Ubuntu you will need either:
A 1.8 V TTY USB serial device connected to the UART
A pair of USB serial devices and a null modem cable
I actually used a pair of Xbee's for testing the ttyUSB0 stuff, so hence a pair of FTDI chips would also work.
Preparing the SD Card
To get started you need to first partition the micro SD card:
Type = MBR
Part 1 = 100 MB, Fat32 (vfat)
Part 2 = Remainder, Ext4
Extract the attached zip file to the root of the first partition (extracted filename must be "ramdisk-recovery.cpio.lzma"). This is an alternative initramfs that simply uses busybox to clean up from the partial Android boot and prepare the filesystem for regular Linux. Extract an Ubuntu core root filesystem archive, ubuntu-core-14.04.4-core-arm64.tar.gz, to the root of the second partition as the root user (to preserve ownership/permissions). Make sure you sync or eject the device when done with this work so the data gets flushed to the SD card.
Now we need to make a few changes to the root filesystem to avoid usability issues and allow logins.
Replace /etc/fstab with the following contents to correct some mount options. This "disables" SELinux which fixes dpkg errors and some other login annoyances.
Code:
/dev/mmcblk1p2 / ext4 defaults,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs ro,relatime 0 0
Replace /etc/init/console.conf with the following contents to allow logins from the UART. Once the root password has been set (root is disabled by default) you can remove "-a root" if desired.
Code:
# console - getty
#
# This service maintains a getty on console from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -s -a root console
Create /etc/init/ttyUSB0.conf with the following contents to allow logins from an attached USB serial device. This should help people who don't want to take apart their device to solder wires onto the UART test points. SSH would of course be an alternative but it's not installed by default in Ubuntu core and this guide is about the building blocks not providing pre-made images (yet). Since udev doesn't work due to devtmpfs not being enabled in the kernel you will need to attach the USB serial device before booting for this to work. As before you can remove "-a root" later if desired once the root password is set. Also you should change the baud rate if needed.
Code:
start on (tty-device-added ttyUSB0)
stop on (runlevel [!2345] or tty-device-removed ttyUSB0)
respawn
exec /sbin/getty -L -a root 115200 ttyUSB0 vt102
Preparing the Fire TV
Until the search order for the initramfs file is changed by @rbox you will need to rename the initramfs on the system partition so it will continue to search for one on the SD card or USB stick. You need to connect to the device using adb either over USB or the network to execute the following commands.
Code:
adb$ su
adb# mount -o remount,rw /system
adb# mv /system/recovery/ramdisk-recovery.cpio.lzma /system/recovery/ramdisk-recovery.cpio.lzma.bak
adb# mount -o remount,ro /system
Right now this prevents "su" from working, which should be fixed by @rbox in due time. To get "su" working again you should extract the original recovery initramfs file to a USB stick and boot the device with that USB stick inserted instead of the previously created SD card. Then to restore "su" you can repeat the above steps just swapping the order of the files in the "mv" command.
Booting Ubuntu
After connecting your serial device of choice simply insert the SD card and power on the device. It's that easy! With luck you should get a shell prompt that is already logged in as root. It's a good idea to set the root password before going much further. The device isn't too useful without networking, so you can install more packages. To solve that connect an ethernet cable (since it's simpler) and type "dhclient eth0" to get online. At this point you can install openssh-server using apt-get or do anything else you'd normally do on an Ubuntu VM or headless Ubuntu system. I'm interested in hearing what people plan to do with a more-or-less high-end ARM development system.
Tips and Tricks
NOTE: These changes, unless otherwise noted, are performed while logged into the target Ubuntu system.
Setting the Hostname
You can change the hostname using the following command:
Code:
echo sloane > /etc/hostname
You should also create a simple /etc/hosts file that matches the chosen hostname.
Code:
127.0.0.1 localhost
127.0.1.1 sloane
Enable Ethernet at Boot
Create the file /etc/network/interfaces.d/eth0 with the following contents:
Code:
auto eth0
iface eth0 inet dhcp
Allow Users Network Access
Since we are stuck running an Android kernel you need to create the following group and add users who need network access (such as ping) to this special group.
Code:
groupadd -g 3003 aid_inet
usermod -G aid_inet -a root
usermod -G aid_inet -a <username>
Removing Failed Services
There are a few services that fail to start due to hardware limitations. We should just prevent them from starting in the first place. We have no VT support enabled in the kernel (boo) so we can just remove the ttyX login prompt services. Also the console setup doesn't work since our console is a serial device not a virtual terminal or other "graphical" type terminal emulator.
Code:
rm /etc/init/tty?.conf
echo manual > /etc/init/console-font.override
echo manual > /etc/init/console-setup.override
Fix /dev Hotplug
As stated before udev doesn't work due to missing kernel features. The busybox applet mdev is a simple replacement for most users. After installing the "busybox-static" package run the following command:
Code:
ln -s /bin/busybox /sbin/mdev
Now add the following line to /etc/rc.local before "exit 0".
Code:
echo /sbin/mdev > /proc/sys/kernel/hotplug
Pre-installing SSH
See: http://forum.xda-developers.com/showpost.php?p=65595013&postcount=13 (thanks @segfault1978)
Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!
segfault1978 said:
Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!
Click to expand...
Click to collapse
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.
There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.
zeroepoch said:
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.
Click to expand...
Click to collapse
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
---------- Post added at 09:09 PM ---------- Previous post was at 09:03 PM ----------
zeroepoch said:
There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.
Click to expand...
Click to collapse
Thank you for the hint, I'll have a look for the availability of this board in germany.
I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?
segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Click to expand...
Click to collapse
That is pretty crazy, but since you knew the changes required it worked Not everyone I expected to have such experience. I figured someone might even try to do a qemu chroot or debbootstrap to preinstall openssh. Multiple ways to solve the same problem I guess.
segfault1978 said:
I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?
Click to expand...
Click to collapse
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.
zeroepoch said:
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.
Click to expand...
Click to collapse
Unfortunately, I'm not compiling with parallel processes (I'm compilig Icinga2 for arm64), I'm running
Code:
dpkg-buildpackage -us -uc
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?
segfault1978 said:
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?
Click to expand...
Click to collapse
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.
segfault1978 said:
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
Click to expand...
Click to collapse
I see you are not using -pipe which is good, but a quick search suggested something that might not be simple since this package has it's own build system but changing from -O2 to -O1 might help.
I noticed that Debian has the package available for the same version and already built for arm64.
https://packages.debian.org/sid/icinga2
Maybe you already tried that. You could try going back to jessie which is probably an older version but I think most jessie packages work with Ubuntu 14.04.
zeroepoch said:
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.
Click to expand...
Click to collapse
This is the list of packages I manually downloaded for ARM64 (unfortunately I used Debian packages which worked first, but leads to a hell situation afterwards when dealing with other dependencies; be sure to use Ubuntu packages in order to avoid problems afterwards):
Code:
busybox_1.22.0
libedit2_3.1
libgssapi-krb5
libk5crypto3
libkeyutils1
libkrb5
libkrb5support0
libwrap0
openssh-client
openssh-server
openssh-sftp-server
This is the piece of calls in /etc/rc.local, right before the exit:
Code:
dpkg --force-all -i /*.deb > /install.log 2>/install.err
echo $? >> /install.log
echo "installation finished" >> /install.log
It took about 1-2 minutes before SSH started to work automatically, you can mount the SD card afterwards in another system in order to check the written logfiles.
Here are some notes for getting wireless working. In addition to the normal OS steps (installing wpasupplicant or wireless-tools and editing /etc/network/interfaces or using wicd) you will need some firmware files from /system (/dev/mmcblk0p13).
Code:
mount -o ro /dev/mmcblk0p13 /mnt
cp -r /mnt/etc/firmware/ /lib/
cp -r /mnt/etc/Wireless /etc/
umount /mnt
segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Thank you for the the fire tv guide.
Click to expand...
Click to collapse
So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Sent from my Mi A1 using Tapatalk
mrchrister said:
So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Click to expand...
Click to collapse
If it has arm64 packages and headless you can give it a try. If you don't like it you can just revert the ramdisk and go back to Android.
Ok sweet, thanks for the reply
Sent from my Mi A1 using Tapatalk
Just curious if anyone's tried running Plex server on this?
I've been looking for a better solution without shelling out $500+ for a dedicated NAS. AFTV is tiny so I could hardwire it and hide it away.
Thanks
I got the same idea. Right now the firetv is still being used as a media streamer but I'm thinking of doing this soon

Categories

Resources