BT5 on android( i have tab 2+ pasted bt5.img on ext. card) - Upgrading, Modifying and Unlocking

perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
busybox mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/storage/extSdCard/BT5
export bin=/system/bin
export mnt=/data/local/mnt
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
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
busybox mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t proc proc $mnt/proc
busybox 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 Xoom"
busybox umount $mnt/dev/pts
busybox umount $mnt/proc
busybox umount $mnt/sys
busybox umount $mnt
THIS WORKS ON TAB 2 ....when you have the BT5 folder on external card!!!!!!!!
obv. rooted tab 2 :silly:
mail me for more solutions for your probs !!!!!

Related

A2SD APPS2SD 40a2sd init startup script editing

i am trying to change the init script for APP2SD by [email protected] (cyanogen). it is the standard script for all custom roms.
i want move dalvik cache back to phone memory and app, app-private and data to system/sd. data/data/ is normally moved back to phone memory by the script if someone moves it to system/sd/ due to "compatibility" reasons.
i have edited the script and removed this part.
the problem is that after installing some apps, etc. phone memory is at 13mb and one cant install any additional apps.
also, how do i replace the previous 40a2sd script? i ran into a wall when trying...
THX
------------------------------------------------------------------------------------------------------------------------------------------------
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# [email protected] (cyanogen)
# Adapted for Modaco Custom Rom by Teknologist
#Removed this as there is no /etc/sysctl.conf as of now in MCR
#sysctl -p
# execute any postinstall script then kill it
if [ -e /dev/block/mmcblk0p2 ];
then
# mount and set perms
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /system/sd;
busybox chown 1000:1000 /system/sd;
busybox chmod 771 /system/sd;
# clean up any old symlinks, create data directories
for i in data;
do
if [ -h /data/$i ];
then
rm /data/$i;
fi;
if [ ! -d /data/$i ];
then
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
# move apps from internal memory to sdcard
for i in app app-private dalvik-cache;
do
if [ ! -d /system/sd/$i ];
then
mkdir /system/sd/$i;
fi
busybox chown 1000:1000 /system/sd/$i;
busybox chmod 771 /system/sd/$i
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox cp -a /data/$i/* /system/sd/$i/;
busybox rm -f /data/$i/*;
fi;
done;
# symlink app dirs - they must be on the same filesystem
for i in app app-private dalvik-cache;
do
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox rm -rf /data/$i;
busybox ln -s /system/sd/$i /data/$i;
fi;
done;
# clean up old whiteouts
for i in local misc property system tombstones data;
do
if [ -h /system/sd/$i ]; then rm -f /system/sd/$i; fi
done;
# please don't put odex files in the app directory people!
# it causes dexopt to crash when switching builds!
busybox rm -f /system/sd/app/*.odex
setprop cm.a2sd.active 1;
echo "+++ Apps-to-SD successfully enabled";
else
# replace symlinks with directories so we can boot without sd
for i in app app-private dalvik-cache;
do
if [ -h /data/$i ];
then
rm -f /data/$i;
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
setprop cm.a2sd.active 0;
fi;
sync;

[Q] My GoogleMaps (or other application that uses OpenGL) is freezing/irresponsive

16) My GoogleMaps (or other application that uses OpenGL) is freezing/irresponsive. What can I do?
Open terminal or adb shell and type these commands:
Code:
$ su
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# echo sysctl -w vm.min_free_kbytes=4096 >> /system/etc/install-recovery.sh
# chmod 744 /system/etc/install.sh
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Hi all i have some question about this!
So this is a countermeasure like a mod? I type it in then everything goes well?
Or i have to type it after every restart?
and if i write this it kills the app or it will run before the freezing?
is this working with opengl games?.
Thanks!
Ernő
when i tried typing this line
# chmod 744 /system/etc/install.sh
no such file exists
maybe this?
# chmod 744 /system/etc/install-recovery.sh
PS: Has this anything to do with recovery 2ndinit or something?
not exactly sure what this does, I think it makes sure at least 4096kb of RAM is free.
but try
$ su
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# echo vm.min_free_kbytes = 4096 >> /system/etc/sysctl.conf
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
# sysctl -p
it worked for me and has kept the setting after restarts
Just download sysctl in market and set it at 4096 it higher. If you have setvsel, it had option to increase min kb to 4096
Sent from my MB525 using XDA App
My Defy 2.2 also freezes when trying Maps (the only one that works is 5.0.0) - so I've tried sysctl with 8192 at min. kb. free.
No success, still freezing with 5.6.0/5.7.0 .
Uninstall updates in maps then update a fresh one.
Sent from my MB525 using XDA App

Backtrack 5 Note 2

Right guys,
I am a bit of a nub and i need some help.
Need bt5 on my note 2 as part of a course.
Had it working fine then exited when done. Wouldnt re-open.
Deleted the BT5 folder i created and started from scratch but all i get is
#sh boot bt
bootbt[30]:syntax error: 'if' unmatched
this is my boot file
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires 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
export sdcard=/mnt/sdcard
export extsd=/mnt/extSdCard
export USER=root
if [ ! -d "$mnt" ]; then
mkdir $mnt
fi
export PATH=$bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop255 ]; then
echo "Loop device exists"
else
busybox mknod /dev/block/loop255 b 7 255
fi
#mount -o loop,noatime -t ext2 $kit/BT5.img $mnt
losetup /dev/block/loop255 $kit/bt5.img
mount -t ext2 /dev/block/loop255 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
mount -o bind /mnt/sdcard $sdcard
mount -o bind /mnt/extSdCard $extsd
if [ ! -d "/data/local/mnt/sdcard" ]; then
mkdir /data/local/mnt/sdcard
fi
busybox mount -o bind /sdcard /data/local/mnt/sdcard
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
echo "Back Track is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig wlan0
echo " "
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM"
umount $sdcard
umount $extsd
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop255

Busybox command softlinker

Have busybox? Wish you could type "grep foo" instead of "busybox grep foo" ? This simple shell script checks your busybox for supported commands and softlinks them from /system/bin to wherever the first busybox it finds in the $PATH is.
Since I screwed up my links a couple times making this, there's also a script that strips every link to busybox out of /system/bin.
These scripts do basically no error checking. They require root access, but they don't check for it. If you don't know how to read a script to see what it does before you run it, don't run it.
That said, it's handy.
Code:
#!/system/bin/sh
# linky.sh: softlink busybox to all the commands it supports
# Now with zero error checking! Beware :P
# -speef
busybox &>/dev/null || exit 1
bbl=`busybox which busybox`
ready=0
busybox mount -o rw,remount /system
>./linky.log
for cmd in `busybox`
do
cmd=`echo $cmd|busybox awk -F, '{print $1}'`
if [ $ready -eq 0 ]
then
if [ $cmd == "functions:" ]
then
ready=1
continue
else
continue
fi
fi
echo ln -s $bbl /system/bin/$cmd
busybox ln -s $bbl /system/bin/$cmd &>> linky.log
done
busybox mount -o ro,remount /system
echo "see ./linky.log for errors!"
And its counterpart, which removes all links to busybox from /system/bin:
Code:
#!/system/bin/sh
# delinky.sh: remove all busybox links from /system/bin
# Now with zero error checking! Beware :P
# -speef
busybox &>/dev/null || exit 1
busybox mount -o rw,remount /system
for cmd in `busybox find /system/bin -type l -exec ls -l \{\} \; | busybox grep busybox|busybox awk '{print $6}'`
do
echo rm /system/bin/$cmd
busybox rm /system/bin/$cmd
done
busybox mount -o ro,remount /system

ERROR: chroot: can't execute "/bin/bash" no such file or directory on Android

ERROR: chroot: can't execute "/bin/bash" no such file or directory on Android
Hi guys,
I have a problem with "change root" command when I setup ubuntu to run on android. My tablet is Samsung galaxy tab 3 10.1, android 4.4.2 . I followed this tutorial step by step: galaxytabhacks.com/galaxy-tab-10-1-hacks/how-to-install-ubuntu-linux-on-galaxy-tab-10-1-tabuntu(excuse me, I can't post link, please copy and paste help me) but when I run "bootubuntu" script it threw error as title above.
This is bootubuntu script
Code:
#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export bbox=/system/xbin/busybox
$bbox mknod /dev/block/loop255 b 7 255
$bbox losetup /dev/block/loop255 /sdcard/ubuntu/ubuntu.img
$bbox mount -t ext2 /dev/block/loop255 /data/local/ubuntu
$bbox mount -t devpts devpts $mnt/dev/pts
$bbox mount -t proc proc $mnt/proc
$bbox mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash #error here
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
$bbox umount $mnt/dev/pts
$bbox umount $mnt/proc
$bbox umount $mnt/sys
$bbox umount $mnt
$bbox losetup -d /dev/block/loop255 &> /dev/null
And this is result
Code:
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOneHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
[email protected]:/sdcard/ubuntu # bootubuntu
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
Setting localhost on /etc/hosts
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
1|[email protected]:/sdcard/ubuntu #
I read lot of thread about this error, but it on ubuntu only so I can't solve it.
Can anyone help me? Thanks so much!
this only my suggestion pal but do you have the bash binary
ballerd said:
this only my suggestion pal but do you have the bash binary
Click to expand...
Click to collapse
I don't have bash file and bin dir, I dont know how to find it too

Categories

Resources