[Q]boot backtrack5 via android failed - General Questions and Answers

hi all!
I've read tutorial how to boot backtrack5 from android phone at here http://forum.xda-developers.com/showthread.php?t=1074723#
and I've tried, but I always get failure
this is my screenshot :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
my phone is SE XPERIA ARC S.
FYI, this is my bootbt script :
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
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
mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
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 Xoom"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
help me

Reply:
tesgan said:
hi all!
I've read tutorial how to boot backtrack5 from android phone at here http://forum.xda-developers.com/showthread.php?t=1074723#
and I've tried, but I always get failure
this is my screenshot :
my phone is SE XPERIA ARC S.
FYI, this is my bootbt script :
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
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
mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
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 Xoom"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
help me
Click to expand...
Click to collapse
click on the link and try post no 600
http://forum.xda-developers.com/showthread.php?t=1079898&page=60

Related

[Q] spending lots of time with segmentation fault error (chroot)

spending lots of time with segmentation fault error (chroot)
I success to open up ubuntu GUI on my android
with following site
(first googled site with "cyanogenmod ubuntu")
but fail with other imgs(such as img in nexusonehack)
for now, I am trying to bootup ubuntu 10.10 on my gw620(smart phone whose cpu is ARMv6 Qualcomm MSM7200)
by my self.
with selfmade rootstock img and busybox and chroot
I made img my self withroot stock with following option
rootstock -f kty1104-Notebook -l kty1104 -p 1 --imagesize 2047M --notarball --seed linux-image-omap,lxde,build-essential,openssh-server,tightvncserver,x11-xserver-utils
and change name to ubuntu.img and place to /sdcard/
and apply to bootubuntu.sh
bootubuntu.sh contents is this
===============================================
#!/system/bin/sh
# Original script by Paolo Sammicheli xdatap1
#
# Based on Saurik's remount.sh modified version by Mark Walker of
# URL is here but I can't write url b/c of my account privilege
# Modified version for Cyanogenmod by potoc samdroid
mkdir /mnt/ubuntu
#remount system as read/write
remount rw
export mnt=/mnt/ubuntu
export PATH=/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export kit=/sdcard
export loopdev=/dev/block/loop4
losetup $loopdev $kit/ubuntu.img
mount -t ext2 $loopdev $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
cat $mnt/root/logo.txt
echo " "
echo "Type EXIT to end session"
echo "Make sure you do a proper EXIT for a clean umount!"
echo " "
echo "Please reboot your device when you finished your work."
chroot $mnt /bin/bash
busybox umount -f /mnt/ubuntu/dev/pts /mnt/ubuntu/proc /mnt/ubuntu/sys /mnt/ubuntu
===============================================
do I need more option for rootstock?
or do I need special sh file for it?
I can mount ubuntu.img with
# mknod -m640 /dev/loop0 b 7 8
losetup /dev/loop0 /sdcard/ubuntu.img
mount -t ext2 /dev/loop0 /mnt/ubuntu
but when it comes to chroot, it sprit [1] segmentation fault chroot ${mnt} /b...#
if there are missing information please let me know, I will write it down
Regards.
Taeyun
I know I musn't revive old threads... but the question and the problem is already set up here.
I'm having the same problem with my HTC Magic 32A. Anybody knows what's up with the segfault?
Thanks!
I've spent a lot of time on this issue too, and as far as I can tell it's because Ubuntu versions over 9.04 (jerking jackalope or whatever idiot name they use) no longer support ARMv6. This means I can't run BT5, which is based on 10.x, but I believe Debian still supports v6.

Backtrack issue HTC jetstream

Greetings.
Ive used following script , HTC jetsteam rooted unlocked bootloader.
Code:
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/bt
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
mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
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 Xoom"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
but keep getting error message .
can't execute /bin/bash no such file or directory.
Hope to hear from you guys.
Regards
Net_Spy
May be u might not have busybox installed after rooting ur phone
Hit thanks rather than typing it
Well I do have busybox installed in my device.
Regards
Net_Spy

[Script]RemEdit (Edit files from phone in native text editor)

I made this script just now to have the ability to edit files from the phone, opened directly in your default text editor on your pc, when saving the file and pressing enter in the script the file will be pushed back to your phone and sets it to the right permission. Just some handy little script which becomes very useful when you want to test out scripts on your phone
the platform-tools path of android sdk must be accessible globally for adb.
.bashrc
Code:
export PATH=${PATH}:~/android-sdk/platform-tools
#!/bin/bash
Code:
#Edit files on your phone like editing local files
#Copyright 2013 broodplank.net
#Revision 3
if [[ $1 = "" ]]; then
echo "usage: remedit [remote path]"
echo " example: remedit /system/build.prop"
exit
else
DIR=${1%/*}
FILE=${1##*/}
fi;
if [[ -e mode ]]; then
rm -f mode
fi;
adb get-state > state
export DEVICESTATE=`cat state`;
rm -f state
if [[ ${DEVICESTATE} != 'device' ]]; then
echo "Waiting for device..."
echo "Make sure debugging mode is enabled"
adb 'wait-for-device'
echo "Device found"
fi;
adb -d shell ls -l ${1} | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) \
*2^(8-i));if(k)printf("%0o ",k);print}' > mode
if [[ -e modenew ]]; then
rm -f modenew
fi;
head -c 3 mode > modenew
export FILEMODE=`cat modenew`;
if [[ -e mode ]]; then
rm -f mode
fi;
if [[ -e modenew ]]; then
rm -f modenew
fi;
echo
echo "Remote Path: '${DIR}'"
echo "Remote File: '${FILE}'"
echo "Remote Mode: '${FILEMODE}'"
echo
cd ${PWD}
if [[ -e $FILE ]]; then
rm -f $FILE
fi;
adb pull $1 $FILE
xdg-open $FILE
echo
echo "Press enter when you're done editing the file"
read -p [enter]
echo
adb remount
adb push $FILE $1
adb -d shell busybox chmod ${FILEMODE} ${1}
echo
echo "Pushed new version of: ${FILE} located in: ${DIR} with mode: ${FILEMODE}"
if [[ -e $FILE ]]; then
rm -f $FILE
fi;
Output:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hi brood
i'm not a great scripter, but one word to your script. I'm use Lubuntu and there is Leafpad the default Editor. I think it is unnecessary to install "gedit" if it is not installed. If you use in your script the line
Code:
xdg-open $FILE
instead of
Code:
gedit $FILE
the file will open with the default Editor of the DE.
Keep up your great work :good:
regards....busprofi
busprofi said:
Hi brood
i'm not a great scripter, but one word to your script. I'm use Lubuntu and there is Leafpad the default Editor. I think it is unnecessary to install "gedit" if it is not installed. If you use in your script the line
Code:
xdg-open $FILE
instead of
Code:
gedit $FILE
the file will open with the default Editor of the DE.
Keep up your great work :good:
regards....busprofi
Click to expand...
Click to collapse
Thanks. Im also not a great bash scripter. Thnx for the tip, will add it to the code as soon as im at my computer
edit: added it
New version, more compatibility, also shows the syntax and stops the script when no input is given

[Script]REMEDIT (Edit files from phone in native text editor)

I made this script just now to have the ability to edit files from the phone, opened directly in your default text editor on your pc, when saving the file and pressing enter in the script the file will be pushed back to your phone and sets it to the right permission. Just some handy little script which becomes very useful when you want to test out scripts on your phone
the platform-tools path of android sdk must be accessible globally for adb.
.bashrc
Code:
export PATH=${PATH}:~/android-sdk/platform-tools
~/bin/remedit (set to rwx)
Code:
#!/bin/bash
#Edit files on your phone like editing local files
#Copyright 2013 broodplank.net
#Revision 2
DIR=${1%/*}
FILE=${1##*/}
if [[ -e mode ]]; then
rm -f mode
fi;
adb -d shell ls -l ${1} | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) \
*2^(8-i));if(k)printf("%0o ",k);print}' > mode
if [[ -e modenew ]]; then
rm -f modenew
fi;
head -c 3 mode > modenew
export FILEMODE=`cat modenew`;
if [[ -e mode ]]; then
rm -f mode
fi;
if [[ -e modenew ]]; then
rm -f modenew
fi;
echo
echo "Remote Path: '${DIR}'"
echo "Remote File: '${FILE}'"
echo "Remote Mode: '${FILEMODE}'"
echo
cd ${PWD}
if [[ -e $FILE ]]; then
rm -f $FILE
fi;
adb pull $1 $FILE
xdg-open $FILE
echo
echo "Press enter when you're done editing the file"
read -p [enter]
echo
adb remount
adb push $FILE $1
adb -d shell busybox chmod ${FILEMODE} ${1}
echo
echo "Pushed new version of: ${FILE} located in: ${DIR} with mode: ${FILEMODE}"
if [[ -e $FILE ]]; then
rm -f $FILE
fi;
Output:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

[GUIDE] Internal /data on external storage

Hello XDA community!
I'm just a noob android user, but I've used GNU/Linux for several years so I'm not so lost in this things
I'm the owner of a Galaxy Pocket Neo and this guide was tested in this smartphone, but i have checked other galaxy smartphones based on jelly bean and the directories and partitions structure of the phones are almost the same, so it should work for those
I'd like to make this guide more general so it'll be good if some of you give me some information about the partition structure and folders of your phones
Note: this is very dangerous and I'm not responsible of the data you may lost​but in fact there is almost no risk
What you need:
Rooted phone with busybox
Partition table app
ROM Toolbox Lite app
Linux knowledge ( but you can always ask for help )
An 8gb MicrosdHC class 6 or superior
So let me explain what we're gonna do, your device's memory is not enough for all those apps you want to install that's not good. There are a lot of apps that link your apps to the extSdCard but all of them (at least the ones that I've tried) have problems with the widgets and other limitations, so lets do it ourself.
My hipothesis: I think I can mount a partition of my sdcard on the /data folder, yeah of course I can!
Procedure
First backup everything (phone and sdcard)
Then open the Partition Table app and toggle advanced mode you should see something like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
now you should look for a partition that is mounted on /data folder and check the filesystem it has, in my phone is the mmcblk0p12 with a ext4 filesystem
next thing you need to do is to partition your sdcard with 2 partitions the first will be your extSdCard storage with a fat filesystem the other will be the new /data folder in my case with a ext4 filesystem, now, you must consider that the /data partition in your phone is both internal storage for apps, and emulated internal storage, so make sure that the second partition of your sdcard is bigger than 8gb if internal and emulated are 4gb sized, for make this worth
there is an app for making partitions on the play store but i haven't tried it
in my 32gb sdcard I made an 26gb fat partition and a 4gb ext4 partition
you should see this in Partition table
We're now half way there
now go to the Rom Toolbox app and open the scripter and make a new script
Code:
#!/system/bin/sh
mount -t ext4 [COLOR="Red"]/dev/block/mmcblk1p2 /storage/UsbDriveA[/COLOR]
cp -af /data/* /storage/UsbDriveA/
cp -af /data/.* /storage/UsbDriveA/
cp -af /data/*/.* /storage/UsbDriveA/
cp -af /data/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
cp -af /data/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/.* /storage/UsbDriveA/
this may take long time
you may get some errors like 'cannot stat on */*/*/*/.* directory doesn't exist' or something like that, is normal
the red coloured text may change from phone to phone, so here is where you need some linux knowledge, I think there is a better way for do the script but this one work for me, if someone can improve it, it willl be great
so, now we have an exact copy of /data and /storage/sdcard0 in our microsd so let's mount it in the /data folder
Note: before you do this turn off wifi, bluetooth, gps, and deactive the android device manager, prey or other services like that
Now run this script
Code:
#!/system/bin/sh
mount -t ext4 /dev/block/mmcblk1p2 /data && killall system_server
this will do a fast reboot on your phone, and the first time may take even 10 min to boot, don't worry your phone is not bricked, if you get tired of waiting, you can press and hold the power button and your phone will reboot as if nothing had happened
now if it finally boot, you're not going to see something different, but some apps (especially google apps) will crash, this happens a few times you only need to clear the cache, and chek that the wifi direct is working, now you can activate android devce manager, prey, etc
now go to the storage menu, do you see that?
From this
to this:
but we have not finished yet, restart your phone, now you're again on your original /data partition, go to rom toolbox and set the second script at boot (the script will have some delay so the phone will show the boot animation twice), or if you have init.d support then put the script in the /etc/init.d folder with the right permissions
restart again and you're done.
You can do some little changes in the script, like
this is more stable
Code:
#!/system/bin/sh
mount -t ext4 -o nosuid -o nodev -o noatime -o discard -o noauto_da_alloc -o journal_async_commit /dev/block/mmcblk1p2 /data && killall system_server
this is more dangerous
Code:
#!/system/bin/sh
mount -t ext4 /dev/block/mmcblk1p2 /data && mount -t ext4 /dev/mmcblk0p12 /data/media && killall system_server
or
dangerous
Code:
#!/system/bin/sh
mount -t ext4 /dev/block/mmcblk1p2 /data && mount -t ext4 /dev/mmcblk0p12 /storage/sdcard0 && killall system_server
That's all any suggestion question or anything else, just comment
Sorry for my bad english if you find some mistake or if it's not clear what i'm trying to say, please correct me so I can fix it
Si necesitas ayuda en español, comenta en español

Categories

Resources