Since so many fight about whether the application speed tests are correct, I made a simple script that will test your speeds for you with no bs (with just 33 lines of code) and display the average speed for you in MB/s Mb/s and kB/s. It will let you choose 1 of 5 locations within the US and UK to test your speed against. The files are hosted by my vps hosting provider to test their data center speeds so they are pretty fast as well as provide a decent set of locations as well as keep me from paying for the bandwith . These are 100MB files so it'll give your connection some time to average out the speed. To run it just do the following:
NOTE: THIS TAKES AN AVERAGE OF YOUR SPEED, NOT THE PEAK SPEED. If it seems like it's slower than you think, it's because it's taking how long it took to download and the file size.
1) Download the script
2) Move it to a directory you can execute it from, such as /data/local/tmp by a file explorer or by the terminal.
3) gain super user privileges on the terminal (type "su" without quotes)
4) go to the directory you put the file and modify the permissions so you can run it:
Code:
cd /data/local/tmp
chown root speedtest.sh
chmod 755 speedtest.sh
5) run the file, picking a data center as an argument like so
atlanta, georgia:
Code:
./speedtest.sh a
dallas, texas:
Code:
./speedtest.sh d
fremont, california:
Code:
./speedtest.sh f
newark, new jersey:
Code:
./speedtest.sh n
london, england:
Code:
./speedtest.sh l
If you don't enter any letter after the script name, it defaults to dallas, since it's geographically in the center of the US.
Questions/Comments/Feedback, feel free to let me know. It's just a simple script, nothing impressive, but it does the job.
Currently it is only taking the integer values for the data output, because busybox doesn't include bc to do the floating point (decimal) math easily. I can pipe it through awk, but have not gotten to that yet.
Thanks for this! I'm going to give it a run this afternoon.
FYI: in step 5 you wrote speedtweak.sh not speedtest.sh. Just so ya know. Thanks again.
Sent from my HTC Thunderbolt
Changing servers can be considered a tweak.
JBO1018 said:
Thanks for this! I'm going to give it a run this afternoon.
FYI: in step 5 you wrote speedtweak.sh not speedtest.sh. Just so ya know. Thanks again.
Sent from my HTC Thunderbolt
Click to expand...
Click to collapse
Thanks for pointing out the typos. I shouldn't write out directions when I'm half asleep.
If anyone had any other high performance server locations with static IPs, I will add them to the script.
The current ones are at least likely to be of similar performance, just farther from you, so they could be slower from too many network hops. Busybox includes traceroute, so if you wanted, you could type the IP for the server in with that and find out which is closest to you by network hops (which may not be the same as actual physical distance).
# su
#chown root speedtest.sh
# chmod 755 speedtest.sh
# ./speedtest.sh
Connecting to 69.164.200.100 (69.164.200.100:80)
testfile 100% |***********| 100M 0:00:00 ETA
./speedtest.sh: arithmetic expression: syntax error: "( / 1048576) / "
#
Thats what I got when I ran it, but it could be my fault. When I clicked the d/l link it just took me to a page of text so I copy/pasted it to a blank txt file and renamed it. So not sure if I did that right lol.
Sent from my HTC Thunderbolt
JBO1018 said:
# su
#chown root speedtest.sh
# chmod 755 speedtest.sh
# ./speedtest.sh
Connecting to 69.164.200.100 (69.164.200.100:80)
testfile 100% |***********| 100M 0:00:00 ETA
./speedtest.sh: arithmetic expression: syntax error: "( / 1048576) / "
#
Thats what I got when I ran it, but it could be my fault. When I clicked the d/l link it just took me to a page of text so I copy/pasted it to a blank txt file and renamed it. So not sure if I did that right lol.
Sent from my HTC Thunderbolt
Click to expand...
Click to collapse
Cant say for sure, but looks like it's missing a ) or something. Check to see if it copy and pasted okay.
Might try this as well so it will display all output:
sh -x speedtest.sh
And give me the output if you can.
yareally said:
Cant say for sure, but looks like it's missing a ) or something. Check to see if it copy and pasted okay.
Might try this as well so it will display all output:
sh -x speedtest.sh
And give me the output if you can.
Click to expand...
Click to collapse
This is what I get when I run that:
export PATH=/data/local/bin:$PATH
# export PATH=/data/local/bin:$PATH
# su
# cd /data/local/tmp
# ls
speedtest.sh
testfile
# rm testfile
# sh -x speedtest.sh
+ URL=http://69.164.200.100/100MB-dallas.bin
+ date +%s
+ BEFORE_TIME=1314065975
+ wget -O testfile http://69.164.200.100/100MB-dallas.bin
Connecting to 69.164.200.100 (69.164.200.100:80)
testfile 100% |***********| 100M 0:00:00 ETA
+ date +%s
+ ls -l -a testfile
+ awk { print $5}
speedtest.sh: arithmetic expression: syntax error: "( / 1048576) / "
#
Sent from my HTC Thunderbolt
I think it's crapping out on line 24:
MB_FILE_SIZE=$((($FILE_SIZE / 1048576) / $TOTAL_TIME))
see if your lines in it match the following exactly:
FILE_SIZE=`ls -l -a testfile | awk '{ print $5}'`
TOTAL_TIME=$(($AFTER_TIME - $BEFORE_TIME))
MB_FILE_SIZE=$((($FILE_SIZE / 1048576) / $TOTAL_TIME))
kB_FILE_SIZE=$((($FILE_SIZE / 1024) / $TOTAL_TIME))
Mb_FILE_SIZE=$(((($FILE_SIZE / 1048576) * 8) / $TOTAL_TIME))
echo "Average download Speeds:"
echo "$MB_FILE_SIZE MB/s"
echo "$kB_FILE_SIZE kB/s"
echo "$Mb_FILE_SIZE Mb/s"
rm -f testfile
Also, if you downloaded it to a windows pc and then put it on your phone, it might have made something go screwy due to the line endings. Windows does \n\r and linux does \n. I'll attach the download to the top posting if that helps and redownload it. If it's the line endings, you typically cant see those without a text editor that shows them.
I am getting a similar error
Sent from my Thunderbolt
Hmm. What folder are you guys trying it in offhand?
Certain places might need you to mount your /system in rw mode, but /data/local/tmp doesn't. That error just seems like it's not downloading the file and saving it, thus when it tries to use the filesize in the equations after to determine how long it takes, it divides by zero, because the file didnt exist.
Anyways, try mounting your system in rw and see if that works with:
mount -o remount,rw -t ext3 /dev/block/mtdblock5 /system
and to unmount:
mount -o remount,ro -t ext3 /dev/block/mtdblock5 /system
I'll add some debugging statements to the script so you guys can tell me a bit more details as well if things still don't work. It works on my end, but adding some stuff might help us to figure out why it isn't on your end.
got the same error as everyone else.
I'm running it from /data/local/tmp but I went ahead and tried it after running remount but still got the same results. It does go through the whole process of d/ling the file and everything but as soon as the d/l finishes is when it gives the syntax error. Also after its done there is another file in tmp called test file. I am using the pre-made file you put up later. Because I do think the txt editor on my phone I used to make the file was screwing up the line formatting.
Edit: BTW the test file that ends up in tmp is the full 100 MB.
Sent from my HTC Thunderbolt
The problem is your awk statement is grabbing the date field instead of the file size. For me it is the forth column instead of the fifth. Not sure why your phone is different then ours, but maybe it is the rom?
Sent from my Thunderbolt
./speedtest.sh f
Connecting to 64.71.152.17 (64.71.152.17:80)
testfile 100% |***********| 100M 0:00:00 ETA
Average download Speeds:
1 MB/s
1896 kB/s
14 Mb/s
Seemed to work fine after I changed the 5 to a 4 on the line I mentioned above.
Sent from my Thunderbolt
skaforey said:
./speedtest.sh f
Connecting to 64.71.152.17 (64.71.152.17:80)
testfile 100% |***********| 100M 0:00:00 ETA
Average download Speeds:
1 MB/s
1896 kB/s
14 Mb/s
Seemed to work fine after I changed the 5 to a 4 on the line I mentioned above.
Sent from my Thunderbolt
Click to expand...
Click to collapse
very weird. I'm running cyanogen mod 7. Probably the reason though. I wouldnt have evend had to use awk if busybox had a stat -c option. Stupid busybox, lol.
Glad it worked for you though.
What roms are you guys running offhand? That would be useful for me to try to make a workaround for.
Changing the 5 to a 4 worked for me too. Thanks
Sent from my HTC Thunderbolt
I think an easier fix would be to check if field 5 has a dash, and if it does, use 4 instead.
Sent from my Thunderbolt
skaforey said:
I think an easier fix would be to check if field 5 has a dash, and if it does, use 4 instead.
Sent from my Thunderbolt
Click to expand...
Click to collapse
Good idea
Related
I figured I would start a tutorial thread. If you have some tutorials or instructions you would like to share then post them. Also post links to other helpful posts and threads.
Basic instructions for building an android squashfs system image:
First you need a Linux installation. I use Ubuntu 9.04 and run as the root user.
You need to have squashfs-utils installed. I have version 3.3 installed.
You need the android version of genext2fs. You might want to chmod this to executable before using it.
Starting simple download the ion 1.5 build or any other build that works on vogue as a base.
If the base image your using is a system.img then it's cramfs. You can mount this image and pull from it. Enter android-builds directory and create a tmp directory for mounting the image and a mount point in that tmp dir.
Code:
mkdir tmp
mkdir tmp/cram-sys
mount -o loop system.img tmp/cram-sys
The system.img should be mounted on tmp/cram-sys
Now you have a base system image to grab files from.
If you have a system.sqsh then it is a little easier to do.
Put the system.sqsh in a working directory like base-rom in your android-builds directory and while in the directory from a terminal execute:
Code:
unsquashfs system.sqsh
This will create a directory called squashfs-root.
Then download a build from the dream forums on xda.
Usually they come in update.zip format. Extract the zip to a working directory like android-builds/foo
Inside you should see some directories mainly data and system is what you are after.
Look inside the data folder for any app or app_s directories. Copy those apps to the system/app directory. Leave out any unnecessary apps like wifi tether and so on.
In the system directory is another directory called lib. You need to take out libaudio.so libaudioflinger.so libgps.so. Depending upon the build the vogue specific libraries are either in /lib or /lib/donut in the rootfs. We take these out of system/lib because they cause conflicts. Another way around this is to copy the vogue specific libraries to system/lib.
In the system directory is another directory called etc. You need to replace apns.conf with the one from a working vogue android build.
Depending on the build you are porting you will need to modify system/bin and system/xbin. I usually add any missing files to the new image and base the missing files off of the ones in the android 1.5 ion build.
After this you need to edit your build.prop in the system directory. Look at the ion cupcake 1.5 or a donut build with market fix for reference depending on the build you are porting.
The last step is to put a .build file in the system directory. This depends on the build type.
donut.build
ion.build
rogers.build
hero.build
After you've modified the system directory you need to use genext2fs to create an android specific ext2 image.
for cupcake/donut images
Code:
genext2fs -d ./system -b 80000 -a system.ext2
this will make ~80mb ext2 system image.
for hero/sense ui builds a larger image is required
Code:
genext2fs -d ./system -b 160000 -a system.ext2
This system.ext2 is now bootable and you should be able to copy it to your sdcard and run it.
To turn this into a system.sqsh you need to mount it
Code:
mkdir tmp/system-ext2-mnt
mount -o loop system.ext2 tmp/system-ext2-mnt
Then make a squashfs image of the mounted directory
Code:
mksquashfs tmp/system-ext2-mnt/ system.sqsh
Build scripts/environment from loserskater:
http://forum.xda-developers.com/showthread.php?t=585452
ADB setup and Telenet via adb:
enatefox's tutorial for setting up adb and udev
enatefox's tutorial for telenet via adb
Adding a hosts file to block adds
Download this hosts file and copy it to /etc/hosts this should block most adds while browsing in android. Saving you time and bandwidth.
Using google dns servers on your phone:
(mssmision)
connect to the adb shell or from the terminal with su in android type
setprop ro.kernel.android.ndns 2
setprop net.eth0.dns1 8.8.8.8
setprop net.eth0.dns2 8.8.4.4
Basic Theming:
http://forum.xda-developers.com/showpost.php?p=3175504&postcount=1
Tethering via tetherbot and adb.
Download and install adb on your computer.
Download tetherbot and install it in android.
Connect your phone to your computer
Open tetherbot on your phone and push "Start Socks"
Open a terminal on your computer and type
Code:
adb forward tcp:1080 tcp:1080
Open firefox on your computer and type
Code:
about:config
search in the filter for
Code:
network.proxy.socks_remote_dns
change the value from true to false
Go into your network preferences settings in firefox and select manual proxy configuration
In the SOCKS host field enter localhost and TCP port 1080
Select SOCKS_v5
Click OK
Reload firefox and you should be running off your phones data network.
thank you Zen will give it a blast
oooh yeah runs faster!!!
smarty lol do you still need to keep sd card in slot after flashing?
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
are the bad blocks there normal?
ali3nfr3ak said:
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
are the bad blocks there normal?
Click to expand...
Click to collapse
yea thats normal
here is what i did to get it working
1. unsquashfs the system.sqsh
2. move apps folder to desktop
3. then mksquashfs system.sqsh
4. in terminal do(make sure no data.img on desktop)
Code:
dd if=/dev/zero of=./desktop/data.img bs=1048576 count=128
mke2fs -F ./desktop/data.img
sudo mkdir /mnt/data
sudo mount -o loop ./desktop/data.img /mnt/data
sudo mv ./desktop/app /mnt/data/app_s
sudo umount /mnt/data
then copy the data.img and system.sqsh to sdcard
and then make
datafstonand
and
systemfstonand
then right after it starts to boot
A N D R I O D
enabled adb bla bla
then do
adb shell stop
then
ln -s /data/app_s /system/app
then
adb shell start
you should be good if you followed this to the T
jamezelle said:
yea thats normal
here is what i did to get it working
1. unsquashfs the system.sqsh
2. move apps folder to desktop
3. then mksquashfs system.sqsh
4. in terminal do(make sure no data.img on desktop)
Code:
dd if=/dev/zero of=./desktop/data.img bs=1048576 count=128
mke2fs -F ./desktop/data.img
sudo mkdir /mnt/data
sudo mount -o loop ./desktop/data.img /mnt/data
sudo mv ./desktop/app /mnt/data/app_s
sudo umount /mnt/data
then copy the data.img and system.sqsh to sdcard
and then make
datafstonand
and
systemfstonand
then right after it starts to boot
A N D R I O D
enabled adb bla bla
then do
adb shell stop
then
ln -s /data/app_s /system/app
then
adb shell start
you should be good if you followed this to the T
Click to expand...
Click to collapse
you should put the symlink in the system folder before you squash it that way it should boot straight through.
ali3nfr3ak said:
smarty lol do you still need to keep sd card in slot after flashing?
Click to expand...
Click to collapse
if you edit init and put cache in /data you should be able to fully run from nand.
or from adb shell
Code:
cd /
umount /cache
mkdir /data/cache
mount /cache /data/cache
pull your sdcard. look ma running from nand.
zenulator said:
you should put the symlink in the system folder before you squash it that way it should boot straight through.
Click to expand...
Click to collapse
one problem i have is i dont think compcache is being enabled, becaulse im getting home reloads every(yes everytime i hit home(hold cam/redbutton))
can i just add the commands from my hero.user.conf to init or init.hero.rc, or will they not be called right?
jamezelle said:
one problem i have is i dont think compcache is being enabled, becaulse im getting home reloads every(yes everytime i hit home(hold cam/redbutton))
can i just add the commands from my hero.user.conf to init or init.hero.rc, or will they not be called right?
Click to expand...
Click to collapse
when i ran the tattoo build from nand compcache was enabled. make sure you have the config files in your android directory on your sdcard. to check if you have swap enabled go into the terminal or adb shell and type
Code:
free
and see how much ram/swap you have.
also i think
Code:
cat /proc/swaps
will show you what swap is being used.
Zen can u tell me what all the files i need on my sdcard to get this going, i tried for a couple of hours last night to get this going no luck tho, and jamezelle helped me out as well still no luck tho, all i had was on my sdcard was android folder with dzos rootfs.img, system-noapps.sqsh, VOGUIMG.nbh as i flashed from sdcard and app_s.tar.gz
[email protected]:~# adb shell
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# erase_eraseall /dev/mtd/mtd3
/system/bin/sh: erase_eraseall: not found
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
# mount -t vfat /dev/block/mmcblk0p1 /mnt/sdcard/
# losetup /dev/block/loop1 /mnt/sdcard/android/rootfs.img
# mount /dev/block/loop1 /mnt/rootfs-sd
# mount /dev/block/mtd1 /mnt/rootfs-nand/
mount: mounting /dev/block/mtd1 on /mnt/rootfs-nand/ failed: No such file or directory
i cannot get past this part, Do i need more files on sdcard to get going?
ali3nfr3ak said:
Zen can u tell me what all the files i need on my sdcard to get this going, i tried for a couple of hours last night to get this going no luck tho, and jamezelle helped me out as well still no luck tho, all i had was on my sdcard was android folder with dzos rootfs.img, system-noapps.sqsh, VOGUIMG.nbh as i flashed from sdcard and app_s.tar.gz
[email protected]:~# adb shell
# mkdir /mnt
# mkdir /mnt/rootfs-sd
# mkdir /mnt/rootfs-nand
# mkdir /mnt/system-sd
# mkdir /mnt/system-nand
# mkdir /mnt/data
# mkdir /mnt/sdcard
# flash_eraseall /dev/mtd/mtd1
Erasing 128 Kibyte @ d80000 -- 100 % complete.
# flash_eraseall /dev/mtd/mtd2
Erasing 128 Kibyte @ 1a20000 -- 29 % complete.
Skipping bad block at 0x01a40000
Erasing 128 Kibyte @ 5980000 -- 100 % complete.
# erase_eraseall /dev/mtd/mtd3
/system/bin/sh: erase_eraseall: not found
# flash_eraseall /dev/mtd/mtd3
Erasing 128 Kibyte @ 75e0000 -- 92 % complete.
Skipping bad block at 0x07600000
Erasing 128 Kibyte @ 8000000 -- 100 % complete.
# mount -t vfat /dev/block/mmcblk0p1 /mnt/sdcard/
# losetup /dev/block/loop1 /mnt/sdcard/android/rootfs.img
# mount /dev/block/loop1 /mnt/rootfs-sd
# mount /dev/block/mtd1 /mnt/rootfs-nand/
mount: mounting /dev/block/mtd1 on /mnt/rootfs-nand/ failed: No such file or directory
i cannot get past this part, Do i need more files on sdcard to get going?
Click to expand...
Click to collapse
well the last command you typed should be
Code:
mount -t yaffs2 /dev/block/mtdblock1 /mnt/rootfs-nand
also i updated the tutorial to reflect that and also a simplified version along the lines of jamezelle's method of that uses dzo's normal installer so you shouldn't have to type all those commands just use the blank files in the rootfs and make sure you have the rest in /andoroid on your sdcard.
Not sure if you've seen the thread I started on the Kaiser forums. It's really easy to run scripts that I made for building systems.
Check it out
loserskater said:
Not sure if you've seen the thread I started on the Kaiser forums. It's really easy to run scripts that I made for building systems.
Check it out
Click to expand...
Click to collapse
I added a link in the first post. great work.
Installing adb drivers on Windows [Vista,7] x64
NOTE: You don't need to disable driver signing to install! The appropriate .cat files are included in the download.
//Prep
1. Download adb2 posted by dzo. It's on the sourceforge site:
adb2
2. Unpack the zip.
3. In android, go to settings - applications - development and make sure usb debugging is selected.
//Cleanup
4. Open device manager (start - run - devmgmt.msc)
5. Plug in your phone and _watch_ for something new to show up. Might be 'Android Phone.'
6. Confirm that the new device is your phone by unplugging. The device should disappear.
7. Plug back in.
8. Right click on the device and choose 'Uninstall'
9. Check the 'delete this driver from my computer' box.
10. click ok. NOTE: It may take a loong time. Wait.
11. Unplug your phone.
12. If prompted to reboot, do so.
13. Uninstall WMDC (Windows Mobile Device Center)
14. Reboot.
//Install
15. Re-download and reinstall WMDC
16. Plug in your phone.
17. The device driver installation wizard should fail. IF IT INSTALLS THE DEVICE, go back to cleanup.
18. Open device manager.
19. Right click on 'Android Phone' and choose 'update driver.'
20. Click 'Browse my computer for driver software.'
21. Click 'let me pick'
22. Click 'next'
23. Click 'have disk'
24. Click 'browse'
25. Browse to the location where you unzipped adb2.
26. Open the Vista_x64 directory.
27. Choose androidusb.inf
28. Click ok
29. Choose 'HTC, Corporation' as the manufacturer (may not see this)
30. Choose 'My HTC' as the model
31. Click 'next'
32. Click 'yes'
DONE!
Zen, I know we were talking yesterday. Do you think you can outline in detail how to convert an EXT2 or NAND or SD Card based installed system on the vogue into something we can distribute?
I'd really like to share my customized rom with people.
Thanks again for all of your contributions
Ok finally got tattoo booting was having wakeup problems but made system .ext2 then sqsh. But audio still not playing, any ideas? Thanx I did use audio libs from donut rootfs
i thought the libs had to come from an ION build?
Backtrack5 and OpenOffice3.0
xMemphisx said:
Backtrack (http://www.backtrack-linux.org)
Backtrack-Linux.org, home of the highest rated and acclaimed Linux security distribution to date. BackTrack is a Linux-based penetration testing arsenal that aids security professionals in the ability to perform assessments in a purely native environment dedicated to hacking. Regardless if you’re making BackTrack you Install BackTrack, boot it from a Live DVD or thumbdrive, the penetration distribution has been customized down to every package, kernel configuration, script and patch solely for the purpose of the penetration tester.
Here is a guide to getting ARM Backtrack Running on the Iconia A500 (tested on Wifi Only Version, running 3.0.1)
After much frustration I have gotten the GUI part of the backtrack 5 arm release working with the Motorola Xoom.
This has only been tested to work on the Iconia A500 . But it should work just fine with any other device that supports linux, and should work especially well on anything with a dual-core processor (G2X, Atrix, etc.)
Pre-requisites:
- Rooted Iconia A500
- Busybox installed (Find on market Busybox installer)
- androidVNC from the Android Market
- Terminal Emulator from the Android Market (which you should already have)
- Backtrack 5 for ARM with Gnome downloaded and setup (check the README file, and follow the instructions.)
Link: Backtrack 5 http://www.backtrack-linux.org/downloads/. This tutorial will assume you put Backtrack 5 in the folder /sdcard/BT5 like the README says.
Code:
Extract the zip file to your internal SDCARD folder (/SDCARD/BT5)
Open Terminal emulator and type
su
cd /sdcard/BT5
gunzip bt5.img.gz (take about 7-10mins)
sh bootbt
Code:
cd /sdcard/BT5
su
sh bootbt
BackTrack will start up in shell. You will get a red line that says "[email protected]:". To verify if you type:
Code:
ls pentest
It should echo back the folders in pentest, stuff like 'backdoors','database',etc.
At this point enter the following commands:
Code:
export USER=root
vncpasswd
When you type in 'vncpasswd' this is to the the password for the tightvncserver. Since I only connect locally I just use 'qwerty' for my password, and then confirm the password. [Edit] Apparently you can skip this step, as the default password for vnc is simply, 'toortoor' (root backwards, twice).
When it asks if you want to create a view only password just type 'n' and hit enter. After you have your password setup for vnc start the server up.
Code:
[COLOR="Red"]startvnc 1280x800[/COLOR]
When this happens you will get a message confirming that "New 'X' Desktop is localhost:1" and a bunch of other random stuff below it (it isn't important unless there are errors listed).
At this point, press the "HOME" button and then open the application "androidVNC".
-In the "Nickname" box, you can name it whatever you like.
-In the "password" entry, use your password (mine is 'qwerty').
-In the "Address" box you can type in localhost (or leave it blank).
****Change the port from 5900 to 5901.
I also recommend setting the color-depth to 24-bit. After that press the "connect" button, and bam! You're rocking Backtrack 5 on your Iconia A500!!
Code:
In order to exit:
- Go back to Terminal
- Type [B]stopvnc[/B]
- Type [B]exit[/B]
you are back to android terminal environment and ur androidvncviewer will get disconnected.
Click to expand...
Click to collapse
p-ille said:
I tested openoffice 3 and it works like a charm. It is not present in the original backtrack repository, so I had to add another source. I used the Debian repository. From the backtrack terminal I typed:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Click to expand...
Click to collapse
For those who want to access SDCard/USBDrive from within BB5, please follow this:
p-ille said:
I did it!
To mount sdcard, external sd and usb storage in backtrack, you have to modify the bootbt script like this (changes in red):
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/BT5
export bin=/system/bin
export mnt=/data/local/mnt
[B][COLOR="Red"]export stor=$mnt/root/storage
export sdcard=$stor/sdcard
export extsd=$stor/external_sd
export usb=$stor/usb_storage[/COLOR][/B]
mkdir -p $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root[I]
[COLOR="Blue"]export USER=root[/COLOR][/I]
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
mount -o loop,rw,noatime -t ext2 $kit/bt5.img $mnt[B][COLOR="Red"]
echo "mounting storage devices in $stor..."
mkdir -p $sdcard
mkdir -p $extsd
mkdir -p $usb
busybox mount --bind /mnt/sdcard $sdcard
busybox mount --bind /mnt/external_sd $extsd
busybox mount --bind /mnt/usb_storage $usb[/COLOR][/B]
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM for Iconia A500"
[B][COLOR="Red"]umount $sdcard
umount $extsd
umount $usb[/COLOR][/B]
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Click to expand...
Click to collapse
Very nice indeed, will try it out very soon.............
Awesome, just what I have been looking for. I will try this when I get home tonight!
Thanks
lpachuong said:
Here is a guide to getting ARM Backtrack Running on the Iconia A500 (tested on Wifi Only Version, running 3.1)
Click to expand...
Click to collapse
3.1? maybe you means 3.0.1?
After
export USER=root
Click to expand...
Click to collapse
You/can type
startvnc
Click to expand...
Click to collapse
without the need to -geometry 1280x800, and afterward after your session type
stopvnc
Click to expand...
Click to collapse
for a clean disconnect.
Just a faster easier way.
I got I/O errors while mounting devpts and sysfs (bootbt script)
peyotll said:
I got I/O errors while mounting devpts and sysfs (bootbt script)
Click to expand...
Click to collapse
I had the same errors when i had ubuntu installed/and was trying to do this along side.. what I had to do was factory reset (I did so to get rid of ubuntu, there's probably an easier way) then tried backtrack again with no problem
Agosh13 said:
3.1? maybe you means 3.0.1?
Click to expand...
Click to collapse
Hahahaha...I wish =)
Btw, please let me know if you have any special script/suggestion about this topic. I will update the original one so that everyone can get updated.
I'm trying to get OpenOffice running...sadly the ARM version is not that stable. Anyone has any resource on it?
Works perfectly! Thanks for this!
Thanks very much for this guide!
I'm having a strange issue though, hopefully someone can help. When I press the "m" key, rather than type the letter "m", it opens up the mail icon in the tool bar. Every other letter works fine, and I can't seem to find a way to edit this keyboard shortcut.
Anyone else have this issue, or now how to correct this?
thanks a lot - it will work for me without any error or something else
i use the latest update from acer (A500_1.141.01_EMEA_CUS7)
hmm, is there any trick to log off an turn off the system ? when i exit everthing an try to start again i will only see the backtrack wallpaper...
also i got an error in term-emu when i type in "exit".
I added the OP for how to exit.
Thanks for the guide, I have been waiting for something like this!
koprofile said:
Thanks very much for this guide!
I'm having a strange issue though, hopefully someone can help. When I press the "m" key, rather than type the letter "m", it opens up the mail icon in the tool bar. Every other letter works fine, and I can't seem to find a way to edit this keyboard shortcut.
Anyone else have this issue, or now how to correct this?
Click to expand...
Click to collapse
doble-tap (right click) the mail icon in the tool bar and choose to remove it from panel. It should remove the keyboard shortcut also.
lpachuong said:
Hahahaha...I wish =)
I'm trying to get OpenOffice running...sadly the ARM version is not that stable. Anyone has any resource on it?
Click to expand...
Click to collapse
I tested openoffice 3 and it works like a charm. It is not present in the original backtrack repository, so I had to add another source. I used the Debian repository. From the backtrack terminal I typed:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Thank you very much for this guide.
It works like a charm.
Just one question.
I suppose you use a bluetooth keyboard, because the virtual one doesn't seem to work with Backtrack. But is it possible to use a mouse ? Because my big fingers don't match the tiny icons and menu choices !!!
Thanks again.
p-ille said:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Click to expand...
Click to collapse
Thank you for ur script. I haven't had time to play with it due to exams.Anyway, I added them to the original post so that everyone can find it easier.
Regarding to the keyboard...i tried with usb keyboard and it worked fine. I have a BT keyboard but haven't tried it yet. I don't think the mouse will work bcz it is restricted by the VNCViewer
Hi
Tanks for tour tutorial, but i'm having some issue running backtrack:
Code:
# sh bootbt
Loop device exists
ioctl LOOP_SET_FD failed: Bad file number
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bootbt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bootbt: cannot create /data/local/mnt/etc/hosts: directory nonexistent
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM For Xoom
failed.
failed.
failed.
failed.
#
I did check the md5sum of the archive,ok. Busybox ok.
Tanks for your help.
When it asks if you want to create a view only password just type 'n' and hit enter. After you have your password setup for vnc start the server up.
Code:
Code:
startvnc 1280x800
When this happens you will get a message confirming that "New 'X' Desktop is localhost:1" and a bunch of other random stuff below it (it isn't important unless there are errors listed).
Click to expand...
Click to collapse
is it possible to use a different resolution? I tried to use 1280x768 (WXGA read on Wikipedia) but it didn't work.
Hi, Alberto
edit:
Now it works fine! thank you!
Sorry for my first post.
I just realize that I had confused the downloaded archive (.7 z, wich contain all stuff) and the compressed image (. gz), so I did not unpack image before running bootbt.
Unfortunately, the extraction of master archive did not work due to the soft used to extract .7z.
As i mentionned before I've checked the whole archive md5sum but did not check the extracted files.
bt5.img.gz was only 12.59 MB, extracted with androzip. (don't use it, at least for .7z!!)
interesting....
is the wifi adapter working in monitor mode???
Just received...any word on Rooting this bad boy. So Far love ICS!!
+1. We need to root it ASAP. Thanks.
Having some wifi issues...cutting off on randomly...n e thoughts
i wanna root too. maybe try z4? will report back.
dLo GSR said:
i wanna root too. maybe try z4? will report back.
Click to expand...
Click to collapse
Picking mine up after work, hopefully this will get some dev love.
Just a heads up; I picked one of these up on Sunday, tried using Z4 a little while ago, and wasn't able to obtain root. Might try a couple other methods later on. Hopefully this device gets its own subforum pretty soon. Haha.
What sound chip is used in this Tab 2? Did Samsung go back to Wolfson or are they still using the (ugh) Yamaha?
UPDATE: It's a Wolfson WM1811 Stereo CODEC (WM1811AE 22AGKGW)! And.. it sounds great!
I found a universal root method that may be able to help us, but I am no developer. This appears to work on a number of phones and tablets.
https://github.com/saurik/mempodroid/
I'd just like to see the tab 2 get its own sub forum. I'd like to follow any development.
So far so good. I love this little thing. Coming from a nexus s, i really thought Touch Wiz was going to be annoying. Took me no time to adjust.
I havent had any WIFI issues. I connect to several wifi networks in a day. Never a problem.
Sent from my GT-P3113 using XDA
dmuntean said:
I'd just like to see the tab 2 get its own sub forum. I'd like to follow any development.
So far so good. I love this little thing. Coming from a nexus s, i really thought Touch Wiz was going to be annoying. Took me no time to adjust.
Click to expand...
Click to collapse
just grab apex or novalauncher to replace the sammy launcher
GRZLA said:
I found a universal root method that may be able to help us, but I am no developer. This appears to work on a number of phones and tablets.
Click to expand...
Click to collapse
Tu use mempodroid you need the exit and call "offsets", this is the usage command for the Galaxy Nexus:
$ ./mempodroid 0xd7f4 0xad4b mount -o remount,rw '' /system
$ ./mempodroid 0xd7f4 0xad4b sh
#
Galaxy Nexus 4.0.2: 0xd7f4 0xad4b
Does anyone know how to obtain this parameters for the galaxy tab 2 ???
Using this post:
Nesquick95 said:
Saurik's mempodroid exploit needs offsets of "exit" and "setresuid" fuctions calls in order to work.
Here's a tool that may find this two offsets while running on your ICS device and give you the mempodroid command line to run for gaining a temporary root shell.
This tool doesn't add any capability to Saurik's exploit.
Please let me know if you have any idea for improvement.
Feel free to use this tool, at your own risks.
1- download and unzip
2- push the two binaries to /data/local/tmp with adb
3- chmod 755
4- run n95-offsets
5- copy / paste the command line given by the tool
If the trick works, you will see the $ prompt change to a # one.
Hope it will help.
Click to expand...
Click to collapse
I got this offsets for mempodroid:
n95-offsets by Nesquick95
Gets requiered offsets for mempodroid exploit
./mempodroid 0xd904 0xae5f sh
Click to expand...
Click to collapse
But when i try to copy the "su binary" file it still displays error
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb push su /system/bin
failed to copy 'su' to '/system/bin/su': Read-only file system
Click to expand...
Click to collapse
Any clues... anyone ??
do this:
adb push <path to mempodroid> /data/local/tmp/
adb shell
$ chmod 755 /data/local/tmp/mempodroid
$ /data/local/tmp/mempodroid 0xd904 0xae5f sh
# id
what is the output of the id command after running those commands in adb shell?
if it says uid=0 then i'll be happy
elitrix said:
do this:
adb push <path to mempodroid> /data/local/tmp/
adb shell
$ chmod 755 /data/local/tmp/mempodroid
$ /data/local/tmp/mempodroid 0xd904 0xae5f sh
# id
what is the output of the id command after running those commands in adb shell?
if it says uid=0 then i'll be happy
Click to expand...
Click to collapse
This is what i tried on my GT-3113 Galaxy Tab 2:
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
[email protected]:/ $ cd /data/local/tmp
cd /data/local/tmp
[email protected]:/data/local/tmp $ ls
ls
boomsh
busybox
mempodroid
n95-offsets
output
psneuter
sh
zergRush
[email protected]:/data/local/tmp $ chmod 777 mempodroid
chmod 777 mempodroid
[email protected]:/data/local/tmp $ chmod 755 n95-offsets
[email protected]:/data/local/tmp $ ./n95-offsets
n95-offsets by Nesquick95
Gets requiered offsets for mempodroid exploit
./mempodroid 0xd904 0xae5f sh
1|[email protected]:/data/local/tmp $ ./mempodroid 0xd904 0xae5f mount -o remount,rw
'' /system
ae5f mount -o remount,rw '' /system <
then
Code:
1|[email protected]:/data/local/tmp $ ./mempodroid 0xd904 0xae5f sh
./mempodroid 0xd904 0xae5f sh
1|[email protected]:/data/local/tmp $
STILL the '$' sign !!! i dont have "su" privileges, this feels I'm so close...
when i try again with....
Code:
1|[email protected]:/data/local/tmp $ /data/local/tmp/mempodroid 0xd904 0xae5f sh
/data/local/tmp/mempodroid 0xd904 0xae5f sh
1|[email protected]:/data/local/tmp $
I still get the '$' sign instead of the '#'.
exploit doesn't work on this tab then... on to the next.
elitrix said:
exploit doesn't work on this tab then... on to the next.
Click to expand...
Click to collapse
Either that or the offsets reported by n95-offsets are incorrect. I have no idea how reliable it is or how it works though. Wish I had my tablet with me to dig deeper.
machx0r said:
Either that or the offsets reported by n95-offsets are incorrect. I have no idea how reliable it is or how it works though. Wish I had my tablet with me to dig deeper.
Click to expand...
Click to collapse
I went ahead and check the source code for the “n95-offsets” and found that this code searches for a pattern in memory. :
static const unsigned char exit_pattern[8] = { 0xB0, 0xFF, 0xFF, 0xFF, 0x04, 0x46, 0x00, 0x20};
static const unsigned char suid_pattern[8] = { 0xD0, 0x40, 0xE0, 0x3D, 0x68, 0x28, 0x46, 0x29};
Click to expand...
Click to collapse
So maybe it’s a different pattern for the GT-3113, cause it depends on the kernel version, so my theory is that the offsets are incorrect.
I had spoken to saurik and supplied him the run-as from the tab and he confirmed those offsets...of course he could've been using.the same tool on his end didn't ask so take with a grain of salt in the face of your theory.
Chase Bank app, trying to make a check deposit, it fails when it tries to start the camera. The deposit part of the app wants to take pictures of the check front & back. Then it uploads the pictures.
Sent from my Samsung Galaxy Tab 2 7.0
Wifi antenna seems 2 be a little weak..erratic. i think my old dellstreak 5" had better signal....battery sure takes long to charge
How do you bring up My Apps in Play Store on the Samsung Galaxy Tab 2 - 7.0?
Sent from my Samsung Galaxy Tab 2. - 7.0
I have been resisting the urge to flash a custom ROM for a bit, but I really miss having init.d support. So I read a few threads for other phones and rolled my own.
Warnings
I borrowed bits and pieces from various places. If you don't know what init.d is, you probably don't want to do this. If you aren't willing to take responsibility for bricking your tablet, don't do this. Seriously, the risk of bricking is very low, but if you aren't comfortable booting into an adb shell from recovery, maybe this is not for you. Strongly suggest a nandroid backup before you get started so if you totally bork things you can just hit rewind.
Note: The latest CWM may prompt you on a reboot that the ROM may overwrite the bootloader and offer to fix it for you. Don't do that. The init.d hack takes over the bootloader install script, but does not change your bootloader! If you accidentally do let it fix things for you, just rebuild the install-bootloader.sh file. The other steps should be fine.
Prerequisites
First, you need root, busybox, and some sort of terminal (either adb, or some terminal you like using on the tablet).
I have found that I like Busybox Installer (from the market; https://play.google.com/store/apps/details?id=com.jrummy.busybox.installer) but for some reason it doesn't create new symlinks unless you click advanced install.
Let's get to it!
In the shell (don't type # or anything after #):
Code:
su # get root
mount -o remount,rw /system # get access to /system (4.04 seems to mount ro as is usual; seems like the original mounted rw)
which run-parts # if you don't see /system/xbin/run-parts you need to install/reinstall busybox; if it is somewhere else, note it
mkdir /system/etc/init.d
Create a file called sysinit -- we are going to put it in /system/bin. You can edit it in place with vi, mount your tablet and edit it on your computer, or create it on the computer and push it via adb. Whatever.
Here's the file (you do need the # and the things after it in the file!):
Code:
#!/system/bin/sh
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d
Note that if your run-parts is not in /system/xbin (from the which command) then fix the above to reflect your reality.
In the shell, make it executable
Code:
chmod 755 /system/bin/sysinit
Now go in the init.d directory and create some things you want to run at start up. For example:
Code:
cd /system/etc/init.d
echo '#!/system/bin/sh' >99test # note: you do need the first # in this line but not the 2nd!
echo 'date >>/data/tmp/init.d-log.txt' >>99test
chmod 755 99test
Here's a more practical one (yes, you need the # signs). Name it something like 10diskperf -- don't forget to chmod it.
Code:
#!/system/bin/sh
# Set disk read aheads to 1024
chmod 777 /sys/block/mmcblk0/queue/read_ahead_kb
echo "1024" > /sys/block/mmcblk0/queue/read_ahead_kb
chmod 777 /sys/block/mmcblk1/queue/read_ahead_kb
echo "1024" > /sys/block/mmcblk1/queue/read_ahead_kb
chmod 777 /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo "1024" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
Or here is one to tweak some TCP parameters (25sysctl):
Code:
#!/system/bin/sh
sysctl -w net.core.rmem_max=524288
sysctl -w net.core.wmem_max=524288
sysctl -w net.ipv4.tcp_rmem=6144 87380 524288
sysctl -w net.ipv4.tcp_wmem=6144 87380 524288
Whatever files you put in, you need to remember to make them executable (chmod 755).
Finally, you need to kick it all off at start up. The hack for that is we are going to create /system/etc/install-recovery.sh which apparently runs on each boot.
Code:
cd /system/etc
echo '#!/system/bin/sh' >install-recovery.sh
echo '/system/bin/sysinit' >>install-recovery.sh
chmod 755 install-recovery.sh
Tips and troubleshooting
If you are too lazy to cut and paste I have the files here (View attachment init.d-support.zip) that you can just move to the right places and change permission. If you are really lazy there is lightly tested install script below.
I like to try running the whole thing before a reboot to see if I get any errors:
Code:
/system/etc/install-recovery.sh
I'd suggest putting the 99test file in first. Verify that you get the expected file in /data/tmp and then reboot and check again. Then you can remove 99test.
Same goes for adding new scripts. Try running them from the shell to see if they throw errors before you reboot!
If you have trouble, see if this looks right:
Code:
ls -ld /system/etc/install-recovery.sh /system/bin/sysinit /system/etc/init.d /system/xbin/run-parts
-rwxr-xr-x root root 39 2012-07-14 10:00 install-recovery.sh
-rwxr-xr-x root root 140 2012-07-14 10:01 sysinit
drwxrwxrwx root root 2012-07-14 10:10 init.d
lrwxrwxrwx root root 2012-07-14 09:55 run-parts -> /system/xbin/busybox
For the brave
The install-init.d zip file (View attachment install-init.d.zip) contains a lightly tested script that SHOULD do the install steps for you.
Send the file to your android to someplace that can execute code (e.g., /system/xbin; I had to use adb to put it on the sdcard and then move it to /systemxbin in the shell since I don't have the adb root kernel installed).
Code:
cd /system/xbin # or wherever you have it
chmod 755 install-init.d
./install-init.d
It performs rude checks to see if init.d exists, and tries to handle moving or missing busybox. It only installs 99test as a script.
Let me know if this works or doesn't work for you.
For the extra brave: There is no reason this should only work on the Samsung. This ought to work on pretty much most stock ROMs as long as they execute install-recovery.sh on start up.
Scripts
What do you put in your init.d? If you post anything cool I'll put it up here in the op.
One that gave me some real gains in I/O performance required a new version of the tune2fs executable. By default, it is part of busybox but the busybox one only has a few simple options. I've included a stand alone version and the script 10disktune here View attachment disktune.zip. Unpack the zip and put the 10disktune in /system/etc/init.d (don't forget to chmod) and put tune2fs in /system/bin (chmod that too). Note that busybox has one in /system/xbin but the script specifically calls out the one in /system/bin.
Here's one that will zipalign your apks on each boot
Code:
#!/system/bin/sh
for apk in /data/app/*.apk ; do
zipalign -c 4 $apk
ZCHECK=$?
if [ $ZCHECK -eq 1 ]; then
zipalign -f 4 $apk /cache/$(basename $apk)
if [ -e /cache/$(basename $apk) ]; then
cp -p -f /cache/$(basename $apk) $apk
rm /cache/$(basename $apk)
fi;
fi;
done;
Fin
Corrections welcome. I considered using exec or . to load some of this into one shell but given that it runs once at startup, I figured it is fine as is.
All files for reference
View attachment init.d-support.zip
View attachment install-init.d.zip
View attachment disktune.zip
Great guide, gonna try it tonight.
Sent from a GNote, hell yeah!
SirRhor said:
Great guide, gonna try it tonight.
Sent from a GNote, hell yeah!
Click to expand...
Click to collapse
I'm curious how it went. If you ran into any issues, let me know so I can update the op. Thanks!
Hmm did anyone get this to work?
wd5gnr said:
Hmm did anyone get this to work?
Click to expand...
Click to collapse
I did it on my Galaxy Nexus.
It works great, I had a bit of problem with the sysinit file, but when I downloaded your zip file and used your sysinit, it worked, so it must be a problem from my side
Thanks for this, I can finally use "Odex Me"
aavan said:
I did it on my Galaxy Nexus.
It works great, I had a bit of problem with the sysinit file, but when I downloaded your zip file and used your sysinit, it worked, so it must be a problem from my side
Thanks for this, I can finally use "Odex Me"
Click to expand...
Click to collapse
Great, just wanted to be sure I hadn't made any typos/errors in the guide.
A lot of init.d files collected here: http://forum.xda-developers.com/showthread.php?t=1227269
Also build.prop things, etc.
Thanks, I use your guide and worksperfect for my RK3066 devices. Very simple to understand all steps and what we are doing to our system, perfect for me. Thanks again dude
Melch1zedeK said:
Thanks, I use your guide and worksperfect for my RK3066 devices. Very simple to understand all steps and what we are doing to our system, perfect for me. Thanks again dude
Click to expand...
Click to collapse
Glad to help!
What is thhe utility of this?
moliverac8 said:
What is thhe utility of this?
Click to expand...
Click to collapse
Init.d is how Linux and many Android (which is kind of Linux, after all) systems manage executing commands on boot up.
The /etc/init.d files run in numerical order as root and you can do things like change system settings, manipulate the file system, etc.
See the init.d section linked below for some ideas.
http://forum.xda-developers.com/showthread.php?t=1227269
Question? what is the difference in this method and running a script?
wd5gnr said:
Init.d is how Linux and many Android (which is kind of Linux, after all) systems manage executing commands on boot up.
The /etc/init.d files run in numerical order as root and you can do things like change system settings, manipulate the file system, etc.
See the init.d section linked below for some ideas.
http://forum.xda-developers.com/showthread.php?t=1227269
Click to expand...
Click to collapse
I use the "swap memory script" and was wondering if it would also work this way with the init.d If so would there be any benefit this way over the current way of running it one way or the other? One drawback I see running the script as is is that I have to wait once the system has fully booted until the script has run and I see the Smanager screen to let me know that my memory has been remounted.
Thanks for the info and the learning process.
Here is the script and the link.
http://forum.xda-developers.com/showthread.php?t=1961097
Code:
sleep 5
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
sleep 5
mount -o bind /data/media /mnt/extSdCard
As long as the device is ready to mount at boot time and doesn't get remounted, ought to work. Backup and try it
External memory wasn't ready
wd5gnr said:
As long as the device is ready to mount at boot time and doesn't get remounted, ought to work. Backup and try it
Click to expand...
Click to collapse
Thanks for the guide, but I think that the external memory was not ready to be mounted at that time. it didn't see the card till after boot. It was worth a shot, Reverted back to the script in /data and all worked again,
Note: I didn't find /system/xbin/run-parts however, I did find /system/bin/run-parts and changed the path to reflect that, I don't think this was an issue but I'm not 100% sure.
Project thread created..
http://forum.xda-developers.com/showthread.php?t=2627255
install-or-mount-v0.8-gui.zip
Use this thread for help
Device List
Change Log
Sony Xperia P - CM11 4.4.2
Error with
Code:
handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
Needed another command.
ONDR4SH3K said:
Sony Xperia P - CM11 4.4.2
Error with
Code:
handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
Needed another command.
Click to expand...
Click to collapse
I figured that was gonna be an issue.
There are so many variants when it comes to device / busybox, I tried to get around that by including my own binary but fail on my part i guess...
Anyways.
Fix this line
Code:
LINE: 310 handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
to
Code:
handle_error mk2fs.ext2 $IMGLOC/$IMGNAME
userdelroot said:
I figured that was gonna be an issue.
There are so many variants when it comes to device / busybox, I tried to get around that by including my own binary but fail on my part i guess...
Anyways.
Fix this line
Code:
LINE: 310 handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
to
Code:
handle_error mk2fs.ext2 $IMGLOC/$IMGNAME
Click to expand...
Click to collapse
I rewrite with mke2fs -F $IMGLOC/$IMGNAME this working well.
But another problem with debootstrap. See attachment. So it's end of testing, isn't it?
ONDR4SH3K said:
I rewrite with mke2fs -F $IMGLOC/$IMGNAME this working well.
But another problem with debootstrap. See attachment. So it's end of testing, isn't it?
Click to expand...
Click to collapse
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...
in the terminal type
uname
Is that a valid command?
change install-or-mount
Code:
LINE :333 handle_error debootstrap --no-check-gpg --extractor=ar --arch=armhf --foreign $DIST $MOUNT $MIRROR
to
Code:
handle_error debootstrap --no-check-gpg --extractor=ar --arch armhf --foreign $DIST $MOUNT $MIRROR
userdelroot said:
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...
in the terminal type
uname
Is that a valid command?
Click to expand...
Click to collapse
Yes, it print Linux. I try another deboostrap. You use VERSION='1.0.40~ubuntu0.4'. So I find new one.
EDIT: New debootstrap with the same error.
ONDR4SH3K said:
Yes, it print Linux. I try another deboostrap. You use VERSION='1.0.40~ubuntu0.4'. So I find new one.
EDIT: New debootstrap with the same error.
Click to expand...
Click to collapse
Yea, it has to do with the line above I believe.
userdelroot said:
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...
in the terminal type
uname
Is that a valid command?
change install-or-mount
Code:
LINE :333 handle_error debootstrap --no-check-gpg --extractor=ar --arch=armhf --foreign $DIST $MOUNT $MIRROR
to
Code:
handle_error debootstrap --no-check-gpg --extractor=ar --arch armhf --foreign $DIST $MOUNT $MIRROR
Click to expand...
Click to collapse
Sry, not working, but I deleted line with checking architecture and I got new error. See attachment.
EDIT:
I use:
sh install-or-mount -i -n linux.img -m /data/local/chroot -l /data/local -o precise -0
Rewrited mk2fs line in install-or-mount file to: mke2fs -F $IMGLOC/$IMGNAME
Deleted if [ -z "$ARCH" ] || [ -z "$HOST_OS" ]; then error 1 WHATARCH "Couldn't work out current architecture" fi line in deboostrap file
I think if I deleted this line, chroot not mounted correctly and bootstrap can't continue. So we need figure out, how fix architecture error.
I found this: http://uyirpodiru.blogspot.cz/2012/08/debootstrap-error-e-couldnt-work-out.html
ONDR4SH3K said:
Sry, not working, but I deleted line with checking architecture and I got new error. See attachment.
EDIT:
I use:
sh install-or-mount -i -n linux.img -m /data/local/chroot -l /data/local -o precise -0
Rewrited mk2fs line in install-or-mount file to: mke2fs -F $IMGLOC/$IMGNAME
Deleted if [ -z "$ARCH" ] || [ -z "$HOST_OS" ]; then error 1 WHATARCH "Couldn't work out current architecture" fi line in deboostrap file
I think if I deleted this line, chroot not mounted correctly and bootstrap can't continue. So we need figure out, how fix architecture error.
I found this: http://uyirpodiru.blogspot.cz/2012/08/debootstrap-error-e-couldnt-work-out.html
Click to expand...
Click to collapse
All the errors you are getting I did get at one point, I forgot how I fixed them, cause I was working on another project..
Ill do some testing, as I am working on the code right now.
Ill post when I find a solution to those..
Also before continuing I wanted to just let you know.
the debootstrap requires 'ar' archiver which I do not believe comes with CM.
busybox ar
That is why I included my own version.
I may have some work arounds tho so give me a few..
userdelroot said:
All the errors you are getting I did get at one point, I forgot how I fixed them, cause I was working on another project..
Ill do some testing, as I am working on the code right now.
Ill post when I find a solution to those..
Also before continuing I wanted to just let you know.
the debootstrap requires 'ar' archiver which I do not believe comes with CM.
busybox ar
That is why I included my own version.
I may have some work arounds tho so give me a few..
Click to expand...
Click to collapse
New vesion 0.2 in attachment. Is on the way.
EDIT: I put busybox from /sbin to /system/xbin and it looks like deboostrap working, but you have error with Release. Attachment no.3.
Thanks for helping.
is it normall ubuntu for desktop or Ubuntu phone version?
desktop
JFizDaWiz said:
desktop
Click to expand...
Click to collapse
I'm confused
Does touch work? Or do we need OTG cables
milestoneman said:
I'm confused
Does touch work? Or do we need OTG cables
Click to expand...
Click to collapse
You need root, and an android device.
No OTG cables..
It build's a chroot image on the device, with android running in the background.
You can run X windows (only LXDE currently because it is lightwieght) on the device and then vnc into it from anywhere, even a desktop...
There are other tools out there for this however, they require you to download the images. Which are usually between 1gig - 4gigs.
Instead of downloading the images, this creates the image and only downloads approximately 200megs for the packages.
Thanks for the explanation, sounds great
Sent from my Nexus 7 using Tapatalk
ONDR4SH3K said:
New vesion 0.2 in attachment. Is on the way.
EDIT: I put busybox from /sbin to /system/xbin and it looks like deboostrap working, but you have error with Release. Attachment no.3.
Thanks for helping.
Click to expand...
Click to collapse
Yea, crap, that was my bad, I should check where the system busybox is installed. It should default to /system/xbin
But some roms I guess put it in /system/sbin ? Possibly a typo on the rom developers part? LOL
Anyways, I will add code to correct this.
EDIT: How did you fix image 2?, as it should stop at the error in image type every time.
At any rate, image 2 error is because it can't find sh. in the install-or-mount/bin directory type this..
ls -l bin/
Make sure sh is symlinked to /system/bin/sh or /system/xbin/busybox if not that is causing the error in picture 2
it should look like this...
ls -l bin/
sh sh -> /system/xbin/busybox
If you don't see that do the following:
cd /data/local/install-or-mount
busybox touch bin-configs/sh
rm -rf .bin-configs-done
if you have something like that it should be ok, however to be safe since you moved you your busybox
from inside install-or-mount
rm -rf .bin-configs-done
Yes there is a DOT in front of bin-configs-done
I receive a permission denied error with debootstrap as well
Edit: crap I didn't see all the replies up there
Sent from my GT-N7105 using Tapatalk
Will it works on my armv7 single core tablet?
I fix it other way:
mount -o remount,rw /system
cp busybox /sbin /system/xbin
mount -o remount,ro /system
I hope that commands are fine.
I has no solution for fetch Release error, yet. I tried rewrite URL, but unsussesful.
Its in scripts folder line mirror_styles Release
Sent from my Xperia P using xda app-developers app
---------- Post added at 01:06 AM ---------- Previous post was at 01:00 AM ----------
Already testing on armv7 device dual core. OP must fix a few errors but you can try it.
Sent from my Xperia P using xda app-developers app