Download Acceleration - Samsung Galaxy Nexus

Is it possible to accelerate downloads on Android using multiple connections just like IDM does in pc
Sent from my Galaxy Nexus using Tapatalk

Wrong thread

Actually I am looking for some mod that will enable this
Sent from my Galaxy Nexus using Tapatalk

This should be in Q&A section. Anyway I think isn't possible to accelerate downloads. Maybe you can try this: https://play.google.com/store/apps/details?id=com.download.internet.download.manager.nivax

CoDe LaZaRuS said:
Is it possible to accelerate downloads on Android using multiple connections just like IDM does in pc
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
I haven't really seen any apps that do it. You can always try using the command line though. I've attached a common linux binary I compiled called "axel" which can be used to download a file using multiple connections, e.g., download with <n> max connections:
Code:
axel -n <n> <download_url>
Unfortunately I've had some trouble making the connections which has something to do with the /etc/resolv.conf. The binary is good, I just need to figure out how to fix this /etc/resolv.conf error. I get the same error using "aria", a similar but more advanced multi-connection downloader.
It might be worth checking out and seeing if you can solve the error, especially if you use your phone sometimes to download large 1gb size media.
edit: I went ahead and compiled aria2c. I've tested it downloading a few files and it works. There were still a few urls I tried that I had to use wget or curl with, but it's a good tool to use a first try.
Code:
aria2c -s <n> <url|uri|magnet|torrent|...>
Aria's a very powerful tool, so you can use it with a bunch of different download types.

7175 said:
I haven't really seen any apps that do it. You can always try using the command line though. I've attached a common linux binary I compiled called "axel" which can be used to download a file using multiple connections, e.g., download with <n> max connections:
Code:
axel -n <n> <download_url>
Unfortunately I've had some trouble making the connections which has something to do with the /etc/resolv.conf. The binary is good, I just need to figure out how to fix this /etc/resolv.conf error. I get the same error using "aria", a similar but more advanced multi-connection downloader.
It might be worth checking out and seeing if you can solve the error, especially if you use your phone sometimes to download large 1gb size media.
edit: I went ahead and compiled aria2c. I've tested it downloading a few files and it works. There were still a few urls I tried that I had to use wget or curl with, but it's a good tool to use a first try.
Code:
aria2c -s <n> <url|uri|magnet|torrent|...>
Aria's a very powerful tool, so you can use it with a bunch of different download types.
Click to expand...
Click to collapse
Seems exactly what i need but how do i use it
Sent from my Galaxy Nexus using Tapatalk

CoDe LaZaRuS said:
Seems exactly what i need but how do i use it
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
So yeah I'd definitely say just go with using aria instead axel. Axel has less options,abilities,functionality and I may have broken the binary when I stripped it(removed debugging symbols to make it smaller). Basically to install it, you want to download the aria2c.zip file. Then unzip it to /system/bin in Android Terminal Emulator with:
Code:
busybox mount -o rw,remount /system
busybox unzip /sdcard/Download/aria2c.zip -d /system/bin
busybox chmod 0555 /system/bin/aria2c
busybox mount -o ro,remount /system
You could also use your favorite root file manager. I find the terminal faster these days though.. Now that aria's installed you can download a file like http://download.zip(just an example url, pro'lly doesn't work) splitting the connection 5 ways for more speed with:
Code:
aria2c -s 5 -d /sdcard/Download http://download.zip
The "-d /sdcard/Download" part will place the downloaded file in /sdcard/Download where things usually download. When you execute aria2c, a nice little terminal text interface will display showing progress and download speed. It'll give an end average download speed too, so you can compare different settings.
**If you run into problems with https links, try changing 'em to http.
Honestly, I'm surprised no one has made an aria app or a download manager utilizing the aria2c binary. You could make some beaucoup bucks if you made an app that uses aria2c, especially with the torrent abilities. I've just started getting into app development so I'll keep this in mind. A download accelerator/manager would make an excellent first project. Anyway, hope that's a little more informative about using the aria2c binary in the terminal.

7175 said:
So yeah I'd definitely say just go with using aria instead axel. Axel has less options,abilities,functionality and I may have broken the binary when I stripped it(removed debugging symbols to make it smaller). Basically to install it, you want to download the aria2c.zip file. Then unzip it to /system/bin in Android Terminal Emulator with:
Code:
busybox mount -o rw,remount /system
busybox unzip /sdcard/Download/aria2c.zip -d /system/bin
busybox chmod 0555 /system/bin/aria2c
busybox mount -o ro,remount /system
You could also use your favorite root file manager. I find the terminal faster these days though.. Now that aria's installed you can download a file like http://download.zip(just an example url, pro'lly doesn't work) splitting the connection 5 ways for more speed with:
Code:
aria2c -s 5 -d /sdcard/Download http://download.zip
The "-d /sdcard/Download" part will place the downloaded file in /sdcard/Download where things usually download. When you execute aria2c, a nice little terminal text interface will display showing progress and download speed. It'll give an end average download speed too, so you can compare different settings.
**If you run into problems with https links, try changing 'em to http.
Honestly, I'm surprised no one has made an aria app or a download manager utilizing the aria2c binary. You could make some beaucoup bucks if you made an app that uses aria2c, especially with the torrent abilities. I've just started getting into app development so I'll keep this in mind. A download accelerator/manager would make an excellent first project. Anyway, hope that's a little more informative about using the aria2c binary in the terminal.
Click to expand...
Click to collapse
Thanx alot
I want to check out aria in a bit more detail so could you provide me with the link to the thread
Sent from my Galaxy Nexus using Tapatalk

7175 said:
So yeah I'd definitely say just go with using aria instead axel. Axel has less options,abilities,functionality and I may have broken the binary when I stripped it(removed debugging symbols to make it smaller). Basically to install it, you want to download the aria2c.zip file. Then unzip it to /system/bin in Android Terminal Emulator with:
Code:
busybox mount -o rw,remount /system
busybox unzip /sdcard/Download/aria2c.zip -d /system/bin
busybox chmod 0555 /system/bin/aria2c
busybox mount -o ro,remount /system
You could also use your favorite root file manager. I find the terminal faster these days though.. Now that aria's installed you can download a file like http://download.zip(just an example url, pro'lly doesn't work) splitting the connection 5 ways for more speed with:
Code:
aria2c -s 5 -d /sdcard/Download http://download.zip
The "-d /sdcard/Download" part will place the downloaded file in /sdcard/Download where things usually download. When you execute aria2c, a nice little terminal text interface will display showing progress and download speed. It'll give an end average download speed too, so you can compare different settings.
**If you run into problems with https links, try changing 'em to http.
Honestly, I'm surprised no one has made an aria app or a download manager utilizing the aria2c binary. You could make some beaucoup bucks if you made an app that uses aria2c, especially with the torrent abilities. I've just started getting into app development so I'll keep this in mind. A download accelerator/manager would make an excellent first project. Anyway, hope that's a little more informative about using the aria2c binary in the terminal.
Click to expand...
Click to collapse
It's not working for me. Terminal Emulator keeps saying it can't find file or directory aria2c ?
Sent from my sushi grade tuna

CoDe LaZaRuS said:
Thanx alot
I want to check out aria in a bit more detail so could you provide me with the link to the thread
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
Yeah, definitely. I checked out these links:
http://aria2.sourceforge.net/
http://wiki.drupalschool.net/index.php/Aria2_How_To
Tezlastorme said:
It's not working for me. Terminal Emulator keeps saying it can't find file or directory aria2c ?
Sent from my sushi grade tuna
Click to expand...
Click to collapse
Hmm, can you post what you from:
Code:
which aria2c
Code:
echo $PATH
Code:
find /system -name aria2c

7175 said:
Yeah, definitely. I checked out these links:
http://aria2.sourceforge.net/
http://wiki.drupalschool.net/index.php/Aria2_How_To
Hmm, can you post what you from:
Code:
which aria2c
Code:
echo $PATH
Code:
find /system -name aria2c
Click to expand...
Click to collapse
Sent from my sushi grade tuna

7175 said:
Yeah, definitely. I checked out these links:
http://aria2.sourceforge.net/
http://wiki.drupalschool.net/index.php/Aria2_How_To
Hmm, can you post what you from:
Code:
which aria2c
Code:
echo $PATH
Code:
find /system -name aria2c
Click to expand...
Click to collapse
Thanks I appreciate the help
Sent from my Galaxy Nexus using Tapatalk

Sure, no problem man.
Tezlastorme said:
Sent from my sushi grade tuna
Click to expand...
Click to collapse
Thanks. Everything looks good. Not sure why you're getting that error, could you post the exact command you used so I can try it?

7175 said:
Sure, no problem man.
Thanks. Everything looks good. Not sure why you're getting that error, could you post the exact command you used so I can try it?
Click to expand...
Click to collapse
Sent from my sushi grade tuna

Tezlastorme said:
Sent from my sushi grade tuna
Click to expand...
Click to collapse
Alright, I'm pretty sure I figured it out. It turns out the binary was compiled dynamically instead of statically, even though I specified static like 4 times when compiling and the -static flag was fed to gcc and g++. So it's looking for the linker upon execution, specifically /lib/ld-linux-armhf.so.3. I've gathered together the linker and any other libs it may look for and made a package of them. I'm gonna see if I can manipulate how the source is compiled some more and see if I can force out a purely static binary since configuring the libs is a huge hassle to run it. That's weird it's been working on my phone though.
EDIT: I eventually did get a static aria2c built, but it was calling some shared libraries on execution which breaks it. The axel I posted seems to work pretty well though with links. I'm not sure what the issue I had before was, something with /etc/resolv.conf or other, but it's been working for me now, using split connections and such.
Also the reason the dynamic aria2c was working on my phone was because I've modified my whole system to include various standard linux libraries and directories, ie. /usr, /bin, /lib, etc. I might eventually make an installer that includes the bare minimal linked libraries for dynamic aria2c once I get this python project I'm working on to where I want it.
EDIT2: Found a dynamically linked aria2 build for android. Check it out. Attached.
Also here's the readme file for Android aria2:
Code:
aria2 for Android devices
=========================
aria2 is a lightweight multi-protocol & multi-source download utility
operated in command-line. It supports HTTP/HTTPS, FTP, BitTorrent and
Metalink.
Install
-------
aria2 is not an ordinary Android Java application. It is a C++ native
application and operates in command-line. You don't have to 'root'
your device to use aria2. Because aria2 is a command-line program,
you need a terminal emulator. First install Android Terminal Emulator
from Android Market (or build it from source and install. See
https://github.com/jackpal/Android-Terminal-Emulator/).
1. Copy aria2c executable to ``/mnt/sdcard`` on your device.
2. Run Android Terminal Emulator.
3. ``mkdir /data/data/jackpal.androidterm/aria2``
4. ``cat /mnt/sdcard/aria2c > /data/data/jackpal.androidterm/aria2/aria2c``
5. ``chmod 744 /data/data/jackpal.androidterm/aria2/aria2c``
6. Add the following commands to the initial command of Android
Terminal Emulator::
export HOME=/data/data/jackpal.androidterm/aria2; cd $HOME
----------
See `the online manual
<http://aria2.sourceforge.net/manual/en/html/>`_.
Notes
-----
aria2c executable was generated using android-ndk-r10b.
The following libraries were statically linked.
* openssl 1.0.1i
* expat 2.1.0
* c-ares 1.10.0
Since Android does not have ``/etc/resolv.conf``, c-ares (asynchronous
DNS resolver) is disabled by default. But name resolution is sometimes
a little bit slow, so I recommend to enable c-ares. You can enable it
using ``--async-dns`` and specify DNS servers using
``--async-dns-server`` option, like this::
--async-dns --async-dns-server=`getprop net.dns1`,`getprop net.dns2`
Because it is tedious to type these long parameters every time you use
aria2c, the following wrapper shell script would be handy::
#!/system/bin/sh
/data/data/jackpal.androidterm/aria2c \
--async-dns \
--async-dns-server=`getprop net.dns1`,`getprop net.dns2` \
"[email protected]"
Please note that you need to add executable file mode bit to this
wrapper script too. (e.g., ``chmod 744 /PATH/TO/SCRIPT``)
Known Issues
------------
* Since Android does not have ``/dev/stdout``, ``-l-`` does not work.
* Android Terminal Emulator sometimes stops updating console. It looks
like aria2c hangs, but aria2c continues to run.
To use this binary with lollipop, replace /system/bin/linker with the no-pie version that zzpianoman cooked up: http://forum.xda-developers.com/showpost.php?p=57554982&postcount=321

7175 said:
Alright, I'm pretty sure I figured it out. It turns out the binary was compiled dynamically instead of statically, even though I specified static like 4 times when compiling and the -static flag was fed to gcc and g++. So it's looking for the linker upon execution, specifically /lib/ld-linux-armhf.so.3. I've gathered together the linker and any other libs it may look for and made a package of them. I'm gonna see if I can manipulate how the source is compiled some more and see if I can force out a purely static binary since configuring the libs is a huge hassle to run it. That's weird it's been working on my phone though.
EDIT: I eventually did get a static aria2c built, but it was calling some shared libraries on execution which breaks it. The axel I posted seems to work pretty well though with links. I'm not sure what the issue I had before was, something with /etc/resolv.conf or other, but it's been working for me now, using split connections and such.
Also the reason the dynamic aria2c was working on my phone was because I've modified my whole system to include various standard linux libraries and directories, ie. /usr, /bin, /lib, etc. I might eventually make an installer that includes the bare minimal linked libraries for dynamic aria2c once I get this python project I'm working on to where I want it.
EDIT2: Found a dynamically linked aria2 build for android. Check it out. Attached.
Click to expand...
Click to collapse
I had to add 'su' to the top of initial command, otherwise I got a permission denied error, but now it works fine, thanks
Well, I haven't tested the functionality, but it does run at least.

https://play.google.com/store/apps/details?id=it.opbyte.superdownload
I bought this app to support the dev. Hope the guy comes back... Anyway, it looked like the dev stopped like a year ago. The app I linked uses data/WiFi at the same time.. There are quite a bit if apps on play that use the whole multi threading deal. The one I found to be the best for ME(and I emphasize ME because, well, you know) was ADM. That was the best I found... plenty of configurable options and because some sites only pull from one place and don't work otherwise{while downloading}. BTW, I haven't been keeping up to date for a few months. .... PONYdroid(downloading app) is on my wish list as soon as I get the cash flow back. Hope this helps a bit. [emoji41][emoji41]

Related

Android telnetd binary download

Anyone have or know where I can download the telnetd binary for Android? I think I might have a way to get root privileges on the Samsung Moment...and if it works, I see no reason why it wouldn't work on the Hero.
Just need that darn telnetd binary and any of the support files so I can install it into my phone (as long as the root exploit works.) It's running Android 1.5 btw if that makes a difference.
Why not ssh?
Download dropbear
telnet is an open invitation to get hacked, since the connection is not encrypted.
I know telnet is not encrypted...that's why I'll turn off the radio and enable wifi when I do this.
I was on the IRC (#android-root on freenode) and was pointed in the direction of JesusFreke's build environment, in which (s)he has built a veritable ****-ton of ARM binaries that are *extremely* useful.
http://jf.andblogs.net/2009/05/24/jfv151-images-are-out/
I found JFV1.51 CRB43 US BuildEnvironment (1324) to be particularly useful. Once extracted, I found binaries for a very full busybox, and a few dozen other useful goodies, including telnetd.
From the extracted tar, the binaries are under 'Build/System/ModifiedFiles/xbin'. adb push them to /data/local on the device, then call them via adb shell.
Example:
With device connected, and with the Android SDK installed and in your PATH:
Code:
# tar xvf JFv1.51_CRB43-US_BuildEnvironment.tar.gz
# cd Build/System/ModifiedFiles/xbin
# adb push <program of your choice> /data/local
# adb shell
# /data/local/<program of your choice>
Just out of curiosity...what is your hunch for getting root on the Moment?
@gargarxp - Thanks for the info!
gargarxp said:
Just out of curiosity...what is your hunch for getting root on the Moment?
Click to expand...
Click to collapse
I was looking through all of the recent kernel privilege level escalation reports, and ran across this one:
http://seclists.org/fulldisclosure/2009/Nov/105
It works on kernels up to 2.6.31...which the Moment runs 2.6.27. My plan is to use an Android app to execute this exploit contained in a native executable (which I have confirmed I can execute native code), which will then trigger a shell script I will write to copy the telnetd files into the proper places and start the service as root. From there, I'll telnet in...see if the root user has a password...and go from there.
Actually, if you get this to execute as root, the procedure from there is fairly simple.
From my understanding, the other root exploits have a singular goal: to gain a root shell for the purpose of creating a suid su for the system to use to gain root in the future. From the CDMA Hero process, once a root shell is gained:
Code:
# mount -o remount,rw -t rfs [COLOR="Red"]/dev/stl5[/COLOR] /system
# cd /system/bin
# cat sh > su
# chmod 4775 su
They:
Remount the /system fs as read-write
Go to the /system/bin directory
Copy sh to (a new) su
Set the permissions on that to 4 (SetUID) 775 (User-Group: RWX, Other: RX)
* The bit in red is what I observed the device mounted to /system to be on my Moment. I obtained this information by running adb shell mount and seeing what /dev device was next to /system. Should be the same for every Moment, but the procedure is useful for any Android (or Linux for that matter) device.
Once this is done, any user executing this su will do so as the user/group that the owns executable, which in this case is root:shell.
So, via this method, if you can manage to get a root shell on *any* Android device, bada bing bada boom: rooted.
...At least that is my understanding of it all.
Well...the problem is I can't get my Moment connected to my computer to run adb. I'm on Windows 7 64-bit...and the drivers won't load...and Samsung's PC Studio won't install properly. So, I found source code online for executing native code via an Android app...which should work to execute the native exploit.
And you'll have to excuse me...I've been using Linux for the past 10 years...programmed some projects on the platform...but this is pretty much my first time developing on Android.
Oh no problem at all. Frankly, I'm being overtly descriptive so as to make this post useful to the community in general and not be Moment-specific. I don't wish to encouter the ire of the XDA mods Just trying to do a public service.
So, do you have an ARM binary of the exploit built already (ImpelDown.c)? And if so, could you post a link to download it? I've never cross-compiled before and am currently going 10 rounds with gcc and the android-2.6.27 source tree.
Thank you! I know...it's kinda risky for me posting stuff about the Moment in an XDA forum...but I figure this could help the Hero efforts as well...and XDA was so good to me back when I was using my DIAM500...I wanted to contribute something back.
I'm still trying to get my cross-compiler built. I initially started out with Cygwin and a tool for building a cross-compiler...but that went horribly wrong...tons of compiler errors. I attempted to use Scratchbox on OpenSuse 11.2...but Scratchbox wants to run on a Debian system...ugh...haha.
And as I was typing my response to you...I decided to Google for "arm compiler windows" and found http://www.gnuarm.com/
But rest assured...once there's a working binary...I'll upload it here.
From the Gnash project's dev wiki....
http://wiki.gnashdev.org/Building_for_Android
They raise some issues with using a standard cross-compiler (GNUARM uses Newlib, which isn't the Android libc implementation Bionic...which is apparently a problem)
I grabbed the toolchain they link to on the page and am trying that.
Yeah...I found that out as well after I installed gnuarm...
I also just loaded the native toolkit.
Well gargarxp...I compiled it...ran it...didn't work. I'm going to try another one tomorrow.

[SCRIPT]Debian Image Builder (01-22-2012)

Debian Image Builder...
So basically, I've been reading several different articles, etc. on running Debian and/or Ubuntu on Android. I did this on my Eris and D1 in the past, and I figured that it would work even better on the Galaxy Nexus. Of course it does... Anyway, it can be run from a loop mounted image or a separate partition on most phones. However, for phones like this one with no sdcard slot, it makes sense to just do the image thing.
After building and rebuilding an image a few times, I decided to do what I normally do and turn those crazy linux commands into a script. It's not really all that complex or fancy, but it works and can be improved. I hope you find it helpful.
NOTE: This is really just the first step in getting Debian running on your phone. This will just create the image. You still have some work to do. There are other ways to do this, but I like having control of the initial image...
1/14/2012 - fixed some typos and added 'apt' as a default package (debootstrap did this by default, but apparently multistrap doesn't)
1/16/2012 - removed multistrap and went back to debootstrap for now
1/21/2012 - added a setup script to do the second stage and updates after booting into Debian on the phone, fixed extra package install code
1/22/2012 - updated variable code per swordrune10's suggestion
Download: https://github.com/gnarlyc/DebianImageBuilder
Currently requires Debian 6, but feel free to fix that for me.
Rock on.
Thanks. I had fun with Debian on my Eris back when that was being worked on. I am sure this will be much faster on this beast.
synesthete said:
Thanks. I had fun with Debian on my Eris back when that was being worked on. I am sure this will be much faster on this beast.
Click to expand...
Click to collapse
It does, and it's pretty sweet with a bluetooth keyboard & mouse and a monitor via a MHL video cable. I've even compiled a kernel or two on it.
Where do we put the image? Do we have to create a new partition?
Sent from my Galaxy Nexus using XDA App
ttereve said:
Where do we put the image? Do we have to create a new partition?
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
No, you don't have to create a partition. Here's what I do:
I use Connectbot for a terminal emulator, but there are others out there.
One time:
1) 'mkdir /data/local/debian' (don't type the single quotes)
2) copy the image to /sdcard/
Each time I start up (actually, I've made a script for this too):
1) 'su'
2) 'mount -o loop -t ext2 /sdcard/linux.img /data/local/debian'
3) 'chroot /data/local/debian /bin/bash'
4) ta-da!
You should be at a Debian bash prompt. Check /etc/apt/sources.list to make sure it's there and has 'deb http://ftp.us.debian.org/debian squeeze main'. You might also have to do 'dkpg --configure -a'. If it looks like that's needed each time, I'll automate it. If you install a desktop gui like xfce or whatever, you'll probably want to install tightvncserver in Debian and get an Android VNC client from the Market. I'll probably add more options to make these things a little easier in the future.
I'm still going through the entire process over and over until I get things how I want it, so the script will be updated as I get the time.
I'm guessing we can use ext3 (or even ext4) instead of ext2?
ttereve said:
I'm guessing we can use ext3 (or even ext4) instead of ext2?
Click to expand...
Click to collapse
I dunno. It won't hurt to try!
Is there any chance that this will work on GSM GN?
Sent from my Galaxy Nexus using xda premium
JTECJ said:
Is there any chance that this will work on GSM GN?
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Yes. This just builds the rootfs in an image. It should work for nearly any arm based Android device. I'm still working out some kinks with getting vnc and SSH servers working though. These worked fine when I used debootstrap to create the rootfs, but multi strap is much more flexible. So, I'm going to keep trying multi strap for a bit.
alright I can get into [email protected] bash but i can't start ssh because well, there is no ssh in/etc/init.d/ how do I get it in there? (i built my own ubuntu rootfs with rootstock)?
ttereve said:
alright I can get into [email protected] bash but i can't start ssh because well, there is no ssh in/etc/init.d/ how do I get it in there? (i built my own ubuntu rootfs with rootstock)?
Click to expand...
Click to collapse
Did you install openssh-server?
EDIT: Yeah, some things aren't working quite right with installing and updating packages. I might have to re-work it with debootstrap again... Oh well.
Ok. Give me a day or two. I've re-written the script using debootstrap instead. I'll update the repo as soon as I do my initial test, which should be later tonight.
sweet I got it all to work! I'll try and get a script up for the way I did it.
btw I used a rootstock ubuntu rootfs
now I need to figure out how to setup gnome through command line!
ttereve said:
sweet I got it all to work! I'll try and get a script up for the way I did it.
btw I used a rootstock ubuntu rootfs
now I need to figure out how to setup gnome through command line!
Click to expand...
Click to collapse
Cool! I read something about rootstock, but never really looked too deep. Yeah, post your code. That would be great. I have used debootstrap before, so I know it works. The thing that I never liked is that you have to run '/debootstrap/debootstrap --second-stage' after you boot into Debian on the phone. With multistrap, the packages are supposed to all be there and ready to go. (At least, that's how I understand it.) Anyway, I'm working out debootstrap again, and will just do a one-shot startup script or something. Or maybe, I'll switch gears and do it your way instead...
from: http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/
build rootfs
Code:
sudo rootstock \
--fqdn ubuntu \
--login ubuntu \
--password ubuntu \
--imagesize 4G \
--seed linux-image-omap,build-essential,ssh,tightvnc
then make an image:
Code:
dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=4096
format as ext4
Code:
mkfs.ext4 -F ubuntu.img
mount empty image
Code:
sudo mount -o loop ubuntu.img /mnt
extract rootfs inot image
Code:
sudo tar -C /mnt -zxf armel-rootfs-datetag.tgz
and unmount
Code:
sudo umount /mnt
this is my script to get chroot working (but this script fails and idk why so any help would be appreciated) (modified from the script http://burningbroccoli.se/post/949205350/chrootd-ubuntu-on-samsung-galaxy-s-android):
Code:
#!/bin/sh
echo "mount the image"
mount -o loop -t ext4 /sdcard/ubuntu.img /data/local/ubuntu
echo 'Mounting proc,sys and dev'
busybox mount -t proc proc /data/local/ubuntu/proc
busybox mount --bind /sys /data/local/ubuntu/sys
busybox mount --bind /dev /data/local/ubuntu/dev
echo 'Exporting a proper path'
export PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH
echo 'Chrooting and starting ssh server'
chroot /data/local/ubuntu /bin/bash
echo "And your ip is:"
busybox ifconfig | busybox grep "inet addr"
I looked at rootstock. It doesn't appear to be Debian friendly, but maybe I'm just missing something. As soon as I'm happy with this on Debian, I'll look into making it work on Ubuntu also. I also realized that debootstrap has an option to install extra packages, so that's cool.
Right now, this is working well for me, but there are things that I would like to add.
ran into a problem, apparently it doesnt know let so it pretty much didnt work..
Code:
./debianImageBuilder.sh: 20: let: not found
running oneiric and the UI is gnome3
---------- Post added at 04:53 PM ---------- Previous post was at 04:37 PM ----------
nvm, i got it to work by modifying it to this.. u can do whatever to the code, im just happy to help... tho im not sure why let doesnt work for me x.x
Code:
export image_name=debian.img
export build_folder=image_folder
real_image_size=$(6442450944)
echo "******************************"
echo "Installing dependencies"
echo "******************************"
apt-get install debootstrap
echo "******************************"
echo "Gather info"
echo "******************************"
echo -n "What size image would you like to create? (in GBs): "
read image_size
real_image_size=$(((($image_size * 1024) * 1024) * 1024))
swordrune10 said:
ran into a problem, apparently it doesnt know let so it pretty much didnt work..
Code:
./debianImageBuilder.sh: 20: let: not found
running oneiric and the UI is gnome3
---------- Post added at 04:53 PM ---------- Previous post was at 04:37 PM ----------
nvm, i got it to work by modifying it to this.. u can do whatever to the code, im just happy to help... tho im not sure why let doesnt work for me x.x
Code:
export image_name=debian.img
export build_folder=image_folder
real_image_size=$(6442450944)
echo "******************************"
echo "Installing dependencies"
echo "******************************"
apt-get install debootstrap
echo "******************************"
echo "Gather info"
echo "******************************"
echo -n "What size image would you like to create? (in GBs): "
read image_size
real_image_size=$(((($image_size * 1024) * 1024) * 1024))
Click to expand...
Click to collapse
Cool. That does look a bit cleaner. The code for installing extra packages wasn't right/all there, so I'm working on that now.
Thanks for this script. It worked perfectly for me. It's great to be able to apt-get things on my phone, and it's interesting to run debian's utilities on Android. A lot of other methods are about getting some sort of Linux desktop on Android, but I really appreciate the barebones CLI that this provides. To my knowledge this is the only way to be able to run ping6 on Android.
To anyone thinking of setting this up - make sure to install busybox!
I made a couple of helper scripts to get cleanly in and out of the chroot, and to make the sdcard directory available within debian. I'm keeping this stuff stored in /sdcard/debian:
Code:
[email protected]:/sdcard/debian # ls
debian.img
debroot
start.sh
stop.sh
start.sh
Code:
mount -o loop -t ext2 debian.img debroot
busybox mount --bind /sdcard debroot/mnt
chroot debroot /bin/bash
stop.sh
Code:
umount /mnt/sdcard/debian/debroot/mnt
umount /mnt/sdcard/debian/debroot/dev/pts
umount /mnt/sdcard/debian/debroot/proc
umount /mnt/sdcard/debian/debroot/sys
umount /mnt/sdcard/debian/debroot

[MOD] HULU Flash Hack - Flashex 2.05(5/2/12) Auto Hex-edit libflashplayer.so

FLASHEX 2.05 (unified release 4)(Release Date: 5/2/2012)
Description
Flashex is designed to allow people using an Android device to watch hulu and some other restricted sites with Adobe Flash Player and a properly configured web browser as if it was a Windows PC. Dolphin HD Stock Browser(choose "request desktop site" in menu each time) is a good choice but any browser that allows you to act as Desktop via settings should work.
Note: Dolphin HD has some issues with full screen video at the moment so I have switched over to useing the stock browser and selecting "request desktop site" from the upper right-hand menu for now this works and has good full screen performance on FlexReaper and Stock ICS 4.0.3.
How it works
The script will look for libflashplayer.so then attempt to create a copy, edit the copy, and copy the edited version back. It stores the edited copy, and writes it over the default file each time it's run. It will check the version of the current libflashplayer.so file each time before it copies the edited version over. If libflashplayer.so's version has been upgraded or downgraded it will make a new copy, edit, write it back and store the new one to use each time. I suggest using Script Manager to run the script at boot once you run it the first time manually to make the first edited copy.
What's New in Version 2.05?
-Added a few more checks for libflashplayer.so to help improve troubleshooting and configuring on different ROMs and to eliminate the possibility of a hang if libflashplayer.so is not readable.
(Still waiting on feed back and/or -x mode debug output reports. feel free post them or better yet PM them to me)
What's New in Version 2.04?
-Added support for Custom BusyBox from CynogenMod (BusyBox 1.19.4-cm9) when testing the Busybox version
What's New in Version 2.03?
-Added checks to verify Busybox location, permisssions, and version to verify compatability and inform the user if they need to update/reinstall busybox or make a configuration change.
-Various minor refinements.
-Can now safely be test run on ANY device since it will verify the location of all required elements prior to performing any task.
NOTE: This doesnt mean it will enable hulu on an old 500mhz 2.2 device, just that it should be safe to use to modify Adobe Flash on any device capable of properly running it.(If your Adobe Flash is installed in a diffrent location you will need to configure the script to point it's install directory, or put a copy of your libflashplayer.so file into the Flashex2 directory and name it AND_libflashplayer.so and copy the resulting WIN_libflashplayer.so back by hand if you prefer.)
What was new in Version 2.02?
-Fixed various typoes in output messages
-Added a fix for people having issues with strings, grep etc returning as not found when /system/xbin is either not in the users default $PATH or is too low in the list to get used.
What was new in Version 2.01?
-Many minor bug fixes
-Scripts have been unified into a single script.
-Made some changes to how version checking is done
-Script is safer, more reliable, and easier to use over all.(at least IMO hehe)
-Automatic re-edit of edited source file, when either an upgrade or downgrade is detected. This allows the script to be run at boot via Script Manager, or other while still leaving, Adobe Flash to auto update.
-Script is now a single executable file that will both hex edit Adobe Flash(each update), and copy the edited file over to /data when needed.
-Improved version detection
-Improved output messages
Some notes on running during bootup
Once you have decompressed the Flashex2 folder and flashex.sh script to /mnt/sdcard/Flashex2 you will be able to run it automatically at boot via Script Manager if you wish. I currently have been using it this way. I have tested it performing the hexedit during a boot up. It works fine.
Known Limitation
Note: This only applies to auto-running the script via Script Manager, Cron, what ever It takes about 2 minutes with a Tegra 2 to complete the hexedit of the file.
Because of this when booting after an update to libflashplayer.so it will be editing the file for a min or two after your home screen shows. You will want to wait 3 min or so to be safe before you try to use Adobe Flash. This will ONLY happen when the version changes. Since Adobe Flash isn't changed that often it's not a big deal.
The rest of the time, it will be the same version so it will just take a few seconds to copy the file over. This allows you to just watch when you like even right after a system boot.
Install Instructions
Quick Directions:
Download file, unzip/extract the Flashex2 folder and it's contents, copy it to the sdcard to end up with /mnt/sdcard/Flashex2/flashex.sh. Run flashex.sh as root. Set web browser to Desktop. Enjoy watching hulu.
Full Directions:
When using Flashex205.zip via a File Manager like Astro for example.
1) Either download Flashex204b.zip directly to your tablet, or copy it to a micro SD card via PC.(note: you could unzip the contents in Windows if you prefer)
2) Save, Copy or Move Flashex205.zip to /mnt/sdcard/ It has a folder inside already of the correct name.
3) Open Flashex205.zip, then copy/paste the whole folder to /mnt/sdcard/
Note: After you do this you should have a folder named Flashex2 on your internal sdcard example: /mnt/sdcard/Flashex2
4) Inside the Flashex2 folder from the zipfile is flashex.sh
5) run flashex.sh either via terminal emulator or with an app like Script Manager.
The script "can" be run without root, BUT it will only make the hexedited file. It MUST be run as root if you also want the script to install the edited file so you can watch hulu. You can also copy the file by hand.
When using flashex205.tar.gz via a terminal emulator do the following.
1) Either download the file directly to your tablet, or copy it to a micro SD card.
2) Copy or Move the file to /mnt/sdcard/
example(copy): cp /mnt/external_sd/flashex205.tar.gz /mnt/sdcard/
example(move): mv /mnt/external_sd/flashex205.tar.gz /mnt/sdcard/
3) unzip and untar the Flashex folder and flashex.sh script from flashex205.tar.gz
gzip -d /mnt/sdcard/flashex205.tar.gz
tar -xvf /mnt/sdcard/flashex205.tar
Note: If you get an error saying not found. Your trying to install it in a diffrent location then it's currently configured you can probably figure out how to make it work easy enough. Just remember to set the path to the script inside the script it's self so it knows where make/read the edited file.
4) Now change working directories and run the script.
cd /mnt/sdcard/Flashex2
5) Run the script(su is optional, but running as root it wont copy the edited file over)
su
sh flashex.sh
Note: I suggest using sh before the script name though it's not nessesary if the path to sh at the top of the script matches yours.
Confirmed Compatable Device List(Make sure you are rooted if you want to use the script to install the modified file)
Acer Iconia A100, A200, A500 HC or ICS, FlexReaper ------ Use Latest Version
Samsung Galaxy S 4G rooted modified Gingerbread 2.3 --- Use Latest Version
Samsung Galaxy Nexus LTE ----------------------------------- Use Latest Version
Asus Eepad Transformer Prime ------------------------------- Use Version 2.2 or Latest Version
Motorola Droid Razr ------------------------------------------- Use Latest Version
HTC EVO 3D --------------------------------------------------- Use Latest Version
HTC EVO 4G running mikg v11 ------------------------------- Use Latest Version
Note: Any Device that is compatable with Adobe Flash and capable of playing hulu videos(500 Mhz or better ARM7 CPU 256 MB ram, Android 2.2 or better) that has been rooted and has busybox installed should be compatable
If you are attempting to use a Busybox older then v1.18.1 You will have to change a value at the top of the script before attempting to run it since I'm not sure how old of versions are 100% compatible.
===============================================
ATTN: SUPPORT, QUESTIONS, COMMENTS
If you need help getting it to work for your device and cant post in this section you can follow this
->SUPPORT LINK HERE
You can PM me or you can also try me on Twitter
Legal Info
Flashex205.sh was made by NoSudo for personal use
anyone may use it or change it but I retain creative
licence for my work. You should only take credit for your
changes.
I take no reponsablility for anyone elses actions. If you break
something or violate any rules it's on you.
If you wish to try and make money on it or use it for any comercial
venture I expect to be contacted and informed so I may negociate
an acceptable for profit licence with compensation.
This software is FREE and yours to enjoy, give away, edit, use for Non-Profit purposes ONLY.
A NOTE ON VERSIONS!
I recommend the use of the latest version Flashex204.sh. If you have old versions installed. MAKE SURE YOU RUN THE RIGHT ONE. It's up you to reconfigure Script Manager etc. so don't forget or it will keep running the old one.
ALSO Please remember to hit that Thanks button if you find my script useful.
I have been doing a little version testing.
I can confirm that flashex v2.01 does edit other versions so far I have tested it with. I just tested with 11.1.115.7 and it works fine via xxd. Im going to test on Android with Busybox's hexdump next.
I can also confirm that it works on 11.1.111.8 since my tablet just auto-updated. I simply ran the script and updated my hexed version from 11.1.111.7 to 11.1.111.8 as designed.
Just tried the new version and still a no go. See the pic for the full error.
Ran with terminal emulator, gscript, and root explorer. Same error for all.
And you have the .so file from the old version thread.
.so path: /data/data/com.adobe.flashplayer/lib/libflashplayer.so
ICS Leak .012.
busybox 1.19.3
Joecascio2000 said:
Just tried the new version and still a no go. See the pic for the full error.
Ran with terminal emulator, gscript, and root explorer. Same error for all.
And you have the .so file from the old version thread.
.so path: /data/data/com.adobe.flashplayer/lib/libflashplayer.so
ICS Leak .012.
busybox 1.19.3
Click to expand...
Click to collapse
Weard here is the output I got running a test edit. I used the same 2.01 script just modified so it doesn't write to my adobe flash. Kind of sandbox I guess. As you can see it reads and edits it fine. I'll look some more.
Command: '/mnt/sdcard/FLASHEX2_vtest/flashex_vtest.sh'
-------------
Out: $ exec sh '/mnt/sdcard/FLASHEX2_vtest/flashex_vtest.sh'
=================================================
Source Files Doesn't Exist
Destination File: /mnt/sdcard/FLASHEX2_vtest/DST/libflashplayer.so
Destination Ver: Adobe Flash says AND(Androiud) v1111157
Detected READ access for /mnt/sdcard/FLASHEX2_vtest/DST/libflashplayer.so
Created /mnt/sdcard/FLASHEX2_vtest/cache Sucessfully... Checking...
/mnt/sdcard/FLASHEX2_vtest/DST/libflashplayer.so preparing to copy and edit file........
Copy: /mnt/sdcard/FLASHEX2_vtest/cache/libflashplayer_PREMOD looks good =================================================
Preparing to create a hexdump.........
Dont panic...This could take over a minute on a Tegra 2..
Its Converting an 8MB or so Binary on a little tablet...Just wait its fine Created a hexdump of /mnt/sdcard/FLASHEX2_vtest/cache/libflashplayer_PREMOD
=================================================
Preparing to edit /mnt/sdcard/FLASHEX2_vtest/cache/libflashplayer_HEXDUMP..
This might take a minute too.... /mnt/sdcard/FLASHEX2_vtest/cache/libflashplayer_HEXDUMP has been edited... =================================================
Converting /mnt/sdcard/FLASHEX2_vtest/cache/libflashplayer_EDITED to binary...
Binary File: /mnt/sdcard/FLASHEX2_vtest/WIN_libflashplayer.so created...
Checking Binary file /mnt/sdcard/FLASHEX2_vtest/WIN_libflashplayer.so... =================================================
HEXEDIT SUCCESSFUL File: /mnt/sdcard/FLASHEX2_vtest/WIN_libflashplayer.so now reads as Version: WIN 11,1,115,7
Sent from my A100 using XDA
I'm at a bit of a loss as to why it's not working for you Joecascio2000. I'm still looking into it.
I can confirm if I copy your libflashplayer.so v 11.1.115.7 to my device and run the script on it. I AM able to edit the file and get a good binary at the end. I was able to run it via Terminal IDE, Terminal Emulator, and Script Manager.
Going by the error your getting I would say the issue could be related to Busybox. I know you say you have 1.19.3(same as mine)
what happens if you try this from a Terminal
strings /data/data/com.adobe.flashplayer/lib/libflashplayer.so | grep "AND 1[0-2],[0-9]*"
You should get back a list of strings out of the binary, and one of them should say something like "AND 11,1,115,7"
If that doesnt return the correct line, what does this return
strings /data/data/com.adobe.flashplayer/lib/libflashplayer.so | grep "AND 1"
This should return "AND 11,1,115,7" if it doesn't then I would take a closer look at your strings, and grep binaries which would indicate a possible issue with your copy of Busybox or maybe your $PATH as it could effect what version gets used when running a shell command.
I still feel very confused by it working on my device and not on yours with the same file. However I also feel confident that since it works on my A100 we can get it working on yours too without much hassle. We just need to figure out what the deal is.
NoSudo said:
Sent from my A100 using XDA
Click to expand...
Click to collapse
Yeah so weird. I just tried it again after uninstalling flash and re-installing it. Same error. Maybe I'm executing it wrong. This is what I put:
su
sh /mnt/sdcard/Flashex2/flashex201.sh
It does seem to work, just give me an error with the .so file.
EDIT: and both string lines return "no such file or director". I just copy and pasted them in, maybe I did something wrong?...maybe its busybox...?
I just copy and pasted them in, maybe I did something wrong?
Click to expand...
Click to collapse
copy and past of the strings command above should work yes. You can even just run the following
strings /data/data/com.adobe.flashplayer/lib/libflashplayer.so
If that give you bad command or something then you have an issue with either Busybox or your $PATH
$PATH is a special variable that unix/linux/android uses to store the locations of programs like grep, strings, etc. It specifies various directories commands are stored in. If the directory strings is stored in IS NOT in your path the script will not be able to access the command, so I can't say at this point which issue it in fact is, but I'm 99% sure it's one of those two things at this point.
That error is kinda old and can be erroneous. I'll look at that area a little closer later and see.
If you rerun the script after a successful edit it will tell you if it was successful BTW. If /data/data/com.adobe.flashplayer/lib/libflashplayer.so is already edited and is the same version as the WIN_libflashplayer.so Source file it will just print out a message that displays the actual version string from inside both files. The output will look somthing like this
Source File: /2.01FLASHEX_Dev/Lib_Version_Testing/WIN_libflashplayer.so
Source Ver: Adobe Flash says WIN(Windows) v1111157
Destination File: /2.01FLASHEX_Dev/Lib_Version_Testing/DST/libflashplayer.so
Destination Ver: Adobe Flash says WIN(Windows) v1111157
=================================================
It looks like you dont need make any further changes at this time.
Make sure you have set your browser to Desktop in settings(try Dolphin HD)
a
Joecascio2000 said:
Yeah so weird. I just tried it again after uninstalling flash and re-installing it. Same error. Maybe I'm executing it wrong. This is what I put:
su
sh /mnt/sdcard/Flashex2/flashex201.sh
It does seem to work, just give me an error with the .so file.
EDIT: and both string lines return "no such file or director". I just copy and pasted them in, maybe I did something wrong?...maybe its busybox...?
Click to expand...
Click to collapse
It could be. If you don't have a "strings" command the script wont work for you in it's current state. I made extensive use of strings to read info out of the binary files for version checking and to confirm the edit.
The error you got is something you could get from no strings command. It could also just be that the location "strings" is installed if it IS NOT in your $PATH for your ENV this would be a simple fix, in fact I'm tempted to add a PATH="" export PATH line back into the script just in case of stuff like this. I had removed it thinking it overkill.
Two diffrent folks seem to have a Busybox installer available via play.google.com. I use the one from J Rummy because it's only 1.99 for the Pro version instead of 4.99 and so far it has all the features I want and even has 1.19.4 available currently. It sounds like you may just need to figure out the location of the strings command and make sure that directory is exported as part of your $PATH. Let me know if would like assistance figuring this out.
NoSudo said:
It could be. If you don't have a "strings" command the script wont work for you in it's current state. I made extensive use of strings to read info out of the binary files for version checking and to confirm the edit.
The error you got is something you could get from no strings command. It could also just be that the location "strings" is installed if it IS NOT in your $PATH for your ENV this would be a simple fix, in fact I'm tempted to add a PATH="" export PATH line back into the script just in case of stuff like this. I had removed it thinking it overkill.
Two diffrent folks seem to have a Busybox installer available via play.google.com. I use the one from J Rummy because it's only 1.99 for the Pro version instead of 4.99 and so far it has all the features I want and even has 1.19.4 available currently. It sounds like you may just need to figure out the location of the strings command and make sure that directory is exported as part of your $PATH. Let me know if would like assistance figuring this out.
Click to expand...
Click to collapse
When I open terminal emulator the first line reads:
[email protected]:/ $ export PATH=/data/local/bin: $PATH
Also, I can't update busybox because for my current root method 1.19.3 is required.
Joecascio2000 said:
When I open terminal emulator the first line reads:
[email protected]:/ $ export PATH=/data/local/bin: $PATH
Also, I can't update busybox because for my current root method 1.19.3 is required.
Click to expand...
Click to collapse
You don't need a newer version of Busybox I'm running the same version.
it's your $PATH I will post an updated version that includes an Export PATH line to resolve after I eat some dinner.
for now you can copy/paste this into a terminal before running the script. Im guessing if you run that, then the script it will work
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/system/sbin:/system/xbin:/system/bin:/data/local/bin:/vendor/bin; export PATH
Darn...still isn't working. Lol my tab hates me. See the pic I think its a little different.
here's a link the one below is a little low res: http://i.imgur.com/uP9ZR.png
Joecascio2000 said:
Darn...still isn't working. Lol my tab hates me. See the pic I think its a little different.
here's a link the one below is a little low res: http://i.imgur.com/uP9ZR.png
Click to expand...
Click to collapse
It looks like you might still be missing the strings command. Because it doesnt look like anything is getting passed to grep. It looks like strings didnt run, so grep tried to look for the search expression as a file name.
what do you get if you type
ls -la /system/xbin/strings
or even just
ls -la /system/xbin
I show a symbolic link for /system/xbin/strings that points to Busybox. If it's in another location with your version of Busybox you just need to make sure the strings command is located in the path you use.
If you dont have a strings command at all for some reason since you have the same version of Busybox 1.19.3 you should be able to just make a Symbolic Link in /system/xbin(or what ever space you are configured to use) called strings that points to busybox. All those buxybox commands are symlinks to the same binary file in reality.
NoSudo said:
It looks like you might still be missing the strings command. Because it doesnt look like anything is getting passed to grep. It looks like strings didnt run, so grep tried to look for the search expression as a file name.
what do you get if you type
ls -la /system/xbin/strings
or even just
ls -la /system/xbin
I show a symbolic link for /system/xbin/strings that points to Busybox. If it's in another location with your version of Busybox you just need to make sure the strings command is located in the path you use.
If you dont have a strings command at all for some reason since you have the same version of Busybox 1.19.3 you should be able to just make a Symbolic Link in /system/xbin(or what ever space you are configured to use) called strings that points to busybox. All those buxybox commands are symlinks to the same binary file in reality.
Click to expand...
Click to collapse
Both commands showed: not found, however, I looked in /system/xbin/ and busybox and strings are in that folder. Also, right under strings is ( -> busybox )
Joecascio2000 said:
Both commands showed: not found, however, I looked in /system/xbin/ and busybox and strings are in that folder. Also, right under strings is ( -> busybox )
Click to expand...
Click to collapse
Yep the
strings --> busybox
is the way strings and the other Busybox commands look the
"--> Busybox" is to show what it links to, but the name is still strings. It's sorta like a shortcut in windows in a way.
Anyway that means you should be able to use strings try copy/paste this before you run the script in the same terminal.
PATH=$PATH:/system/xbin; export PATH
that take what ever you currently have for a $PATH and add /system/xbin to it
you can view your $PATH by typing
echo $PATH
Either way if your Busybox is properly installed into /system/xbin this should return a few lines out the binary. Just to confirm it's a working command on your system.
/system/xbin/strings /data/data/com.adobe.flashplayer/lib/libflashplayer.so | grep "AND"
I will come up with an up date to check for the location of Busybox and use hard paths for the commands, later in the week. That should avoid this issue coming up in the future.
First off thank you for helping with my pain-in-the-you-know-what tablet.
But sadly still a no go. I did get some more info though: http://i.imgur.com/oVxBz.png
It showed AND 11,1,115,7.
I think it's either the way I'm putting in the commands or the way my tab is rooted.
Joecascio2000 said:
First off thank you for helping with my pain-in-the-you-know-what tablet.
But sadly still a no go. I did get some more info though: http://i.imgur.com/oVxBz.png
It showed AND 11,1,115,7.
I think it's either the way I'm putting in the commands or the way my tab is rooted.
Click to expand...
Click to collapse
First off, Your very welcome. I actually enjoy this kinda stuff as long as I have time.
Next, Since it DID respond with AND 11,1,115,7 I am sure you CAN use the script, once updated. I will be working on an update this weekend. I may have a revised version made today, if I get an extra hour to dedicate to make the changes.
The issue seems to be, for what ever reason your device is having an issue with /system/xbin not being in your PATH or PATH and ENV not working as it should, BUT since /system/xbin/busybox and the symlink /system/xbin/strings both work when you type the full path, it's not a big deal.
I'm also going to try to write in a feature to test the location and version of Busybox and make sure it lists "strings" as a defined function, so the script can identify and resolve the issue when possible.
Updated Version should resolve any issues with the script not being able to use strings, grep etc on some systems.
Also check here for information on configuring Terminal Emulator to work correctly with Busybox. This I belive would get the old script working for those that had issues also for what it's worth.
NoSudo said:
Updated Version should resolve any issues with the script not being able to use strings, grep etc on some systems.
Also check here for information on configuring Terminal Emulator to work correctly with Busybox. This I belive would get the old script working for those that had issues also for what it's worth.
Click to expand...
Click to collapse
This is with the new version 2.02 and after configuring Terminal Emulator:
http://i.imgur.com/Rb458.png
Joecascio2000 said:
This is with the new version 2.02 and after configuring Terminal Emulator:
http://i.imgur.com/Rb458.png
Click to expand...
Click to collapse
Man I am at a total loss as to what your system is doing. That just doesn't make any sense at all. Are you running the script or Copy/Pasting lines into Terminal? What Busybox are you running anyway, not the version where did you get it? It seems totally defective honestly.
The script should work fine for you at this point TBH. Heck it works for me on my Linux PC too when I change the paths, and swap out xxd for hexdump and change the pattern format.
At this point I can only conclude that either you have a bad version of Busybox or you are doing something wrong.
Here is an example of what I mean
BUSYBOXPATH="/system/xbin"
if [ -e "$BUSYBOXPATH/busybox" ]&&[ -e "$BUSYBOXPATH/grep" ]; then
echo "Found BusyBox in $BUSYBOXPATH"
BSYBX_VER=`$BUSYBOXPATH/busybox | $BUSYBOXPATH/grep "BusyBox v"`
echo "Version: $BSYBX_VER"
else
echo "Unable to confirm location of BusyBox, please configure the script"
exit 3
fi
This statement says if /system/xbin/busybox and /system/xbin/busybox exist to echo "Found" etc.
Your output has those lines, so those commands HAVE to exist in those locations or it would respond with
Unable to confirm location of BusyBox, please configure the script.
However the script is unable to read the Version line off busybox because busybox isnt spitting out anything or maybe it's been modified and no longder displays the correct response. Again even a Desktop PC with Linux on it get's this response from Busybox.
What happens when you just type
/system/xbin/busybox
Do you get anything?
You should get something like;
$ busybox
BusyBox v1.19.3 (2011-11-22 01:37:10 MST) multi-call binary
Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, addgroup, adduser, adjtimex, ar, arping, ash, awk,
basename, brctl, bunzip2, bzcat, bzip2, cal, cat, chgrp,
chmod, chown, chroot, chvt, clear, cmp, cp, cpio, crond,
crontab, cut, date, dc, dd, deallocvt, delgroup, deluser,
df, dirname, dmesg, dos2unix, dpkg, dpkg-deb, du, dumpkmap,
echo, ed, egrep, eject, env, expand, expr, false, fbset,
fdflush, fdisk, fgrep, find, fold, free, freeramdisk, fsck.minix,
ftpget, ftpput, getopt, getty, grep, gunzip, gzip, halt,
head, hexdump, hostid, hostname, httpd, hwclock, id, ifconfig,
ifdown, ifup, init, ip, ipcalc, kill, killall, klogd, last,
length, less, linuxrc, ln, loadfont, loadkmap, logger, login,
logname, logread, losetup, ls, lzmacat, makedevs, md5sum,
mdev, mesg, microcom, mkdir, mkfifo, mkfs.minix, mknod,
mkswap, mktemp, more, mount, mt, mv, nameif, nc, netstat,
nslookup, od, openvt, passwd, patch, pidof, ping, ping6,
pivot_root, poweroff, printf, ps, pwd, rdate, readlink,
realpath, reboot, renice, reset, rm, rmdir, route, rpm,
rpm2cpio, run-parts, sed, setkeycodes, sh, sha1sum, sleep,
sort, start-stop-daemon, static-sh, strings, stty, su, sulogin,
swapoff, swapon, sync, syslogd, tac, tail, tar, tee, telnet,
telnetd, test, tftp, time, top, touch, tr, traceroute, true,
tty, udhcpc, umount, uname, uncompress, unexpand, uniq,
unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode,
vconfig, vi, vlock, watch, watchdog, wc, wget, which, who,
whoami, xargs, yes, zcat
Note: Busybox in Android will have a slightly diffrent list of functions but the version line etc is the same.
NoSudo said:
Man I am at a total loss as to what your system is doing. That just doesn't make any sense at all. Are you running the script or Copy/Pasting lines into Terminal? What Busybox are you running anyway, not the version where did you get it? It seems totally defective honestly.
The script should work fine for you at this point TBH. Heck it works for me on my Linux PC too when I change the paths, and swap out xxd for hexdump and change the pattern format.
At this point I can only conclude that either you have a bad version of Busybox or you are doing something wrong.
Click to expand...
Click to collapse
The command I'm using is
Su
Sh /mnt/sdcard/flashex2/flashex202.sh
I think it might be my version of busybox. I think its a modified version because rooting ICS on the a100 was a difficult process. It also says not to update busybox because root will be broken.
Sent from my A100 using XDA Premium HD app

[modules] cifs.ko, md4.ko, nls_utf8.ko, stock [4.2 / 4.2.2] 3.4.5-g4e6298b / gaf9c307

I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
Is it posible to make a CWM flash file?
Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details
H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.
H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!
You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module
craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.
Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.
Ok, added a script and instructions to the front page for simple on tablet mounting.

[HOWTO] Install Sugar Learning Platform on a low-cost tablet

Hi there,
so this is a guide how to install the Sugar Learning Platform ( http://www.sugarlabs.org/ ), which might be known from the OLPC project ( http://one.laptop.org/ ) on a low cost tablet using Android. In this example I used the Zync Z930 ( http://www.zync.in/index.php/our-products/tablet-phablets/zync-z930-detail ), but generally spoken it should be possible on every tablet / device running Android.
Software requirements
Complete Linux Installer ( https://play.google.com/store/apps/...linuxonandroid&feature=search_result&hl=en_GB )
android-vnc-viewer ( https://play.google.com/store/apps/details?id=android.androidVNC&feature=search_result&hl=en_GB )
Android Terminal Emulator ( https://play.google.com/store/apps/details?id=jackpal.androidterm&feature=search_result&hl=en_GB )
All the software above should be free of cost (at least at the time this is written). Technically we will have running a special Fedora-ARM-Image in a chroot environment on the top of Android. But you will need root rights for this, so be aware of warranty conditions and other things as it might harm your device and make it unusable.
To root your device, you must find a method that works for your device. Many devices can be rooted according to that method , for my device I used simply adb commands as described by arunal_123 in this thread: http://forum.xda-developers.com/showthread.php?t=2093663
I did not use the files he offered as I had my own, but I think this should not change a thing. However, be aware what rooting means and if you do not know it, DO NOT DO IT.
OK, so I expect you to have downloaded the 3 applications I suggested, now that we have a rooted device, let us start the real work!
First, download the Fedora-Image file from here As you can read, this is an ALPHA version, and in fact there are some bugs, however, it should work for us, so do not worry.
Now I expect that you have the image file at /user/home/fedora.img
First you might want to enlarge the image file to allow us to install all the applications we want. You can do that like this. I used method 1. If you face some trouble that the mount-point does not exist, feel free to create it by yourself manually like that as root on terminal (I expect you to run a GNU/Linux on your computer, if you do not have one, just load down an image of for example Ubuntu and put it on your USB drive ( http://www.ubuntu.com/download/help/try-ubuntu-before-you-install )):
mkdir /media/fedoranew
OK, now that you have enlarged your image file (maybe to 2GB), let´s proceed.
Open the terminal app and type su. Now there should be a # instead of a $. If this does not work, you have not successfully rooted your device, go back to step one, if you face trouble, make a specific thread for your device, but search on the forum before. Now you can already start up fedora using the following command:
Code:
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/fedora/fedora.img
(your image file would be on your sd-card in the folder fedora named fedora.img, on some devices the real extern sdcard might be available under ext_sd instead of sdcard).
Now some errors will popup, let us ignore them right now. So we are in fedora right now, but without graphical view. First, we can update all the stuff by using yum. Just type yum update (that might take some time, take a cup of coffee or realize that you should repaint your wall again)
Alright, so now let us install the programs we need, that is the tightvnc-server and the sugar-desktop, therefore type
Code:
yum install tightvnc-server
yum groupinstall sugar-desktop
yum install sugar-emulator
OK, now we must change the xstartup file of our vnc-server to use our own version. I actually prefer the nano-editor (you can install it with yum install nano, but vi is pre-installed, to use it, type: vi /home/fedora/.vnc/xstartup In the case it does not exist, just recreate the user fedora by deleting it by userdel fedora, also erase all files by rm -r /home/fedora and create it again by adduser fedora, just ignore any warnings. Now you should change the file like that:
Code:
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
dbus-launch --session sugar &
Right now if you would try to start it, you would find various errors in the logfile in /home/fedora/.vnc, that is due to some strange rights for some folders and some missing devices. So here is how to fix this issue:
Code:
chmod 666 /dev/null
chmod 777 /tmp
yum install MAKEDEV
cd /dev
MAKEDEV tty
MAKEDEV pts
So now you should have all devices and sufficient permissions, but you might not have a vnc-user-password for fedora, so change to the user and make a dummy start of the vnc-server
Code:
su - fedora
vncserver
...and choose your favorite password.
Alright, go back to root via exit and shut the hole thing down via exit again.
So start Fedora again by pressing the Vol-Up button and w on the terminal, press enter.
OK, now we should have a more or less graphical interface, so start android-vnc-viewer, use the following settings:
Code:
Port-Number: 5900
Username: fedora
Password: <your_choice>
24bit colours
And connect....
Now you should see some terminal, type
Code:
sugar-emulator
Wait a second and sugar should power up. Now you should be able to start activities and also install new ones.
Enjoy Sugar on your tablet and tell me about your experiences and problems.
I just wrote this hole post out of my memory, so probability is high I forgot something, just tell me about your issues and I will update the guide.
Happy hacking!
Sugar Learning Platform on Inexpensive Chinese Tablet
I was very happy to find a post on this topic. I have a couple of Yeahpad Pillbox7 inexpensive Chinese tablets, which I purchased specifically because they are the only thing I can afford and my 4 year old twin boy and girl need a real learning computer.
I believe this topic is of the highest importance as successful implementation means making the original goal of the $100 Sugar computer a reality to the individual user who doesn't necessarily need the specifications of the XO machine.
I have been as detailed as I can be - perhaps painfully so - because I don't know what I am missing that could make the difference in turning this from a lengthy set of failed directions and notes into a functional demonstration project that proves that it is possible to reach this goal, which has been more than a decade in the making, albeit by taking some shortcuts with the lofty hardware goals and in this case running in a virtual environment which hampers performance and functionality.
If you want to start reading where following your directions starts to go haywire then skip to the dotted line of astrixs "* * * * * * * * *" and the heading in capital letters that says, "YUM UPDATE, INSTALLING TIGHTVNC-SERVER, SUGAR-DESKTOP, & SUGAR EMULATOR - RESULTING UNFOUND FILE DEPENDENCIES NOT AT ANY MIRROR"
The specifications of the Yeahpad Pillbox7 are about identical to the machine you used.
SPECIFICATIONS ON THE YEAHPAD PILLBOX7
Android Ice Cream Sandwich
Allwinner A13 CPU and Mali-400 GPU - which is ARM Cortex-A8 architecture
512 Mb RAM
4 GB internal memory
7" capacitive touch screen
some kind of wifi - supposedly 802.11n
I have a 16GB miniSDHC card I am using with a microSD adapter
I have a USB hub and have connected a mouse and keyboard to make the work easier.
PREVIOUS EXPERIENCE RELEVANT TO THIS ENDEAVOUR
I have been using the Linux On Android / Complete Linux Installer app with Terminal Emulator app and Android VNC Viewer app all from the Play store.I have successfully chroot virtualized a very basic Debian with XFCE, and also Ubuntu 12 with LXDE with these tools.
I also have been spending some time on the Linux on Android IRC channel and have Zac the creator of the app on my FaceBook page. Zac has been helpful and is very curious as to how this project goes.
My device the Yeahpad Pillbox7 is pre-rooted and only requires a "su" at terminal to get the "#" prompt.
Despite any details that indicate otherwise, I am a complete Android noob and my experience in linux is just as a distro-hopping enthusiast with no professional experience and almost no understanding. Nonetheless I try to enjoy what I do with these consumer devices and my emphasis has always been on the lower end economically, saving old machines often when there is not any funds for a new one, and for about 5 years now also getting ahold of consumer devices from China at the lowest price that can be had new and trying to modify the stock "computer" into something useful. This is my third attempt to do so in that category.
This type of chroot linux virtualization has shown the most promise as of late in the absence of driver availabilty for installing linux natively on a category of device where the manufacturers, the components they use, and the architecture has been in constant flux - but at this point in the market they are all aiming for Android v4 and up with Play store access. Since these devices are small, they seem to lend themselves to the application of young children, and also since the largest percentage of very poor users without access are young children, the application of a learning environment that emphasizes classical computer literacy with such allegories as turtle graphics to teach programming at a young age is a worthwhile lofty goal for the community to apply to the flood of inexpensive tablet computers coming our way now.
ALPHA VS BETA VERSION OF FEDORA CORE IMAGE FOR LINUX ON ANDROID
Perhaps this is where I went wrong I am using the BETA version of the Linux on Android Fedora Core image. It wasn't available when you wrote this post. Perhaps I was mistaken in thinking that the BETA would be the better image to start with. I will go back and do it with the ALPHA version next, which is per your instructions, and I will post my results again. Anyhow I took the Fedora Core image for Linux on Android and I unzipped it using 7zip, I verified the md5sum using fileverifier++ and I put on the miniSDHC card under a folder called /fedora/ and the file I named fedora.img. So I put it at /fedora/fedora.img on the miniSDHC card.
CONFIGURING MY PC TO BE ABLE TO DO IMAGE PREPARATION
I downloaded a the alternate version of xubuntu 12.04.b for 64 bit. Did an md5sum check and burned it to a CD-ROM. Then after updating the VirtualBox install on the PC I have access to is an Acer Aspire 5733-6838 which runs Windows 7 Home Premium SP1 on an Intel Core i5 with 4GB of DDR3 RAM - I installed the Xubuntu as a Guest OS on VirtualBox successfully and applied all the latest updates. Then I also installed Guest Additions and made the Drag'n;Drop and Clipboard functions bi-directional because I like being able to copy and paste in and out of my host OS while I do my work. I was able to mount the 16GB miniSDHC card onto the Guest Xubuntu OS using the USB Devices options on the VirtualBox control bar.
I did all that (installing Xubuntu) because the Linux I've been virtualizing and enjoying lately, Mageia2, did not execute the "cp -r fedoraold/* fedoranew" command which I derived from the 'expand the image directions' you referenced without generating a plethora of "cp: cannot create symbolic link" errors!
EXPANDING THE FEDORA IMAGE TO 2GB
Having switched to Xubuntu 12.04b 64bit alternate - I was able to execute the directions derived from
the directions from the linuxonandroid resource you referenced (I am not allowed to post outside links because I am a new xda forum member)
and enlarge the fedora image file to 2GB. I used these commands from terminal:
dd if=/dev/zero of=fedoranew.img bs=1M count=0 seek=2048
mke2fs -F fedoranew.img
so then I created two folders on the miniSDHC card at /fedora/ one called "fedoraold" and one called "fedorabang"
and then mounted the folders from the terminal using these commands
sudo mount -o loop fedora.img fedoraold
sudo mount -o loop fedoranew.img fedorabang
then I did the copy to the larger 2GB image file using this command from the terminal:
sudo cp -r fedoraold/* fedorabang
and finally I unmounted the folders using these terminal commands
sudo umount fedoraold
sudo umount fedorabang[/B]
I then shut down xubuntu and used the remove usb device icon from the Windows 7 taskbar to get a safe to remove the SDCard message.
I removed the miniSDHC card from the microSD adapter and inserted it into the Yeahpad Pillbox7 while powered off.
TRYING TO MODIFY THE FEDORA IMAGE ON THE TABLET TO RUN SUGAR LEARNING PLATFORM USING LINUX ON ANDROID AND ANDROID VNC VIEWER
I already have Linux on Android / Terminal Emulator / and Android VNC Viewer Apps installed on the Android Tablet.
Using File Manager I see that the newly made image is at: mnt/extsd/fedora/fedoranew.img
So after confirming that the bootscript.sh file is where it is supposed to be I use this command from the terminal to launch Linux on Android with the 2GB FedoraCore image
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/extsd/fedroa/fedoranew.img
I take the advice to ignore the errors, I've seen them before on LinuxOnAndroid during successful launches of other images.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
YUM UPDATE, INSTALLING TIGHTVNC-SERVER, SUGAR-DESKTOP, & SUGAR EMULATOR - RESULTING UNFOUND FILE DEPENDENCIES NOT AT ANY MIRROR
So I continue by trying to get all the current updates for fedora using the terminal command:
yum update
At the Transaction summary - I also respond with: "y" and [ENTER].
This is where I ran into my first set of snags - summarizing the errors Yum couldn't find these files:
bind-license-9.9.2-5.P1.fc17.noarch.rpm
dosfstools-3.0.14-1.fc17.armv5tel.rpm
selinux-policy-3.10.0-167.fc17.noarch.rpm
bind-libs-9.9.2-5.P1.fc17.armv5tel.rpm
dnsmasq-2.65-4.fc17.armv5tel.rpm
coreutils-8.15-9.fc17.armv5tel.rpm
libsss_sudo-1.8.6-1.fc17.armv5tel.rpm
iproute-3.3.0-5.fc17.armv5tel.rpm
bind-utils-9.9.2-5.P1.fc17.arm5tel.rpm
bash-4.2.39-2.fc17.arm5tel.rpm
bind-libs-lite-9.9.2-5.P1.fc17.armv5tel.rpm
selinux-policy-targeted-3.10.0-167.fc17.noarch.rpm
at any of these mirror sites:
apparently I can't post these here because I am a new xda forum member
I tried "yum update" more than once and ran into the identical set up errors, so I continued on hoping that substitute files were found, or that none of those files were essential.
So I conintued to try and install the programs your post says that I need, starting with tightvnc-server, so I use the terminal command:
yum install tightvnc-server
At the Transaction summary - I also respond with: "y" and [ENTER].
This is a summary of the files that Yum couldn't find from the errors:
perl-PathTools-3.33-221.fc17.armv5tel.rpm
perl-Pod-simple-3.16-221.fc17.noarch.rpm
perl-macros-5.14.3-221.fc17.armv5tel.rpm
perl-libs-5.14.3-221.fc17.armv5tel.rpm
perl-Pod-Escapes-1.04-221.fc17.noarch.rpm
perl-Module-Pluggable-3.90-221.fc17.noarch.rpm
perl-5.14.3-221.fc17.armv5tel.rpm
gnutls-2.12.20-4.fc17.armv5tel.rpm
I believe that Yum had tried all the mirror sites listed earlier.
As before, I have nothing else to go on, so I hope that either substitute files were found, or that none of those files were essential.
So I continue to try and install the progams your post says that I need, the next one being the sugar-desktop, so I use the terminal command:
yum groupinstall sugar-desktop
At the Transaction summary - I also respond with: "y" and [ENTER].
This is a summary of the files that Yum couldn't find from the errors:
libarchive-3.0.4-2.fc17.armv5tel.rpm
libproxy-0.4.10-1.fc17.armv5tel.rpm
gnutls-2.12.20-4.fc17.armv5tel.rpm (see above - already not found before)
I believe that Yum had tried all the mirror sites listed earlier.
As before, I have nothing else to go on, so I hope that either substitute files were found, or that none of those files were essential.
So I continue to try and install the programs your post says that I need, the next one being the sugar-emulator, so I use the terminal command:
yum install sugar-emulator
At the Transaction summary - I also respond with: "y" and [ENTER].
This is a summary of the files that Yum couldn't find from the errors:
libproxy-0.4.10-1.fc17.armv5tel.rpm (see above - already not found before)
gnutls-2.12.20-4.fc17.armv5tel.rpm (see above - already not found before)
I believe that Yum had tried all the mirror sites listed earlier.
As before, I have nothing else to go on, so I hope that either substitute files were found, or that none of those files were essential.
All in all from I read that there were 22 .rpm files missing that were not found at any of the relevant mirrors between the general yum update (12 missing files) and dependencies from tightvnc-server, sugar-desktop, and sugar-emulator (10 more missing files)
CUSTOMIZING THE XSTARTUP FILE AT /home/fedora/.vnc/xstartup FOR OUR PURPOSES
So I continud on with the instruction in your post, next on the agenda is an xstartup file for vnc-server.
You describe it as changing the xstartup file - I could used the "ls -a" command on the directory /home/fedora/ and could not find a directory called .vnc and could not find an existing file at /home/fedora/.vnc/xstartup
I too don't seem to have the talent for the vi editor so I take your suggestion and install nano using this terminal command:
yum install nano
At the Transaction summary - I also respond with: "y" and [ENTER].
There were some other files starting with "." that I found in the /home/fedora/ directory - I looked at them with the text editor and I didn't see any information that I could figure was specific to this use instance - but I am no expert. So I did the following strictly on your instructions advice.
It said if I could not find the xstartup file in existance to do the following from the terminal command line, ignoring any warnings.
userdel fedora
rm -r /home/fedora
adduser fedora
I tried the least destructive choices it gave me upon the "rm -r /home/fedora command" but it did not result in a .vnc directory or xtartup file that I could detect when completing the instructions to the "adduser fedora" command - so I repeated the commands but answered the resulting question with removal of even the /home/fedora directory. nonetheless all of that failed in creating a .vnc directory that I could detect (using the 'ls -a' command) or of an xstartup file.
So I went ahead and ad libbed the following from the terminal because otherwise anything I were to write in nano for /home/fedora/.vnc/xstartup would not save for lack of a directory for it to go in.
mkdir /home/fedora/.vnc
For some reason even after I execute the make directory command, "ls -a" from the /home/fedora/ directory still doesn't show it, but I can cd into, /home/fedora/.vnc/
From there I simply followed the directions and from the terminal:
nano /home/fedora/.vnc/xstartup
And from there entered the script given and saved it with ctrl-o and/or ctrl-x nano commands:
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
dbus-launch --session sugar &
ADDITIONAL PERMISSIONS AND MISSING DEVICES
So refering to your instructions once again: it says that I need to execute the following to give certain rights and take care of missing devices. So from the terminal:
chmod 666 /dev/null
chmod 777 /tmp
yum install MAKEDEV
At the Transaction summary - I also respond with: "y" and [ENTER].
Terminal responds "Complete!"
cd /dev
MAKEDEV tty
Then I enter according to your instructions
MAKEDEV pts
And the terminal responds:
don't know how to make device "pts"
So I do some research into the "Makedev" command - I can't post this url here because I am a new xda forum member.
Granted the page I find is not from the same flavor of linux but I don't see a "pts" option and it seems perhaps this is a typo.
So I need to guess what you were trying to accomplish. I decide on the following terminal command:
MAKEDEV pty
And at least there are no errors - but was it what you intended - I have no clue? also was there any reason for the Makedev command to be capitalized either when asking yum to install it or in its usage. Again I am a noob so I have no clue.
VNC-USER-PASSWORD AND DUMMY START OF VNC-SERVER AND OTHER FINISHING TOUCHES (unresolved)
From the terminal the next command in your directions gives no problems:
su - fedora
The result is the changed the prompt from [[email protected] dev]# to [[email protected] ~]$
but the next command:
vncserver
is unrecognized or any variants I try "vnc-server" "tightvnc-server" and I look for anything promising in the /bin/ and /sbin/ directories but fail to find anything.
So the part about 'choosing my favorite password' which I know I will need to use the Android VNC Viewer app to see the graphical install of the sugar learning platform, is sadly not a reality. This is confusing to me as I know the command must be available somehow as everytime one tries to launch the Linux On Android app it is a question on the user dialog, something like "start the vnc-server (y/n)" or some words along those lines, so I know there is a command to do this available.
So to shut everything down requires from the terminal:
exit
and then also again from the terminal:
exit
I am equally perplexed by the whole set of directions instructing to press "Vol-Up" button and w on the terminal.
I try it. and the Vol-Up button does register some symbol in the terminal, and I follow it with the letter "w" on the terminal and enter.
and also I try to do the two actions in conjunction, but nothing I do with those directions seems to restart Fedora that I can tell.
Can you explain that part of the directions in more detail?
I try various combinations of things I know to try but I Android VNC Viewer is failing to connect even if there is something to connect with for lack of a password
that I have not been able to set or already know. Also even after getting Linux on Android to launch the fedoranew.img that has been modified it the terminal is not
responsive on the command line to:
sugar-emulator (does nothing)
AN INVITATION TO ALL THOSE WHO KNOW BETTER AS TO WHAT I CAN OR SHOULD TRY TO DO TO MAKE THE SUGAR LEARNING PLATFORM WORK WITH LINUX ON ANDROID AND ANDROID VNC VIEWER.
I have not been able to enjoy Sugar on the Yeahpad Pillbox7 tablet,
and I am taking you up on your offer to tell you about my experiences and problems.
I know you said you wrote the post out of memory but if you could do it again taking notes while you do it so that others can try to get the same result, please comment on what you think I am doing right or wrong, or if you can remember more that might be helpful - then the world will owe you a debt as there in is in my humble opinion many many people who don't even know that they need this information yet.
OK, so what I think is that this image is somehow messed up as these unresolved dependencies indicate - in my opinion - some mis-configured setup.
Maybe the fastest solution might be to try the alpha-Image I used - if you still face trouble, please feel free to describe it as precisely and well as you did this time.
Good luck
I am about to repeat the process with the ALPHA image but..
I am about to repeat the process with the ALPHA image. But...it would help if you made comment on more than the dependency problems...
These three areas in your instructions and my comments are areas I am particularly curious about and think your input would be valuable in.
1)
For instance it would be helpful to know about what you think about what you think about my comments with the strange behavior around the /home/fedora/.vnc/xstartup file and the del and add of the fedora user.
Wouldn't it be better just to add the .vnc folder and xtartup file and doesn't the lack of a .vnc folder at all seem to indicate a step that wasn't documented?
2)
Please examine what I wrote about the MAKEDEV command. Was I correct about the typo?
3)
Please enlighten me further about your instructions regarding "Vol-up" and "w" - I can't find any information anywhere that gives me a clue about what you were trying to do there. I wasn't able to reproduce the result you got - maybe if I understood more I will be able to replicate what you were trying to do there and or find another way to do it.
Thanks so much in advance... I appreciate your interest in this topic!
For instance it would be helpful to know about what you think about what you think about my comments with the strange behavior around the /home/fedora/.vnc/xstartup file and the del and add of the fedora user.
Wouldn't it be better just to add the .vnc folder and xtartup file and doesn't the lack of a .vnc folder at all seem to indicate a step that wasn't documented?
Click to expand...
Click to collapse
As I understood you, yum install tightvnc-server fails due to unresolved dependencies. Therefore, no such folder will be created as the program is not installed. That is also why you will not get such a folder after recreating the user.
Please examine what I wrote about the MAKEDEV command. Was I correct about the typo?
Click to expand...
Click to collapse
It might be the case that it was in fact pty, not pts, I am not sure about that anymore. You can check for the success by changing into the /dev directory ( cd /dev ) and then list all entries of pty ( ls pty* ) to see whether the device was created successfully.
Please enlighten me further about your instructions regarding "Vol-up" and "w" - I can't find any information anywhere that gives me a clue about what you were trying to do there. I wasn't able to reproduce the result you got - maybe if I understood more I will be able to replicate what you were trying to do there and or find another way to do it.
Click to expand...
Click to collapse
This is only for convenience so that you do not have to write the hole command again. So when you are in the terminal emulator, by default, you should be able to go up in your bash history by pressing "Vol-up" and "w", similar to the "arrow-up" on your PC.
I hope I could help you, good luck.
Thank you.
Thank you, those are some very useful replies!
I will be sure to post the results of my next binge of effort on this project.

Categories

Resources