[ROM][124602 - 2018-08-26] Unnamed Test - Google Chromecast

For anyone still using a rooted chromecast but having issues with Netflix and paid content from Google, I put together a rom that may help. It's -alpha quality for now, but works for me.
You'll need to flash it with flashcast, and there's no automatic updates or services.
https://github.com/KenMacD/Eureka-ROM/releases/download/v0.0.1-alpha/eureka_image.zip
It's based on upstream release 124602, but with an old kernel and normal modifications to make it not update.

KenMacD said:
For anyone still using a rooted chromecast but having issues with Netflix and paid content from Google, I put together a rom that may help. It's -alpha quality for now, but works for me.
You'll need to flash it with flashcast, and there's no automatic updates or services.
https://github.com/KenMacD/Eureka-ROM/releases/download/v0.0.1-alpha/eureka_image.zip
It's based on upstream release 124602, but with an old kernel and normal modifications to make it not update.
Click to expand...
Click to collapse
This is great. How can I install it into a flashcast rooted device? It's stuck in the chrome logo right now after an update which of course didn't fully get installed.

mobileman88 said:
This is great. How can I install it into a flashcast rooted device? It's stuck in the chrome logo right now after an update which of course didn't fully get installed.
Click to expand...
Click to collapse
Do you still have a flashcast-installed usb stick? If so then just copy eureka_image.zip to that, and then follow the same steps as you would have to install flashcast (boot with the button pressed).
If you have to make another flashcast usb stick then follow the instructions from: https://forum.xda-developers.com/showthread.php?t=2452838
It could probably be installed from the recovery you have now, but I haven't tested that so I don't have instructions yet.

ah cool!
i was chasing something like this as one of the many pet projects i never get to.
ie: getting back to the last viable autoroot version, and making a tweak to disable auto update, and then producing sidechannel updates for flash cast that had dmverity/crypotab stuff off. think i was pretty close, but ran into issues getting the kernel repack to work since couldn't leverage the kernel params to point to the init (IIRC) - all had to be baked in.

speakxj7 said:
ah cool!
i was chasing something like this as one of the many pet projects i never get to.
Click to expand...
Click to collapse
Same here. Autoroot would be nice, but first step first was seeing if things would actually work.
This is a kernel build from eureka_linux, which is based on oss release 1.16. The init.rc was just updated to remove the dmtable stuff and mount it directly.
From here it's probably pretty easy to do a EurekaROM-like release.

Awesome contribution, thank you. I turned on my Chromecast today just to find Netflix not working. I'd love to see this project evolve into something more advanced.

KenMacD said:
Same here. Autoroot would be nice, but first step first was seeing if things would actually work.
This is a kernel build from eureka_linux, which is based on oss release 1.16. The init.rc was just updated to remove the dmtable stuff and mount it directly.
From here it's probably pretty easy to do a EurekaROM-like release.
Click to expand...
Click to collapse
ah, i was trying to go through the repack steps on one of the latter Google OTA updates, didn't think of just going for the Eureka linux builds! i recall they were doing some stuff with the graphics system on some of the 'latest' branches, is that in here or elsewhere?
i definitely wasn't going for it to be auto-updating like autoroot, but i did want to put busybox back in and some of the other basic mods. Was shooting for 'updates' to always be a manual step via flashcast. Shy of running your own OTA system like Eureka did, doing live mods on Goog's OTA's is always going to be brittle, since they could 'break' the mod script at any point.
re: dmtable, exactly yes. once we control the init, can just setup/mount the system plain-ways.

Recovery Instructions
First up. Let me just say thanks to KenMacD!! My chromecast has been borked for a couple of years and now it works again!
KenMacD said:
It could probably be installed from the recovery you have now, but I haven't tested that so I don't have instructions yet.
Click to expand...
Click to collapse
Note: Per the release notes there is no ssh/telnet/web access after the flash
Here are steps to I used get it working via Recovery, output will follow...
Reboot into Recovery. Not sure the exact way to do this (holding the button didn't work), it seems like I just disconnected and reconnected power a couple of times until it showed the "Please wait while your ChomeCast is updated..." screen.
At this point the device should be connected to your wifi (assuming your AP is the same as when you set-up the chromecast back in the day)... so connect to it over SSH
Next up put the image onto a usb stick (fat formatted), plug it into your Y-wire and mount it. (it might be possible to just scp the image to the flashcast, if you don't have Y-wire handy)
Finally run flash-image on the zip file
After flashing and cleanup message appears, reboot - all done.
Output from my run
Code:
[email protected]:~$ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] # password: letmein
[[email protected] ~]# mkdir /mnt/usb
[[email protected] ~]# mount /dev/sda1 /mnt/usb
[[email protected] ~]# nohup flash-image /mnt/usb/eureka_image.zip & tail -f nohup.out # Nohup isn't really needed because the process doesn't reboot automatically, but I'm a bit paranoid when it comes to firmware updating...
[1] 704
nohup: appending output to nohup.out
Extracting /mnt/usb/eureka_image.zip (zip) to /tmp/tmp.lfOvoz
Archive: /mnt/usb/eureka_image.zip
inflating: boot.img
inflating: imager.sh
inflating: recovery.img
inflating: system.img
Flashing mod at /tmp/tmp.lfOvoz
KennyROM-124602.001: Imager.sh now running
KennyROM-124602.001: Flashing Kernel...
Flashing ./boot.img to kernel (mtd2)
KennyROM-124602.001: Flashing System...
Flashing ./system.img to rootfs (mtd3)
KennyROM-124602.001: Script Finished!
Removing temporary mod directory /tmp/tmp.lfOvoz <--- Once you see this, flashing is done
^C
[[email protected] ~]# reboot

Is there any way to get a chromecast back to stock?

Android tv
Please help to install new ROM for my smart TV to install apps from google play because my device didnt alow me to install any app from google play....
Please help me

Mstst2008 said:
Please help to install new ROM for my smart TV to install apps from google play because my device didnt alow me to install any app from google play....
Please help me
Click to expand...
Click to collapse
You mean to say your tv is not allowing installation of apps found on google play running on your tv?

My smart tv running aptoide tv so i need install this app
play.google.com/store/apps/details?id=com.ispsgroups
So, please help me to modify the firmware to LG or Samsung firmware ...
---------- Post added at 04:30 PM ---------- Previous post was at 04:27 PM ----------
avvgopal said:
You mean to say your tv is not allowing installation of apps found on google play running on your tv?
Click to expand...
Click to collapse
My smart tv running aptoide tv so i need install this app
play.google.com/store/apps/details?id=com.ispsgroups
So, please help me to modify the firmware to LG or Samsung firmware ...

THANKYOU @KenMacD !!!
managed to upload it via ssh with tftp, ( idea from @ironstorm about svp. but seems theres no sftp-server installed etc, but found there is a tftp ... )
so no usb sticks, or y-cables etc needed will give other people a guide here ...
1. You need a tftp server running, so get tftpd64 running and setup on ya pc (from here http://tftpd32.jounin.net/tftpd32_download.html)
2. my chromecast worked as such, just wasnt able to actual cast anything, so use the proper google app to set it up on WiFi if it isnt already
3. get chromecast into recovery, power up/down/up/down seems to induce it ! not sure like ironstorm what the proper procedure is !
4. then connect to it via SSH, i used PuTTY (ip will be different than when you initially set it up on Wifi with app)
5. then in PuTTY once connected /user/bin/tftp -g -f eureka_image.zip 192.168.x.x
6. then flash-image eureka_image.zip
7. once its finished ! .. reboot (powercycle)
and wahoo ! working chromecast again !!!
just to note, as i was worried .. althou we have no SSH etc when its running as norm.
we DO have SSH while in recovery/flashcast as above, it doesn't remove that, so its all good for next update, which can be done via this procedure too

I was able to resurrect my old Chromecast using the flashcast method, but I wasn't able to configure it. The Chromecast dongle would start up okay, but it needed to be setup. When I launched the Google "Home" app, it couldn't find the Chromecast. I eventually flashed an older eureka_image.zip (44433) and then the "Home" app was able to find the Chromecast, and I was able to set it up. Then I flashed this latest version (124602) and it continued to work.

Does this build still enable telnetd and/or sshd?
Edit: Looks like the answer is no, but you can still ssh into recovery.

I checked this kernel with the latest OTA as well and it should still work theoretically by combining this kernel with new system (ota.159268) and libc from ota initrd. Maybe minor midifications on init.rc possibly to adjust some arguments on service calls.
But there is always that slight risk of unbootable system. The worse scenario possible is if the system image is not properly modified, allowing overwrite of recovery partition and loosing flashcast. But still doable by someone who still know what he is doing and still have that interest and time on this device.
I also posted another method recently of achieving the same, essentially by allowing whatever rootable kernel/system you have to boot completely and then mounting new modified system and initrd.libs over original mounts, and then restarting some services. But again the mod we do to system is important, so that unwillingly we don't let googles services to overwrite flashcast (cleanup those flash recovery executables update_engine and recovery.img on OTA system).
But beyond that since nothing is really flashed, there is less chance of a brick, but still allowing the old chromecast to use latest cast_engine and all related executables and binaries (just as an unrooted chromast on latest OTA).
KenMacD said:
Same here. Autoroot would be nice, but first step first was seeing if things would actually work.
This is a kernel build from eureka_linux, which is based on oss release 1.16. The init.rc was just updated to remove the dmtable stuff and mount it directly.
From here it's probably pretty easy to do a EurekaROM-like release.
Click to expand...
Click to collapse

morchu said:
I checked this kernel with the latest OTA as well and it should still work theoretically by combining this kernel with new system (ota.159268) and libc from ota initrd. Maybe minor midifications on init.rc possibly to adjust some arguments on service calls.
But there is always that slight risk of unbootable system. The worse scenario possible is if the system image is not properly modified, allowing overwrite of recovery partition and loosing flashcast. But still doable by someone who still know what he is doing and still have that interest and time on this device.
Click to expand...
Click to collapse
I have attempted to do this, but I don't really know what I'm doing. Every image I've generated in this attempt has been unbootable, necessitating recovery and reflash. Can you give more details of what modifications are needed? This will be the last upstream for this hardware, so it would permanently solve the OTA attempts and take the hassle out of rebooting. Thanks.

Thanks @KenMacD @ironstorm @miniminus
I finaly resurrect my CC. I've made it using ssh and scp.
Somehow it happend that I had issue with free space on CC (even that I cleared /tmp), so I tried to flash it from zip but saw next
Code:
[[email protected] fw]# unzip -d /tmp/fw/ /tmp/eureka_image.zip
Archive: /tmp/eureka_image.zip
inflating: boot.img
inflating: imager.sh
inflating: recovery.img
inflating: system.img
unzip: write: No space left on device
unzip: inflate error
so I had to unzip fw localy and scp files to cc. (because otherwize it show error and unziped not fully)
(I created folder /tmp/fw to keep fw files)
Code:
scp ./imager.sh [email protected]:/tmp/fw
scp ./boot.img [email protected]:/tmp/fw
scp ./recovery.img [email protected]:/tmp/fw
scp ./system.img [email protected]:/tmp/fw
scp ./flash-image.sh [email protected]:/tmp/fw
last one file is modified https://raw.githubusercontent.com/team-eureka/flashcast-flasher/newmode-alpha/src/flash-image
I've change few lines near 293 , it was made not to coping this files again to tmp folder
Code:
elif test -d "$_MOD_FILE" ; then
_EXTRACTED_PATH="/tmp/fw"
echo "Copying ${_MOD_FILE} to ${_EXTRACTED_PATH}"
# cp -r "$_MOD_FILE" "$_EXTRACTED_PATH"
chmod 755 "$_EXTRACTED_PATH"
else
echo "${_MOD_FILE} is not of a recognized mod format"
exit 2
fi
So after that I saw
Code:
[[email protected] fw]# ./flash-image.sh /tmp/fw/
Copying /tmp/fw to /tmp/fw
Flashing mod at /tmp/fw
KennyROM-124602.001: Imager.sh now running
KennyROM-124602.001: Flashing Kernel...
Flashing ./boot.img to kernel (mtd2)
KennyROM-124602.001: Flashing System...
Flashing ./system.img to rootfs (mtd3)
KennyROM-124602.001: Script Finished!
Removing temporary mod directory /tmp/fw

annoyingly i went to use my chromecast again after a while...
but i have since changed wifi settings (as stopped old WPA, and only on WPA2, so update pass etc)
so i needed to setup again... but like @SFDave google home just doesnt see it anymore...
tried finding 44433.001.zip like him, but its not available anywhere now so i failed on first hurdle
anyone still have a copy ?....
have now found it... the http://pdl.team-eureka.com/ota/final/44433.001.zip link, found in the main 44433 pinned thread does work !!!!
but as its not a "secure" link you have to copy link and past it in as separate address! (as in just clicking link within that post/thread doesn't actually work etc)
flashed 44433.001 by renaming to eureka_image.zip and placed in root of fat32 formatted usb stick, with he y powered USB cable.. when in the recovery flashcast screen (plugin, unplug, plugin quickly) (takes a few minutes be patient!
once it reboots you will know it worked ! also you get a log file on the USB stick too .
then i flashed the one at top of thread.....

Related

I Got Hamachi Working on G1 Android!

Hello,
I was interested in getting Hamachi to work on my newly-acquired G1. After applying Cyanogen's Mod and rooting the thing, installing Debian (yay!) and setting up all the nifty scripts to make it semi-permanent, I focused on getting Hamachi to work.
First I tried the Linux tgz but it failed ("wrong architecture, teabag!" it told me.) ..so I looked around some more, and came across a build for the Nokia N770 (Maemo something-or-other) and decided to give it a try, and holy **** if it didn't work (after some tweaking.)
NOTE: YMMV.
Make sure your phone is r00ted. Can't do it without the r00ty-juice. Also, a Debian distro is required. See here for how: http://www.saurik.com/id/10
**EDIT** I just reflashed my G1, so I had the opportunity to try again and figure out the exact steps! Here they are, as they worked for me:
01) Download the N770 Hamachi tarball: http://files.hamachi.cc/linux/nokia-770/hamachi-0.9.9.9-20-lnx-n770.tar.gz .
02) Untar/ungzip it, it will extract to hamachi-n770-0.9.9.9-20.
03) cd into there, and run sh ./install.
04) mkdir /dev/net to create the node directory in /dev.
05) mknod /dev/net/tun c 10 200 to create the tunnel device.
06) apt-get install sudo if you don't already have it.
07) apt-get install libcrypto++7 if you don't already have it.
08) ln -s /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.0.9.7
09) sudo tuncfg to get the tunnel driver started.
10) hamachi-init to set up the initial configuration and RSA keys.
11) hamachi start to start up Hamachi.
12) hamachi login to login to the Hamachi network.
13) hamachi set-nick nickname if desired.
14) hamachi join network password if desired.
Success!! Got my G1 online and logged into my Hamachi network! I did apply this Linux fix (to make it stay online within my Hamachi2 network -- this is Hamachi 0.9.9):
echo KeepAlive 10 >/root/.hamachi/config
Maybe overkill, as it's gonna send a ping every 10 seconds over the air, which I'm sure will eat up my battery after a while.
--Weasel5i2
nice! been waiting for something like this for quite some time ;D having some problems though... it won't compile... when i run make install, just keeps on giving me a "Nothing to do for target "install"" Tried removing tuncfg folder and hamachi executable too (which doesn't work btw, says libcrypto is missing), still didn't work... any ideas?
Oh, thanks for reminding me! I also did an apt-get install libcrypto++7 when it gave a linker error.
As far as Make goes, it doesn't really compile (it is precompiled) as much as just copy the binaries to the proper places in the path.. Try doing the install of libcrypto++7 and see if it works for you.
--W5i2
alright... so ive tried installing libcypto 0.9.8 and renamed it to 09.9.7.... however it still says i need to run hamachi-init which doesn"t work!
Edit: alright, got it... i had to do sh install
Thanks, seems to work!
tip: the libcrypto.so.0.9.8 wich you have to rename to libcrypto.so.0.9.7 is located in /usr/lib
Can any of you two (Fish & Zero) whom have gotten this to work confirm what you did, and if "Debian" is needed ?
TheUriel said:
Can any of you two (Fish & Zero) whom have gotten this to work confirm what you did, and if "Debian" is needed ?
Click to expand...
Click to collapse
it does work, it only works on debian at the moment, since the binaries are not designed for android. however, the network connection should work with android too, since debian and android share their connections...
all you need to do is follow the instructions, but also run
apt-get install libcrypto0.9.8 and
mv /usr/lib/libcrypto0.9.8.so /usr/lib/libcrypto0.9.7.so (something like that check ls /usr/lib)
Alright so im still breaking my neck to get this to work but i dont get it.
This guy says "4) Untar/ungzip the file, run 'make install' and it should install without errors/warnings, IIRC.. (I did this last night)". What is he talking about ? Do i download the zip file, extract the folder in it to the root of my SD ? because thats what i have done so far. And if yes after then what comes next ? I cant put his puzzle together. -.- So lost, and i really want this.
You need a working debian on your android for this to work.
and even then its helluva lot of doing magic until it so much as tells you that it's started.
My Problem for example is that when i do: "hamachi start" it tells me that it can'T access the tun device (no such device) but it's there...
Dont worry about it, i went back to Hero after getting Debian working.
Updated PP
I reflashed my phone, so I had a chance to install Hamachi and document it again. As such, I updated the parent post with the correct instructions.
Enjoy, and please let me know if anything doesn't work and I'll happily try and help with troubleshooting.
--W5i2
Hmm almost eberything works except 'hamachi start' wich throws bad response from tuncfg (/dev/net/tun no such device)
Prolly a problem with my debian installation but you got an idea without reinstalling the whole thing?
You need to make the tun device first:
# mkdir /dev/net
# mknod /dev/net/tun c 10 200
I have since rewritten the original post to have more detailed (and proper) instructions.
^_^
-W-
Tried that after it was posted here in a reply (i think)
But to no avail (tried sudo tuncfg too but nothing changed)
Can't wait to go try this.
Does anyone have any VNC viewers (preferably free) that they recommend for use with this? My computer is behind a NAT router so I need to use Hamachi to access it.
Spica
Hi all,
Am I able to install this Debian into my rooted Eclair 2.1 Samsung Spica?
Thanks in advance.
SadaT5700 said:
Hi all,
Am I able to install this Debian into my rooted Eclair 2.1 Samsung Spica?
Thanks in advance.
Click to expand...
Click to collapse
Or my Evo 4G?
I have ubuntu running on my Evo 4G per the instructions here: http://forum.xda-developers.com/showthread.php?t=720622
I've followed the hamachi install instructions in this thread, but when I try running "hamachi start" I receive the following:
07 04:33:56.732 [ 0] [6315] tap: connect() failed 111 (connection refused)
Does anyone out there have any idea on how to fix this and get hamachi running?
This would be AMAZING on the Evo. Just imagine the possibilities of remote administration.
I have it working however I can only mount linux shares I cant mount windows drives
and what sucks is the ubuntu image wont let you paste files to filesystem ,root, home, or anywere. only from terminal.

[SCRIPT/MOD] Deodexed files for Bell (06/05/11)

If you are looking for how to get back to stock Bell, go HERE.​
Disclaimer: I have not tested this on anything but my phone. This is a development section of a hacking website. Make backups. Know what you are doing.​
Credits:
Brut.all for apktool
edgan for 2nd-init
designgears for aroot inspiration.
xda for being a source of info.
​
Requirements:
Windows 7 or Ubuntu 10.10+ (10.10 and 11.04 tested)
Java installed. (For applymods, it uses apktool)
Running Phone, not in recovery mode, etc.
Tips:
Don't factory reset please if something goes wrong, it just erases your personal settings, it doesn't write to the system partition. It also deletes your data partition, making it harder to get back to stock.
Early usb mode, turn your phone on while holding down the lower volume button, when it says fastboot, release and press volume down repeatedly until it says early usb enumeration, then press up volume. It takes 30 seconds or so before adb is ready.
​
Version 9:
Download it here.
What's new:
Added support for 2nd-int (WIP, tested on stock Bell only)
shsu updated to allow a super user to become a super user, acts like sh in that case.
fixed linux install_recovery.sh and uninstall_recovery.sh scripts to use shsu instead of remaining using su. Ditto with ApplyMods.sh
Boot animation now smaller, using jpegs instead of png files, no difference in appearance.
​
Version 8:
Download it here.
What's new:
Added full phone backup and full restore phone options to the menu. It will download a backup if there is none found.
root script more universal, tries psneuter first, then gingerbreak.
Early usb recovery updated, now uses a tmpfs for system, also mounts /sdcard and /sdcard-ext.
Deodexed French 2.1.1 files incorporated.
Misc fixes
​
Version 7:
What's new:
New Menu script for windows and linux in the top folder, double click Menu and enter options.
ApplyMods and other scripts updated to use /data/local/tmp/system, this means I can update system.tar.gz and add folders to be copied into system.
Early USB enumeration recovery option. (experimental but useful as is)
Fixed bugs in windows scripts. Can't get user input from bat file while in a parenthesis block apparently.
Bloat backed up to sdcard now
root and unroot scripts updated with more prompts for rebooting phone.
​
Version 6:
What's new:
Support for Telstra 1.4.2.
ApplyMods can create signed update.zips now, Create_update.bat updated. both using basic ready made scripts in main bin folder instead of creating them on the fly, CR LF issues.
Updated root and unroot scripts, more fool proofing, has to be Bell stock firmware (psneuter doesn't work on telstra).
Includes basic boot animation, and mod for Bell apn on telstra firmware. (Have to reset to default under access point names in settings.)
transparent status bar, yellow tinted white for text color, matches front buttons somewhat.
​
Version 5.1:
Features:
Works under Linux and Windows 7
Includes root and no ads scripts
Patch system for applying modifications.
What's new:
New scripts for doing mods, fixes issues with patch 9 images.
Updated root and unroot scripts, more fool proofing.
New RestoreSystemPartition script
Custom apktool for more [hopefully] bug free installations.
How to use:
Extract archive, keeping folder structure intact.
run a command prompt/terminal (There is a link to one in the windows folder)
run root.bat or root.sh from the linux or windows folders, depending on which one you are using.
Turn the phone off after that is done and turn it back on again.
The rest of the scripts shouldn't be run with psneuter affecting the phone.
run ApplyMods.bat (.sh) [OPTIONAL] This applies webtop hack and translucent status bar, translucent notification drop down, etc. Select update system.tar.gz.
run install_bell_deodex.bat or .sh
System image of stock Bell.
Mirror of above​
Cheers!
Very nice! Looks good!
Will try this when I get home
Sent from my Motorola Olympus
So what is the benefit of this? Will I be able to theme my device with some of the themes that are available? Or should I play it safe and wait for a bell. Sbf to leak before I try anything and brick my phone again lol thanks in advance
EDIT: i see that you have included soft_brick.bat is it the same as this one http://forum.xda-developers.com/showthread.php?t=982859 because that one did not work for me thanks again
Sent from my MB860 using XDA Premium App
cool, i'll try this tomorrow when i don't still have a ****load to do and only 5 hours to sleep
nice to see a Bell dev here!
Also I just wanted to say major props for the crazy awesome idea of doing over-the-air download and installation. Really smart and original.
Atrices, just so you know
NFHimself said:
Hi,
(What is the plural of Atrix?)
Click to expand...
Click to collapse
Can I run this on my mac? Sorry relatively new to adb
Sent from my Motorola Olympus
you could run it on a mac, just had to edit the script a bit.
Hi,
So what is the benefit of this? Will I be able to theme my device with some of the themes that are available? Or should I play it safe and wait for a bell. Sbf to leak before I try anything and brick my phone again lol thanks in advance
Click to expand...
Click to collapse
I wouldn't try theming with ATT files, I would take what was done to them and apply them myself to the deodexed files here. There may or may not be differences that are not obvious. I am never really sure if there is any benefit to this stuff, it's fun to do, about it.
EDIT: i see that you have included soft_brick.bat is it the same as this one http://forum.xda-developers.com/showthread.php?t=982859 because that one did not work for me thanks again
Click to expand...
Click to collapse
The soft_brick.bat script is specific to the folders I am using for transferring data to /system/app and /system/framework. It tries to get root via psneuter, mounts system read write, deletes dalvik-cache files, and tries to copy the files already on the phone to the right folders. It could be that just one file caused the phone to crash mid copy and copying it again will fix things. This avoids trying to do a usb data transfer of all the files which you don't have time to do otherwise. I was also thinking that install-recovery.sh would be a good place to do this, (and then clobber it later with the init.d hack) but I couldn't find setprop and I wasn't in need enough to select a file to use as a semaphore.
Can I run this on my mac? Sorry relatively new to adb
Click to expand...
Click to collapse
It would be easier to do it all from a sh script really, and that would likely be more compatible with a Mac.
Also I just wanted to say major props for the crazy awesome idea of doing over-the-air download and installation. Really smart and original.
Click to expand...
Click to collapse
Thanks!
Cheers!
maledyris said:
Atrices, just so you know
Click to expand...
Click to collapse
Thanks, a lot, really, 10 chars..
How do I recover from a softbrick from this? Thanks.
Before anything is done, all the files are extracted to /data/local/tmp/app and /data/local/tmp/framework. If you run into problems put the phone into fastboot/early usb enumeration mode (see here) and run soft_brick.bat (.sh for linux)
Quote:
A soft brick, in this case, is when you make a bad edit to your framework files and the phone won't fully boot and starts flashing a red LED at you.
There is one catch, you only get about 1-2min to do all of this before the phone reboots on its own. If that happens, do SuperOneClick steps again and continue where you left off. Better yet, build a script to do it all for you
Power off your device
Enter Fastboot:
Hold Volume down + power until you see Fastboot at the top left
Use volume down to scroll down to "Early USB Enumeration" (only shows one item at a time, if you pass it, keep going down, up selects)
Press Volume up to select​
This is the message I get when i run the batch file.
This is of course when invoking Early USB Enumeration.
Wait for the count down to finish ...
'TIMEOUT' is not recognized as an internal or external command,
operable program or batch file.
clearing Dalvik cache..
rm failed for /data/dalvik-cache/[email protected]*.dex, No such file or directory
rm failed for /data/dalvik-cache/[email protected]*.dex, No such file or director
y
rm failed for /data/dalvik-cache/[email protected]*.odex, No such file or directory
rm failed for /data/dalvik-cache/[email protected]*.odex, No such file or directo
ry
reinstalling apps
cp: cannot stat '/data/local/tmp/app/*': No such file or directory
reinstalling framework..
cp: cannot stat '/data/local/tmp/framework/*': No such file or directory
done.
The timeout message means you are running a version of windows without timeout, see adeo thread.
The lines for rm just mean there are no files to delete in the Dalvik-cache, which is normal, you should see that the second time around.
The cp lines are saying that there are no files in /data/local/tmp/app (/framework).
So, that's unusual, in order to get soft bricked using my script you would to have copied files from /data/local/tmp to /system, and if you are bricked would be unable to delete the files afterword.
sequence:
cd /system
cp /data/local/tmp/app/* app/
sync
reboot now
**brick**
So, how are the /data/local/tmp/app files being deleted?
No clue. I'm not sure what to do here? Is my phone permanently bricked? Any other way to recover from this? The one thing that could have gone wrong is I tried installing from my behind my works firewall. Maybe I could not download the proper files.
No, you are soft bricked, you only made a change (that I know of) in system files.
Were you rooted before you tried this?
If you copy the soft_brick.bat files and change the last line to be adb.exe shell ls -R /data/local/tmp, what do you get?
Basically, it sounds like to need to get the files copied over to data/local/tmp, how they are missing/inaccessible is odd. So, create a script to copy the files over bit by bit, might take a while but it should be able to be done.
EDIT:
Do this:
from command prompt:
adb.exe shell ./data/local/tmp/psneuter
wait a few seconds
type this:
adb shell ls -l -R /data/local/tmp
if psneuter fails, it isn't in /data/local/tmp, which is also odd.
I was rooted before this. So I should attempt all these commands while Early USB Enumeration right? That doesn't give me much time Lol.
OK, here's the output.
C:\bell_deodex>adb.exe shell ./data/local/tmp/psneuter
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
property service neutered.
killing adbd. (should restart in a second or two)
C:\bell_deodex>adb shell ls -l -R /data/local/tmp
/data/local/tmp:
-rwxr-xr-x root root 585731 2011-01-09 02:02 psneuter
-rw-r--r-- mot_tcmd mot_tcmd 4 2011-03-30 21:00 ap_tcmd.pid
C:\bell_deodex>^A
And sorry to be a pain. How would I create the script? What are the files that need to be copied? Are they included in your script?

Rooting protection?

I have now successfully rooted my device by downloading the firmware, unpacking system.img.md5, adding the su binary, making an ext4 sparse image and installing that to the device using heimdall. Problem was, that on my first attempts the system became unstable, the UI restarted repeatedly, especially when manually switching WiFi and Data Mode. After double and triple checking everything I found that I could create a perfectly stable system image by following the same steps but just not adding the su binary. One further attempt placing the su binary in /system/usr/bin (does not exist) and using it as a backdoor to install the binary to /system/bin/su I now seem to have a stable and rooted system.
It appears that something has been detecting my initial and straightforward attempt to tamper with the system image and made the system to become unstable. I have seen a lot of errors from PackageManager in my logs but nothing conclusive.
Tom
RealBorg said:
I have now successfully rooted my device by downloading the firmware, unpacking system.img.md5, adding the su binary, making an ext4 sparse image and installing that to the device using heimdall. Problem was, that on my first attempts the system became unstable, the UI restarted repeatedly, especially when manually switching WiFi and Data Mode. After double and triple checking everything I found that I could create a perfectly stable system image by following the same steps but just not adding the su binary. One further attempt placing the su binary in /system/usr/bin (does not exist) and using it as a backdoor to install the binary to /system/bin/su I now seem to have a stable and rooted system.
It appears that something has been detecting my initial and straightforward attempt to tamper with the system image and made the system to become unstable. I have seen a lot of errors from PackageManager in my logs but nothing conclusive.
Tom
Click to expand...
Click to collapse
Hi Tom! I managed to root my s advance with this method, but in guide that I have read, was said that I should put the su binary on "/system/xbin/". I used that steps, by Xanonus. Over here everything gone right and after flashing, I got Supersu from Play store. If help you, please thanks Xanonus.
Sorry for bad English
johnnybr said:
Hi Tom! I managed to root my s advance with this method, but in guide that I have read, was said that I should put the su binary on "/system/xbin/". I used that steps, by Xanonus. Over here everything gone right and after flashing, I got Supersu from Play store. If help you, please thanks Xanonus.
Click to expand...
Click to collapse
Xanonus unnecessarily copies everything out from system to new_system, you can just add the su binary to the loop mounted image.
/bin/su is the location of the su binary on every Unix system and Superuser also installs the su binary to /system/bin/su. I wonder if it would make a difference (avoid instability) to place it in /system/xbin/su.
Tom
RealBorg said:
Xanonus unnecessarily copies everything out from system to new_system, you can just add the su binary to the loop mounted image.
Click to expand...
Click to collapse
I really suspected that, like you said, part of all that stuff was unnecessary.
About the place of su binary, well, I just wanna to help. I don't know nothing about linux and less of unix. But normally, while you are dealing with this kind of stuff, you should try. Cause things sometimes work when they shouldn't and don't work like they should. I can only say: God knows why...:silly:
Thread moved to General section, post in the relevant section next time.
Why use Heimdall to flash ? Odin3 works better
"None forget the bite.....of Viper...."
CallMeVentus said:
Why use Heimdall to flash ? Odin3 works better
Click to expand...
Click to collapse
heimdall is the method of choice when you are on linux and works like a charm
much easier than Odin which needs the image to be put into a .tar.md5 file
Tom
RealBorg said:
heimdall is the method of choice when you are on linux and works like a charm
much easier than Odin which needs the image to be put into a .tar.md5 file
Tom
Click to expand...
Click to collapse
I have tried heimdall but I can't make it work on Windows (7 X64, it never get to comunicate between pc and mobile). So when I was messing with my rom I have to try zillions of ways to make a image to work with Odin. In the end, make the image with ext4_utils and compress with tar on my virtual machine running ubuntu did the trick. If you don't put any md5sum verification or "md5" in the name of the file, Odin never check the file.
This was me trying to root hahhaa!!
I guess everyone that want play with Android should learn to use linux. ubuntu at least. I intend to learn linux, but I can't right now.
Sorry, crap english from google translator!
johnnybr said:
I have tried heimdall but I can't make it work on Windows (7 X64, it never get to comunicate between pc and mobile). So when I was messing with my rom I have to try zillions of ways to make a image to work with Odin. In the end, make the image with ext4_utils and compress with tar on my virtual machine running ubuntu did the trick. If you don't put any md5sum verification or "md5" in the name of the file, Odin never check the file.
This was me trying to root hahhaa!!
I guess everyone that want play with Android should learn to use linux. ubuntu at least. I intend to learn linux, but I can't right now.
Sorry, crap english from google translator!
Click to expand...
Click to collapse
Seriously?
How can hemidall work on windows when its designed for linux!
Sent from my GT-I9070 using xda premium
Shaaan said:
Seriously?
How can hemidall work on windows when its designed for linux!
Click to expand...
Click to collapse
Actually it has a windows version. Even Mac has a version of Heimdall. Take a look: http://www.glassechidna.com.au/products/heimdall/
Indeed I can't make it work... Perhaps on windows x86 it can work...

SMB/CIFS on tab S2?

I bought a tab S2 about a month ago to replace my HP touchpad i've had/been using since the firesale about 4 yrs ago. At the time of purchase, I discovered really quickly that lack of custom roms on the S2 at that time was to much of an issue, and I returned it.
I am however seeing an alpha of CyanogenMod for the tab S2 that's looking pretty close to usable. Given that the tab is also on sale this week, i'm very much inclined to repurchase it, however, question: Does cifs/smb mounting remote filesystems work with the tab s2 rom that was posted?
You can do that on the stock S2 with many different apps in the Play Store. ie. ES File Explorer, Solid Explorer, AndSMB
nrage23 said:
You can do that on the stock S2 with many different apps in the Play Store. ie. ES File Explorer, Solid Explorer, AndSMB
Click to expand...
Click to collapse
Correct me please if i'm wrong, but those applications just allow me to browse remote filesystems from the application itself. They don't smb mount them. It's the cifs.ko file i'm missing (which i'm assuming is included with cm12?)
The cifs.ko file would have to be done via a kernel module based on what I seen from other devices. I do not know if it is included in CM kernels or not.
Did you or anyone get cifs working?
I understand it may be possible to compile a cifs.ko and insmod it.
I don't know how possible that is but whilst I'm googling how to compile I thought I'd see if anyone had done it.
Cheers, Guy
I got CIFS mount working on my 710 by installing Neked_Nook_MM-710-V1 and my fork of @engine95 mm kernel which has the cifs module enabled.
Hi thanks for the reply
I don't suppose you have any tips or suggested posts/ guides I could use to recreate your setup?
I guess I could figure out how to get neked nook flashed based on the guides but the fork of the engine95 Kernel that includes cifs..? I can see a post about the permissive kernel by engine95..
Is your device fully functional and stable now?
Thanks a lot,
Guy
Neked nook is very stable. My tab s2 has not crashed so far with that rom, and my custom kernel. I have attached my boot image. This is a fork of engine95 kernel with just cifs module added. This kernel only works on MM.
Extract boot.zip and flash boot.img via twrp(boot image) or fastboot.
You can use the attached cifs manager to mount your smb/cifs drives on android as a directory.
I am only able to mount it to /mnt/drive. I could not get it to mount to /sdcard.
Awesome thanks
I use cifsmanager on a Chuwi hi12 that i've rooted, it already has the cifs modules and permissive kernel so I am able to mount the shares almost wherever I like - and I use cifsmanager to poke 1TB of satellite images into the map folder of my mapping app on the SD card. But I don't know if cifs was in the kernel (chuwi is on lollipop) already or part of the rooting process, would love to recreate the setup on my samsung as its a far superior device.
I'll give it a go this weekend, really appreciate you taking the time to upload the files you used.
Cheers,
Guy
Hi Currowth,
I know life is too short to help each noob, but can I trouble you for another pointer?
I used the full image of Neked Nook MM v1, and the boot image you provided, and the tablet is working great, and if I cat /proc/filesystems I can now see cifs listed....but..
I can't mount any cifs shares - to anywhere, including /mnt/drive. I get the mount failed Mount: I/O error.
(I think my process was along the lines of: ODIN to cf-autoroot (i'd actually done this a while before starting this thread so including in case its relevant, as i dont know if there is an issue with a /system or systemless root?) then I ODIN'd TWRP on, took a full backup with TWRP and then wiped data,cache, system etc and flashed Neked Nook on, booted into NNook, then went back to twrp and put the boot image you provided on.
Any help greatly appreciated.
If it means anything I'm not trying to watch Batman in bed, I'm trying to put together a repeatable solution for me and my overland traveller friends so we can take huge amounts of map and satellite image tiles completely offline when we're driving our landrovers, toyotas etc across deserts where sat navs or road maps are useless.
thanks again,
Guy
*Edited to add i've been googling the crap out of the mount i/o error, tried a patched version of cifsmanager, tried copying the apk to the system/apps folder and changing its permissions before reinstalling.. no joy
Looks like it can be a root issue. This is what i flashed to get root. "BETA-SuperSU-v2.74-2-20160519174328"
try to install busybox also and try again.
If that does not work:
Can you try to run this in adb shell as root?
mount -t cifs -o username="username",password="password" //smbpath/dir mnt/cifs/dir
replace "username,"password", and smbpath/dir
Guy009 said:
Hi Currowth,
I know life is too short to help each noob, but can I trouble you for another pointer?
I used the full image of Neked Nook MM v1, and the boot image you provided, and the tablet is working great, and if I cat /proc/filesystems I can now see cifs listed....but..
I can't mount any cifs shares - to anywhere, including /mnt/drive. I get the mount failed Mount: I/O error.
(I think my process was along the lines of: ODIN to cf-autoroot (i'd actually done this a while before starting this thread so including in case its relevant, as i dont know if there is an issue with a /system or systemless root?) then I ODIN'd TWRP on, took a full backup with TWRP and then wiped data,cache, system etc and flashed Neked Nook on, booted into NNook, then went back to twrp and put the boot image you provided on.
Any help greatly appreciated.
If it means anything I'm not trying to watch Batman in bed, I'm trying to put together a repeatable solution for me and my overland traveller friends so we can take huge amounts of map and satellite image tiles completely offline when we're driving our landrovers, toyotas etc across deserts where sat navs or road maps are useless.
thanks again,
Guy
*Edited to add i've been googling the crap out of the mount i/o error, tried a patched version of cifsmanager, tried copying the apk to the system/apps folder and changing its permissions before reinstalling.. no joy
Click to expand...
Click to collapse
Thanks for coming back Currowth,
Ok my SuperSU from the original cf-autoroot was 2.46. I assumed I needed to remove that so I ran the unroot function and then used twrp to flash the version you linked to, after reboot SuperSu is at 2.74.
Unfortunately i have the same I/O error.
I also ran adb root from my win10 machine and tried the manual mount command as you suggested - it returns I/O error also. Initially it said 'no such file or directory' so I manually created the dir, with the name the same as the share dir, in /mnt/cifs.
command output
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: No such file or directory
255|[email protected]:/ # cd /mnt/cifs
[email protected]:/mnt/cifs # mkdir Public1
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: I/O error
One other thing, in the NNook image thread, i see it says make sure you 'ODIN M' first. I'm embarrassed to say i don't know what that means!
update in mean time: i started again, based on doing all the flashing whilst rooted with the older supersu. So i've unrooted, rooted with your beta_xx linked above, wiped system, cache, data and dalvik, flashed the Neked Nook full MM V1 ROM, booted into that, then back to twrp to flash the boot.img you linked above, installed busybox, the linked cifsmanager, tried to mount, then updated supersu as recommended in NNook thread, rebooted and tried mount again but no joy, always getting i/o error.
just for further info, the shared folder does work on my chuwi with cifsmanager, so hopefully that is not the issue. Before I re-did the ROM and the boot image, i installed paragon ntfs and was able to successfully mount an NTFS formatted SD card into the /mnt/cifs/public1 directory.
interestingly cifsmanager couldn't create the directories under /mnt, but i was able to create them manually and then get an IO error. I changed permissions on the /mnt/cifs folder and now it can create the directory when attempting to mount but still gets IO error.
i'm beyond my depth, guess it feels like cifsmanager is either not working or not got permission - or something i've done prior to the NN and kernel flashes has caused an issue.
Its starting to feel like a lost cause. You know better than me - if this is the end of the easy flash-type fixes to try, perhaps I should just throw in the towel.
Thanks again for your help Currowth, you're a gent
I just did a clean install to replicate you issue, but was not able to reproduce it. 'ODIN M' means that install a marshmallow rom first via ODIN. If you already came from a marshmallow ROM, you can ignore it.
The steps i took to ensure that i am was able to get cifs were the following:
First i installed "Neked_Nook_MM-710-V1.zip"
Next I installed "BETA-SuperSU-v2.74-2-20160519174328.zip"
Last i installed "boot.img"
I did this all through twrp.
Reboot, dont setup knox if it asks you to.
Try to do a wipe, then reinstall the following and try again.
Guy009 said:
Thanks for coming back Currowth,
Ok my SuperSU from the original cf-autoroot was 2.46. I assumed I needed to remove that so I ran the unroot function and then used twrp to flash the version you linked to, after reboot SuperSu is at 2.74.
Unfortunately i have the same I/O error.
I also ran adb root from my win10 machine and tried the manual mount command as you suggested - it returns I/O error also. Initially it said 'no such file or directory' so I manually created the dir, with the name the same as the share dir, in /mnt/cifs.
command output
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: No such file or directory
255|[email protected]:/ # cd /mnt/cifs
[email protected]:/mnt/cifs # mkdir Public1
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: I/O error
One other thing, in the NNook image thread, i see it says make sure you 'ODIN M' first. I'm embarrassed to say i don't know what that means!
update in mean time: i started again, based on doing all the flashing whilst rooted with the older supersu. So i've unrooted, rooted with your beta_xx linked above, wiped system, cache, data and dalvik, flashed the Neked Nook full MM V1 ROM, booted into that, then back to twrp to flash the boot.img you linked above, installed busybox, the linked cifsmanager, tried to mount, then updated supersu as recommended in NNook thread, rebooted and tried mount again but no joy, always getting i/o error.
just for further info, the shared folder does work on my chuwi with cifsmanager, so hopefully that is not the issue. Before I re-did the ROM and the boot image, i installed paragon ntfs and was able to successfully mount an NTFS formatted SD card into the /mnt/cifs/public1 directory.
interestingly cifsmanager couldn't create the directories under /mnt, but i was able to create them manually and then get an IO error. I changed permissions on the /mnt/cifs folder and now it can create the directory when attempting to mount but still gets IO error.
i'm beyond my depth, guess it feels like cifsmanager is either not working or not got permission - or something i've done prior to the NN and kernel flashes has caused an issue.
Its starting to feel like a lost cause. You know better than me - if this is the end of the easy flash-type fixes to try, perhaps I should just throw in the towel.
Thanks again for your help Currowth, you're a gent
Click to expand...
Click to collapse
Thanks Currowth I will try and give it a go tomorrow
Just a thought, are you booting into Android after each step, or doing all the flashing in one twrp session then doing first boot once all items are flashed?
I flashed them in one session without rebooting.
Hi Currowth, I've had a breakthrough!
I re did the NNook/root/boot image in the order you advised.
I have been using a patriot node WiFi disk enclosure, that works with cifs manager on my other tablet. Today I was working away from the WiFi disk so I made do with a windows pc to provide a shared folder. After setting cifs manager up I was able to mount the share under /mnt, but not to any other location. I got back to my WiFi disk, and that continued to give an io error!? So windows worked but the patriot didn't. Weird. I'd ruled the patriot out as it works on my 5.1 lollipop tab.
So I continued to mess around... I had stumbled across another app called mount manager by Ryan conrad (I don't have the link but I have the apk) which has more noob-friendly options and found if I used the ntlmv2 option I could mount the patriot into /mnt !
I did try to get it to mount to other locations and although it succeeded in the app, the mounted folder was empty.
As my app - Osmand+ has the option to manually specify it data folders I created a 777 permission folder for it under /mnt, and then mounted the patriot containing my satellite images into the appropriate empty tile folder.
Working solution!!! If a little messy.
Thanks so much for your help, the Samsung s2 is about 400% faster and more practical than the other tablet so really happy
I don't know why android devices are so limited by manufacturers when the OS is capable of so much, but that's a different conversation haha
A follow up on this in case it is useful to others...
Using /mnt was a bad idea. /mnt is mounted / built on a system partition as a mount point for other file systems or devices (how I have explained it to myself). So anything you add here as a folder gets destroyed when you reboot.
So, I installed my osmand app to /data/osmand and then used a root terminal to run "chmod -R 777 /data/osmand/" to set permissions to 777 on that folder and all subfolders.
After doing this I was able to get mount manager to mount my cifs share into an empty subfolder in the apps folder tree.
I initially tried changing permissions on /data in case it was needed for folders further down the tree, but it was not needed - which is just as well because again, /data is mounted at boot with 771 permissions, so changes 777 back to 771 after reboot. To change that would involve unpacking the boot image in order to edit the init.rc file and then repacking. I didn't bother it was not required.
If anyone wants mount manager, Google 'ryan conrad mount manager' and take your chance with the apk sites, can't remember whigh site I used!

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