I keep having problems and this is what I get. I am using the Ubuntu installer app btw.
$ export PATH=/data/local/bin:$PATH
$ su
# cd sdcard
# cd ubuntu
# sh ubuntu.sh
Checking loop device... FOUND
losetup: /dev/block/loop255
Error: Unable to attach image to loop device! (Image = ./ubuntu.img)
#
Sent from my SAMSUNG-SGH-I717 using xda premium
kmkikofour8 said:
I keep having problems and this is what I get. I am using the Ubuntu installer app btw.
$ export PATH=/data/local/bin:$PATH
$ su
# cd sdcard
# cd ubuntu
# sh ubuntu.sh
Checking loop device... FOUND
losetup: /dev/block/loop255
Error: Unable to attach image to loop device! (Image = ./ubuntu.img)
#
Sent from my SAMSUNG-SGH-I717 using xda premium
Click to expand...
Click to collapse
Do you have busybox installed?
Yes I do
Sent from my SAMSUNG-SGH-I717 using xda premium
Hi guys!
I created this thread mainly because many useful things can be done in Terminal emulator. I will show you some simple commands which are useful.
Very useful if you don't have Root explorer when you need it.
Make sure you take a Nandroid backup before you try out just in case you can restore when you do something wrong!
You can get terminal Emulator from here: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Note: Most commands need root. So type su and press enter and grant superuser permissions to Terminal Emulator!
First type this command before using any of the commands below just in case(needs root)
Code:
su
Some useful commands:
Turning device off (Turns your device off very fast!! ):
Code:
poweroff
Rebooting:
Code:
reboot
Rebooting to Recovery
Code:
reboot recovery
Rebooting to download mode:
Code:
reboot download
Forcing Most Apps to install to SDcard(Root needed with Terminal Emulator, no need root with ADB):
Code:
pm setInstallLocation 2
Alternatively, you can type 0 at the end instead of 2 for Auto location install mode or 1 for Internal memory install mode
To check what the current install location is:
Code:
pm getInstallLocation
Mounting R/W in system(Use with caution)
Code:
mount -o rw,remount -t /system
If above one doesnt work, try this.
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Unmounting R/W in system.
Code:
mount -o ro,remount -t /system
If above code doesn't work, try this
Code:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Moving files from sdcard to system (Use after mounting R/W):
Code:
busybox cp /sdcard/<path> /system/<path>
Example: busybox cp /sdcard/demo/framework-res.apk /system/framework/
Changing file permissions to rw-r--r-- (Use after mounting R/W):
Code:
chmod 644 <path>
Example 1: chmod 644 /system/app/mms.apk
Example 2: chmod 644 /system/app/*.apk (This command changes the file permission of all apps in the folder to rw-r--r--)
Changing the current directory:
Code:
cd <path>
Example: cd /sdcard
Listing all the files and folders under the current directory:
Code:
ls
If you want to view all the files and folders in your sdcard, type:
cd /sdcard
ls
Making a new folder:
Code:
mkdir <path>
Example: mkdir /sdcard/newfolder
Removing files (For System files, Use after mounting R/W)
Code:
rm <path>
Example: rm /system/app/demoapp.apk
Removing Folders:
Code:
rmdir <path>
Get info of your build.prop values
Code:
getprop
That's all for now. I will add a few more later!
If you have any more new commands or if I have given an improper command, feel free to post it in the thread
Thanks for reading.
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
UserU said:
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
Click to expand...
Click to collapse
I don't understand your question...
Anyways...Thanks for reminding me of that command!
system.img said:
I don't understand your question...
Anyways...Thanks for reminding me of that command!
Click to expand...
Click to collapse
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
u0 [email protected]:/ $ pm set-install-location 2
Killed
137|u0 [email protected]:/ $
Click to expand...
Click to collapse
UserU said:
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
Click to expand...
Click to collapse
I never got that problem on adb.
Let me see....
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
panpjp said:
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
Click to expand...
Click to collapse
Isnt it /system?
ok...will add to op.
Thanks.
system.img said:
Isnt it /system?
ok...will add to op.
Thanks.
Click to expand...
Click to collapse
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
panpjp said:
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
Click to expand...
Click to collapse
Ok....
system.img said:
I never got that problem on adb.
Let me see....
Click to expand...
Click to collapse
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
UserU said:
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
Click to expand...
Click to collapse
I got it.
It needs root.
So type
su
pm set-install-location 2
Then you are done!
wow thanks !!
Bassesh said:
wow thanks !!
Click to expand...
Click to collapse
Welcome!
Useful
A question: once i tried to type
bootanimation
Click to expand...
Click to collapse
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Toni5830 said:
Useful
A question: once i tried to type
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Click to expand...
Click to collapse
That is the use of the bootanimation command. You can stop it either by pulling battery or closing terminal emulator!
But what I did to stop it was to rotate my phone to landscape and somehow close terminal emulator.
But in ADB it is easier to stop using exit command.
how to get info about /system memory and /data memory ?
rajxelton said:
how to get info about /system memory and /data memory ?
Click to expand...
Click to collapse
What info do you exactly want? Free Space, Partition Size or Used space?
system.img said:
What info do you exactly want? Free Space, Partition Size or Used space?
Click to expand...
Click to collapse
partition size. well can you tell me for all.
Anyone know a command to trigger media scanner?
Thanks for the commands. Quite new to all of this and these will help me understand things a little better
Hey guys, im studying digital system security at uni and need help getting backtrack to work on my transformer prime tf201.
i rooted the device using motochopper, and installed ota rootkeeper and titanium backup.
i have the backtrack image in sdcard/backtrack/backtrack.img
when i used the complete linux installer to install busybox and run the image, it comes up with this:
[email protected]:/ $
[email protected]:/ $ cd /sdcard/backtrack
[email protected]:/sdcard/backtrack $ su
d/files/bootscript.sh /sdcard/backtrack/backtrack.img <
Checking loop device... MISSING
Creating loop device... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[129]: /data/data/com.zpwebsites.linuxonandroid/files/busybox: can't execute: Permission denied
FAILED
Error: Unable to create loop device!
1|[email protected]:/storage/sdcard0/backtrack #
any help? or is it just not possible on the tf201 because the kernel doesnt support it?
Thank you in advance for your input.
I have the same problem with my galaxy note1 and galaxy tab10.1.
If you've solved it share it plz..
pypi said:
Hey guys, im studying digital system security at uni and need help getting backtrack to work on my transformer prime tf201.
i rooted the device using motochopper, and installed ota rootkeeper and titanium backup.
i have the backtrack image in sdcard/backtrack/backtrack.img
when i used the complete linux installer to install busybox and run the image, it comes up with this:
[email protected]:/ $
[email protected]:/ $ cd /sdcard/backtrack
[email protected]:/sdcard/backtrack $ su
d/files/bootscript.sh /sdcard/backtrack/backtrack.img <
Checking loop device... MISSING
Creating loop device... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[129]: /data/data/com.zpwebsites.linuxonandroid/files/busybox: can't execute: Permission denied
FAILED
Error: Unable to create loop device!
1|[email protected]:/storage/sdcard0/backtrack #
any help? or is it just not possible on the tf201 because the kernel doesnt support it?
Thank you in advance for your input.
Click to expand...
Click to collapse
pypi said:
Hey guys, im studying digital system security at uni and need help getting backtrack to work on my transformer prime tf201.
i rooted the device using motochopper, and installed ota rootkeeper and titanium backup.
i have the backtrack image in sdcard/backtrack/backtrack.img
when i used the complete linux installer to install busybox and run the image, it comes up with this:
[email protected]:/ $
[email protected]:/ $ cd /sdcard/backtrack
[email protected]:/sdcard/backtrack $ su
d/files/bootscript.sh /sdcard/backtrack/backtrack.img <
Checking loop device... MISSING
Creating loop device... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[129]: /data/data/com.zpwebsites.linuxonandroid/files/busybox: can't execute: Permission denied
FAILED
Error: Unable to create loop device!
1|[email protected]:/storage/sdcard0/backtrack #
any help? or is it just not possible on the tf201 because the kernel doesnt support it?
Thank you in advance for your input.
Click to expand...
Click to collapse
Do an lsmod to see if you have the ext2.ko module installed. When I had the same difficulties doing my own
loopback install of a debian system, that was what fixed the process. I believe I got my copy of ext2.ko from
an xda post. I'll see if I can track it down for you.
---------- Post added at 05:30 PM ---------- Previous post was at 05:05 PM ----------
pypi said:
Hey guys, im studying digital system security at uni and need help getting backtrack to work on my transformer prime tf201.
i rooted the device using motochopper, and installed ota rootkeeper and titanium backup.
i have the backtrack image in sdcard/backtrack/backtrack.img
when i used the complete linux installer to install busybox and run the image, it comes up with this:
[email protected]:/ $
[email protected]:/ $ cd /sdcard/backtrack
[email protected]:/sdcard/backtrack $ su
d/files/bootscript.sh /sdcard/backtrack/backtrack.img <
Checking loop device... MISSING
Creating loop device... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[129]: /data/data/com.zpwebsites.linuxonandroid/files/busybox: can't execute: Permission denied
FAILED
Error: Unable to create loop device!
1|[email protected]:/storage/sdcard0/backtrack #
any help? or is it just not possible on the tf201 because the kernel doesnt support it?
Thank you in advance for your input.
Click to expand...
Click to collapse
Here is a link to a post that has a link to a version of ext2.ko. You have to do an insmod as root, but then the
loopback should work.
http://forum.xda-developers.com/showthread.php?t=833725
Didn't work for me
Didn't work for me. Got failed (Exec format error)
chris...
polymath257 said:
Do an lsmod to see if you have the ext2.ko module installed. When I had the same difficulties doing my own
loopback install of a debian system, that was what fixed the process. I believe I got my copy of ext2.ko from
an xda post. I'll see if I can track it down for you.
---------- Post added at 05:30 PM ---------- Previous post was at 05:05 PM ----------
Here is a link to a post that has a link to a version of ext2.ko. You have to do an insmod as root, but then the
loopback should work.
http://forum.xda-developers.com/showthread.php?t=833725
Click to expand...
Click to collapse
Mr_Ada said:
Didn't work for me. Got failed (Exec format error)
chris...
Click to expand...
Click to collapse
Exactly what failed? Did the insmod show ext2 as a module? Did you run 'insmod ext2.ko' from the directory that has ext2.ko (which shoudl be on the device)? Or did the loopback device fail?
Didn't work for me
Yes the insmod ext2.ko from the directory which contains the file. I was superuser too.
It wouldn't create the loopback device.
chris
polymath257 said:
Exactly what failed? Did the insmod show ext2 as a module? Did you run 'insmod ext2.ko' from the directory that has ext2.ko (which shoudl be on the device)? Or did the loopback device fail?
Click to expand...
Click to collapse
solution in bootscript.sh
painchonha said:
I have the same problem with my galaxy note1 and galaxy tab10.1.
If you've solved it share it plz..
Click to expand...
Click to collapse
solution:
the problem is with the busybox bin.
to solve:
1. install busybox free from play store
2. edit /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh, changing this:
Code:
if [ -f /data/data/com.zpwebsites.linuxonandroid/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid/files/busybox
elif [ -f /data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox ]; then
export bbox=/data/data/com.zpwebsites.linuxonandroid.opensource/files/busybox
else
export bbox=/system/xbin/busybox
fi
with this:
Code:
export bbox=/system/xbin/busybox
re launch and go
I could successfully install Ubuntu 13.10 via Complete Linux Installer under Android 4.4.2 (on a Nexus 5). If I reboot and then open Ubuntu 13.10, everything works fine. But if I close Ubuntu and open it again (without reboot), I get:
[email protected]:/ $
[email protected]:/ $ cd /sdcard/ubuntu
[email protected]:/sdcard/ubuntu $ su
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
[email protected]:/storage/emulated/legacy/ubuntu # sh /data/dcom.zpwebsites .linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[39]: dirname: not found
Checking loop device... FOUND
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Device or resource busy
Error: Unable to mount the loop device!
1|[email protected]:/storage/emulated/legacy/ubuntu #
What is the problem?
Hear hear. Same issue Galaxy S5 g900r4. SELINUX is permissive(finally).
[email protected]_T00J:/ $
[email protected]_T00J:/ $ cd /mnt/sdcard/ubuntu
[email protected]_T00J:/mnt/sdcard/ubuntu $ su
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/ubuntu/ubuntu.img
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/ubuntu/ubuntu.img
[email protected]_T00J:/storage/emulated/legacy/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/ubuntu/ubuntu.img
MD5 file found, use to check .img file? (y/n)
n
Checking loop device... FOUND
losetup: /dev/block/loop255: No such file or directory
Error: Unable to attach image to loop device! (Image = /mnt/sdcard/ubuntu/ubuntu.img)
1|[email protected]_T00J:/storage/emulated/legacy/ubuntu #
if you know this issue please help me thank for you time