RA 1.6.2 SDcard woes. - Hero CDMA General

Alright, So I'm trying to enable JIT on my phone, but I'm running into a problem where when I cd into /sdcard and try to ls, the directory shows as empty. Trying to cd into anything gives me this
Code:
/sbin/sh: cd: can't cd to /sdcard/dusted
My question is, what are the commands to mount my sdcard with -rw permissions?

abcdfv said:
Alright, So I'm trying to enable JIT on my phone, but I'm running into a problem where when I cd into /sdcard and try to ls, the directory shows as empty. Trying to cd into anything gives me this
Code:
/sbin/sh: cd: can't cd to /sdcard/dusted
My question is, what are the commands to mount my sdcard with -rw permissions?
Click to expand...
Click to collapse
try mount -a
or
try mount /sdcard/

mount -a returns
Code:
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: no such file or directory
mount /sdcard returns
Code:
mount: mounting /dev/block/mmcblk0p1 on /sdcard failed: device or resource busy

Then try:
Code:
mkdir /system/sd
mount -a

Code:
mkdir /system/sd
mkdir: canot create directory '/system/sd': File exists
Tried a different SDcard. Same problem.

Also, the JIT guide can be misleading. At first I thought it meant to do all of this while the phone is in recovery. Needless to say, that does not work.
I got the same results as you, so maybe that is the problem.
The phone needs to be fully booted.

whats happens when you do a 'adb remount'?

Code:
remount failed: invalid argument

Tried killing the adb server and restarting it. Still a no go.

abcdfv said:
Code:
mkdir /system/sd
mkdir: canot create directory '/system/sd': File exists
Tried a different SDcard. Same problem.
Click to expand...
Click to collapse
Looks like the ext partition on the SD card is missing. Did you repartition adding both ext and swap?

I don't run a2sd

abcdfv said:
I don't run a2sd
Click to expand...
Click to collapse
Then it's not going to mount /system/sd since that is a2sd.

I'm not trying to mount an ext partition. I'm trying to mount the sdcard itself.

abcdfv said:
I'm not trying to mount an ext partition. I'm trying to mount the sdcard itself.
Click to expand...
Click to collapse
Your errors above seem to indicate that the sd card is mounted. As to wether its readable is another matter. What do you get when your do a:
Code:
ls /sdcard
Have you tried rebooting into recovery?

Boot the phone into Android.
Open ADB and type mount.
Paste the results here.

From Android
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>cd /android/tools
C:\android\tools>adb shell
# mount
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=
1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,s
hortname=mixed,utf8,errors=remount-ro 0 0
#
From recovery
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>cd /android/tools
C:\android\tools>adb shell
/ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
/ #

Related

mounting /system as rw?

this seems simple enough since we can do it with all other android devices that have root. but it isnt, apparently. because we're running with a stock bootloader/SPL/recovery/ROM, adb wont run with SU permissions. this means abd remount doesnt work.
also, we dont know what the directory is to mount from /dev (i.e. on the G1 it was /dev/block/mtdblock3) to get system to mount as rw.
my point in asking is that i'm trying to do something i'm sure a lot of other people would like as well. custom ringtones in /system/media/audio instead of on the SD card. why? because with the ringtones on the SD card, media scanner picks them up every time and lumps them in with the actual music you have on your sd card. ugh.
so, as soon as someone can figure this out, i'd love to know how to do it so I can push the ringtones or cp them using busybox. anyone who can help...well, lets get it going.
Code:
C:\android-sdk-windows\tools>adb shell
$ su -
su -
#
# mount
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
/dev/block/stl6 /mnt/.lfs j4fs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/stl9 /system rfs rw,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p2 /data rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p3 /data_tmo rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl10 /dbdata rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl11 /cache rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl3 /efs rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
#
busybox mount -o rw,remount /dev/block/stl9 /system
#
once you get there, just copy whatever you want wherever you want
something like
Code:
busybox cp /sdcard/sd/myfile.mp3 /system/media/audio/
mucho kudos! i have a feeling this will come in handy for a lot of people in the future.
cojonesx said:
Code:
C:\android-sdk-windows\tools>adb shell
$ su -
su -
#
# mount
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
/dev/block/stl6 /mnt/.lfs j4fs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/stl9 /system rfs rw,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p2 /data rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p3 /data_tmo rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl10 /dbdata rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl11 /cache rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl3 /efs rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
#
busybox mount -o rw,remount /dev/block/stl9 /system
#
once you get there, just copy whatever you want wherever you want
something like
Code:
busybox cp /sdcard/sd/myfile.mp3 /system/media/audio/
Click to expand...
Click to collapse
Whoa... Do I need to do all this just to push a apk as system app?
No, all you need to do is:
adb shell (ony if you're using adb, if you're using terminal, skip this command)
su
busybox mount -o rw,remount /dev/block/stl9 /system
busybox cp /(location of the app here)/app.apk /system/app/
reboot
now, depending on where you have the app:
if its on the 14gb storage, it'll just be /sdcard/app.apk
if its on your actual sd card, it'll be /sdcard/sd/app.apk
all the stuff in the code post between # mount and the next # is what gets printed from the mount command. not actual commands.
adb remount doesn't work? I have been using it to delete stuff out of the /system/app directory... Maybe I am not getting what you are referring to.
??
hah2110 said:
Whoa... Do I need to do all this just to push a apk as system app?
Click to expand...
Click to collapse
Didn't mean to scare anyone with all that text, kusotare is right, the mount command shows what is currently mounted and where, its how I knew where to remount /system. Just used it as an example to teach as well
ahh, never mind, I see the issue now
So adb push to /system/* is never going to work until we get some custom roms then?
precisely t1n0m3n.
I used buysbox to try and re-install dlna.apk/odex and my phone boots normal, but wont every "wake up" after the Galaxy s screen, it just stays black, but the home keys are responsive? Did i screw something up?
kusotare said:
No, all you need to do is:
adb shell (ony if you're using adb, if you're using terminal, skip this command)
su
busybox mount -o rw,remount /dev/block/stl9 /system
busybox cp /(location of the app here)/app.apk /system/app/
reboot
now, depending on where you have the app:
if its on the 14gb storage, it'll just be /sdcard/app.apk
if its on your actual sd card, it'll be /sdcard/sd/app.apk
all the stuff in the code post between # mount and the next # is what gets printed from the mount command. not actual commands.
Click to expand...
Click to collapse
Tried doing this. I have com.neevo.mobiledefense.apk in my adb folder so on my N1, I never actually had to type a location of the file but whether I use the location or not, I get file not found... Will my N1 mobiledefense system app *.zip work on this phone or no since the directories are different?

How to Run(Chroot) Linux(Ubuntu/Debian,etc.) in your Milestone 2

Chrooting Linux on Android is a very popular topic, and you can find many tutorials online. I am not going to post a detailed how to here.. but, I will explain the generalized steps for the process! If anyone have any questions or need help, feel free to ask!
Get Root Access on your phone
There are many ways to get root access; Easiest will be using z4root or SuperOneClick ! Rooting is mandatory because: You need to install Busybox; Need to mount file system, etc..​
Install SuperUser App from the Market
This application allows you to grant Root access to other applications (when needed). Depending on how you rooted your phone, superuser.apk may be already installed on your phone.​
Install Busybox App from the Market
Depending on how you rooted your phone, Busybox may be already installed on your phone. In any case install this app from the market and update your busybox to the latest version. Busybox is a set of commonly used linux commands, which are not available in android by default. Eg: cp, chroot, etc.​
Install Connectbot from Android market
Connect bot is a terminal client application for android. There are other alternatives but, I recommend Connectbot! Also Connectbot has SSH support, so if you are installing an SSH server on your Ubuntu, you can connect to it using connectbot and you may totally skip the VNC for GUI. Anyway, note that you need a terminal app to start the chroot daemon!​
Install AndroidVNCViewer from Android market
With androidVNCViewer we can get GUI access to our ubuntu! This App works so fine in my Milestone 2 with Ubuntu; It even supports mouse pointer!​
Download/build a Linux rootfs for your flavour of linux
Now, you need the Ubuntu/Debian/Other linux file system for your Phone's processor. Like most of the Android phones, Milestone 2 uses an ARM processor. And Ubuntu offers full support for ARM processors. It is so easy to build ubuntu for ARM(OMAP) platform using rootstock/bootstrap method. I used rootstock method for Ubuntu as explained here.
PS: For your first time, make sure you build, "Ubuntu Lucid" (just use the --seed/-s parameter of rootstock command. I was not able to use 11.04(Natty). Once you get Lucid to work, you can surely try yourself for the other versions! )​
Create a mountable .img file with a size suited for you
From rootstock, you will get a .tgz file! You will need to convert this to a mountable .img file.
In order to create an empty ubuntu.img file, use the followed command in your ubuntu-desktop's terminal; the last arguement (2048) specifies size of the Ubuntu rootfs (If you need much disk space when you are in ubuntu, use a large value here. Normally 2GB will be sufficient for you; even with GUI/VNC).
Code:
dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=2048
Next, format our empty ubuntu.img with a suitable ext2/ext3/ext4 file system!
For Milestone 2, you should use ext3 (I think it does not support ext2). ext4 is supported only in Gingerbird+. So, you should use the appropriate command based on your mobile
Code:
mkfs.ext2 -F ubuntu.img
mkfs.ext3 -F ubuntu.img
mkfs.ext4 -F ubuntu.img
You can find out the suitable file system by opening Connectbot in your mobile and entering the followed command. In the output, look for words ext2/ext3/ext4!
Code:
su
mount
Once you format ubuntu.img with appropriate file system. We should temporarily mount the ubuntu.img in a somewhere and we should extract the armel-rootfs-xx.tgz to it. You can use these commands
Code:
sudo mount -o loop ubuntu.img /mnt
sudo tar -C /mnt -zxf armel-rootfs--xx.tgz
sudo umount /mnt
Download(and modify) or create a Shell script for automatically mounting your Chroot image
This is the most important part, we have to run a set of commands in our android shell to get into the ubuntu. To make things easier, we will write these command-sequence in a shell script, and whenever we need we simple call this script. Cool isn't it?. Basically this is what this script should do:
Code:
1. Check if there exists an ubuntu.img file as we specify in command line
2. Create a loop device with the ubuntu.img - ie. Make android(linux) believe that ubuntu.img is a mountable device.
3. Mount the newly created loop device to a folder. My script mounts the image to /data/local/chrootos
4. Set some environment variables in the shell
5. Mount the [I]devpts, proc, sysfs[/I] for the ubuntu!
6. Run the Chroot command. This command actually changes the root of file system to a new directory we specify. ie. we fake [B]/data/local/chrootos[/B] as the rootfs![B]/[/B]
Create a folder in your Phone's SD Card and copy one or more(If you want to choose between: Debian/Ubuntu/Puppy/etc) .img files and your shell script for booting linux into it.
Create a folder named .chroot in your SD Card. If you have a "." as the first character, this folder will be hidden in the Android File Browser. And will avoid you accidentally modifying these files.​
Get into your Phone's Shell through ConnectBot / USB-ADB / Terminal Emulator
Enter su in the terminal to get root access
Remount your Android filesystem to get write access to your phones
By default, the android file system is read only. So in order to write to the files sytem, we have to remount it with the following command.
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Copy your bootscript to /system/bin so that you can easily start your LinuxIf you have downloaded my bootscript, the file name will be bl - short for boot linux. So, once you copied you will have your shell script at /system/bin/bl. Once we copy the shell script to the bin directory, it will work as a shell command.​
Start your linux and customize it
If you have done everything correctly so far, you can now boot into your ubuntu.img with the following command. Note that you do not need to specify the full file name "ubuntu.img".
Code:
bl ubuntu
Start your linux and customize it
If Chroot was a success, you will see the ubuntu shell prompt. And then you can start installing more stuff, etc. [email protected]:​
Downloads & Screenshots
Screenshots: http://goo.gl/PzVI0
My Shell Script for starting linux: http://goo.gl/il3nJ
My ubuntu.img: Coming Soon​Password
Code:
arunraj.in
Common Errors
The most common error will be when we are dealing with the "loop device". Because, according to the apps installed in your device, there may not be a free loop device available. If you are facing errors, feel free to ask me and I will try and help!​
Thanks, man! When I have time I'm gonna try it out.
Sent from my Milestone 2 XDA App
thanks for tutorial. will try this soon
Script didn't work :/
Gongui20 said:
Script didn't work :/
Click to expand...
Click to collapse
Do you get any error message?
Thanks !
It's very interesting.I will try it when I have some free time.
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
Click to expand...
Click to collapse
/bin/bash didnt exist or something like that.
Gongui20 said:
/bin/bash didnt exist or something like that.
Click to expand...
Click to collapse
I think there was no free loop device available for mounting the image.
could run these commands as root and send me the output(the txt files created)?
Code:
mount > mount-list.txt
losetup -f > losetup1.txt
losetup /dev/block/loop1 /sdcard/.chroot/ubuntu.img > losetup2.txt
losetup1.txt
/dev/loop0
Click to expand...
Click to collapse
mount-list.txt
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk1p21 /system ext3 ro,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/userdata /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/cache /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
tmpfs /tmp tmpfs rw,relatime,size=2048k 0 0
/dev/block/pds /pds ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/preinstall /preinstall ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.rovio.angrybirdsrio-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-1 /mnt/asec/com.rovio.angrybirds-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-2 /mnt/asec/org.xbmc.android.remote-2 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Click to expand...
Click to collapse
losetup2.txt is empty.
Yeap, I faced the same error when I was doing it. If you notice the mount-list.txt, you can see that AngryBirds application is using /dev/block/dm-0 and /dev/block/dm-1. /dev/block/dm-2 is also in use.
You could try this:
Edit the script bl and replace /dev/block/loop1 in the script with /dev/block/dm-3. It might just do the trick.
Hey check this out:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
Works on Asus TF101
Hi
Thanks for the guide. I got it running on my Asus TF101. I had to modify your script slightly :
The /system filesystem is mounted as ext4 (not yaffs)
The /system fs is mounted from /dev/block/mmcblk0p1
/dev/block/mmcblk0p1 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
Apart from that no other changes were necessary.
Need Help!!!!
hi ~ I just put the img file in /sdcard/.chroot/.linux/ ,named ubuntu.img and edited the Script
but when I run the script ,there is a problem in line:
mount -t ext3 /dev/block/loop1 $mnt
it said:
Device or resourc busy
I have tried thousand ways and cost 5 days,but I can't solve it.....
can you help me?
sorry for my poor english...
losetup1.txt
/dev/loop0
I also replace /dev/block/loop1 in the script with /dev/block/dm-5,but I need use command :"mknod /dev/block/dm-5 b 7 0" first.
the error Screenshots and mount
echoeye said:
the error Screenshots and mount
Click to expand...
Click to collapse
Hi,
Which is your Mobile ?
Also -- Did you see reply #7, #8 on page 1 of this thread ?
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
The problem is you have apps installed to the sd card (and getting mount points busy), when it happens here I just open Titanium Backup and move External apps to internal.
No matter what I tried here, this script wouldn't work... So I used DebOnDroid app from defy forum, and when updated to GB. The app stopped working also, so I moved the ubuntu.img to /data/local/ and mounted from there, works like a charm!
This is the script I'm using /system/bin/buntu:
Code:
export mnt=/data/local/debian
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin
export TERM=linux
export HOME=/root
export USER=root
echo "Linux Chrooter: Setup Networking"
sysctl -w net.ipv4.ip_forward=1
#necessary mount points
busybox mount -o loop $mnt/../debian.img $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t sysfs sysfs $mnt/sys
busybox mount -t proc proc $mnt/proc
#extra mount points
busybox mount -o rw /system $mnt/mnt/s
busybox mount /data $mnt/mnt/d
busybox mount /sdcard $mnt/mnt/sd
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
umount $mnt/sys
umount $mnt/proc
umount $mnt/dev/pts
umount $mnt/mnt/*
#somehow the commented lines didn't work...
#umount $mnt/mnt/d
#umount $mnt/mnt/s
umount $mnt
PS: when I copy a binary from ubuntu to /system/bin and chmod, it won't exec, why?
Sent from my Milestone 2 XDA App
r2beta0 said:
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
Click to expand...
Click to collapse
thank you very very very very very very very very very very very very very very very much!!!!
I made it!!!
oh yeah!~~~~
How is this different from using an app like linuxinstaller? Well, apart from doing it manually and the nerdy way of course?
Is it safer? I am intrigued by the possibility of having a working ubuntu in my pocket, but am wondering if I should go this way or try the app.
great guide though... i think this is the push i needed to finally try this.
Nice job! but i got this..
Nice job!
I got this
#bl ubuntu
bl: permission denied
#
;/

[FIXED] $50 : Help me fix \efs to get my IMEI back.

Greeting,
Here's the details.
FIXED....
here's how.
as you may see in the post i stopped in the step of trying to format \efs partation.
but instead.
I went to my friend phone and make this command
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/ilostit.dd
this backup the mmcblk0p1 which is \efs to a file.
then move it to my phone \sdcard
and did this commands.
Code:
umount /efs "unmount /efs
dd if=/sdcard/ilostit.dd of=/dev/block/mmcblk0p1 "relfash mmcblk0p1 with the backup.
reboot
this reflash mmcblk0p1 block with the backup,
then copy my \efs backup to \efs.
and no more IO error..
and violaa...
my IMIE is back and the Signal is OK.
Big thank goes to KciNicK who helped me alot and earn it.
_________
The Original Problem :
Tonight I flashed a kernel to my phone, just\ lost the Singal and my phone show no sim card inserted!.
anyway, i figure it out that... the IMEI lost.
in \efs there's no nv_data.bin file!!
So i went to restore the \efs.
but something not right here!
Hope someone can help here.
i tried these commands but no chance tel now!.
here to restore nv_data.bin
Code:
su
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
[COLOR="red"]cp: can't stat '/efs/nv_data.bin': Input/output error[/COLOR]
and here to restore \efs
Code:
# busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
efs/
efs/cryptprop_rebootMode
[COLOR="Red"]tar: can't remove old file efs/cryptprop_rebootMode: Read-only file system[/COLOR]
#
Code:
su
# mount -o rw,remount /dev/block/mmcblk0p1 /efs
mount -o rw,remount /dev/block/mmcblk0p1 /efs
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
tried to flash back to many FWs but no chance,
---
time for some sleep, hope to find something later
the input output error is coz disk full, try deleting/moving some .bak files to sdcard then try the copy again
KciNicK said:
the input output error is coz disk full, try deleting/moving some .bak files to sdcard then try the copy again
Click to expand...
Click to collapse
\efs is read only!, i see members here can you root explorer to delete and move files.
If i can just copy the backup nv_data.bin to \efs that's will be good!.
but i don't know what's to do!.
Can't you use root explorer (don't forget to mount r/w), I find I can get all sorts of errors using adb+cli but root explorer will just do the job.
Another suggestion would be to flash an insecure kernel
copy paste the output of this please...
# busybox cat /proc/mounts
I got this
Code:
su
# ls
ls
acct fota.rc res
app-cache init sbin
cache init.goldfish.rc sdcard
config init.rc sys
d init.smdkc210.rc system
data init_kernel_only.rc tmp
dbdata lib ueventd.goldfish.rc
default.prop lpm.rc ueventd.rc
dev mnt ueventd.smdkc210.rc
efs proc vendor
etc recovery.rc
# cd efs
cd efs
# ls
ls
[COLOR="Red"]ls: ./nv_data.bin: I/O error
ls: ./nv.log: I/O error
ls: ./nv_data.bin.md5: I/O error
ls: ./dmp: I/O error[/COLOR]
cryptprop_applied_result cryptprop_securewipedata
cryptprop_onetimeboot edk_p
cryptprop_persist.sys.language imei
cryptprop_persist.sys.timezone redata.bin
cryptprop_rebootMode
#
Re flash the kernel
Sent from my HTC Vision using XDA App
KciNicK said:
copy paste the output of this please...
# busybox cat /proc/mounts
Click to expand...
Click to collapse
Code:
# busybox cat /proc/mounts
busybox cat /proc/mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/usb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /app-cache tmpfs rw,relatime,size=7168k 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p9 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p7 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/block/mmcblk0p1 /efs ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered 0
0
nil /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/mmcblk0p10 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,
noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p4 /mnt/.lfs j4fs rw,relatime 0 0
/dev/block/vold/179:11 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,n
odiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp43
7,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,discard 0 0
#
see http://forum.xda-developers.com/showthread.php?t=1103357
ok
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
# busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
also check the free space on the efs partition:
# busybox df -h
if that fails, it seems that the FS is screwed, try this (with efs mounted as ro, or not mounted at all):
# busybox fsck.ext4 /dev/block/mmcblk0p1
Here the result.
Code:
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount: Read-only file system
# busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 416.5M 32.0K 416.5M 0% /dev
tmpfs 416.5M 0 416.5M 0% /mnt/asec
tmpfs 416.5M 0 416.5M 0% /mnt/obb
tmpfs 416.5M 0 416.5M 0% /mnt/usb
tmpfs 7.0M 0 7.0M 0% /app-cache
/dev/block/mmcblk0p9 503.9M 474.9M 29.0M 94% /system
/dev/block/mmcblk0p7 98.4M 4.1M 94.4M 4% /cache
/dev/block/mmcblk0p1 19.7M 8.2M 11.5M 42% /efs
/dev/block/mmcblk0p10
2.0G 64.8M 1.9G 3% /data
df: /mnt/.lfs: Function not implemented
/dev/block/vold/179:11
11.5G 8.9M 11.5G 0% /mnt/sdcard
# busybox fsck.ext4 /dev/block/mmcblk0p1
busybox fsck.ext4 /dev/block/mmcblk0p1
fsck.ext4: applet not found
#
n I9100XEKE1 Rom with GT-I9100_XWKE1_insecure kernel /SuperOneClickv1.9.1
Why i can't mount it as read write!!!
ps: KciNicK if you would, we can try via msn.
try mounting / as RW as well
# mount -o remount,rw rootfs /
then
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
I flashed with CF-Root v4.0 kernel
and this is my result.
Code:
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount -o remount,rw /dev/block/mmcblk0p1 /efs
# busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
# busybox fsck.ext4 /dev/block/mmcblk0p1
busybox fsck.ext4 /dev/block/mmcblk0p1
fsck.ext4: applet not found
# mount -o remount,rw rootfs /
mount -o remount,rw rootfs /
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount -o remount,rw /dev/block/mmcblk0p1 /efs
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
# rm /efs/nv_data.bin
rm /efs/nv_data.bin
rm: can't stat '/efs/nv_data.bin': I/O error
#
tried to delete /efs/nv_data.bin!..
hemmm. i think here's the problem can't stat '/efs/nv_data.bin': Input/output error
all that happened after flashing to the kernel i mention in the OP. ehh.
the ext4 fs on /efs is screwed, try umounting it then format it again, but i don't know if you have the tools to doit, reflashing the efs partition may solve it, feel free to contact me by msn, i sent my address by pm
KciNicK said:
the ext4 fs on /efs is screwed, try umounting it then format it again, but i don't know if you have the tools to doit, reflashing the efs partition may solve it, feel free to contact me by msn, i sent my address by pm
Click to expand...
Click to collapse
Yes, i think i need to reFormat it to solve this IO error but how!
I added you the same name here. "Majed.y"
Thank you
with odin and a .pit file, you can get the correct .pit from samfirmware
KciNicK said:
try mounting / as RW as well
# mount -o remount,rw rootfs /
then
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
Click to expand...
Click to collapse
fsck cannot run on mounted file systems, you need to umount
godutch said:
with odin and a .pit file, you can get the correct .pit from samfirmware
Click to expand...
Click to collapse
I did it with "u1_02_20110310_emmc_EXT4.pit" and still..
godutch said:
fsck cannot run on mounted file systems, you need to umount
Click to expand...
Click to collapse
maybe i need step by step, i don't want to break my phone for good
Ok,
unmount \efs
but what's missing to format it?
here's what i got
Code:
# umount /efs
umount /efs
# busybox fsck.ext4 /dev/block/mmcblk0p1
busybox fsck.ext4 /dev/block/mmcblk0p1
[COLOR="Red"]fsck.ext4: applet not found[/COLOR]
# fsck.ext4 /dev/block/mmcblk0p1
fsck.ext4 /dev/block/mmcblk0p1
[COLOR="Red"]fsck.ext4: not found[/COLOR]
# fsck
fsck
[COLOR="Red"]fsck (busybox 1.17.2, 2010-09-05 03:37:08 CDT)
fsck: can't read '/etc/fstab': No such file or directory[/COLOR]
Problem Fixed....
Look at the OP for the solution.

[Q] Can't push the Market Patch

Hello
I have a rooted HTC Tattoo with the Stock ROM, and i wanted to put the patch on my phone so that I could have all the apps.
I followed the instructions on this page : http://forum.xda-developers.com/showthread.php?t=645286
My first problem came when i needed to push Vending-Tattoo-patched.apk to system/app :
Code:
adb push Vending-Tattoo-patched.apk /system/app/Vending.apk
failed to copy 'Vending-Tattoo-patched.apk' to '/system/app/Vending.apk': Directory not empty
So i tried to push it to /system :
Code:
adb push Vending-Tattoo-patched.apk /system/Vending.apk
failed to copy 'Vending-Tattoo-patched.apk' to '/system/Vending.apk': Out of memory
So i checked with df if i had any free memory :
Code:
adb shell df -ha
Filesystem Size Used Available Use% Mounted on
tmpfs 92.7M 0 92.7M 0% /dev
devpts 0 0 0 0% /dev/pts
proc 0 0 0 0% /proc
sysfs 0 0 0 0% /sys
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 150.0M 142.4M 7.6M 95% /system
/dev/block/mtdblock5 165.1M 68.1M 97.0M 41% /data
/dev/block/mtdblock4 150.0M 48.6M 101.4M 32% /cache
/dev/block//vold/179:1
14.8G 13.6G 1.2G 92% /sdcard
The file is only 1.2 M, so it should have worked. I then tried to push it to / :
Code:
adb push Vending-Tattoo-patched.apk /Vending.apk
failed to copy 'Vending-Tattoo-patched.apk' to '/Vending.apk': Read-only file system
So i tried a few random things (i'm not very good at all of this), and i finally got to copy Vending-Tattoo-patched.apk to /.
Code:
adb push Vending-Tattoo-patched.apk /sdcard
1050 KB/s (1185434 bytes in 1.102s)
adb shell
# mount -o rw,remount /
# cp /sdcard/Vending-Tattoo-patched.apk /
# ls
Vending-Tattoo-patched.apk init.rc
cache logo.rle
data proc
default.prop root
dev sbin
etc sdcard
init sqlite_stmt_journals
init.bahamas.rc sys
init.goldfish.rc system
But then when I try to copy it to /system/app , i get :
Code:
cp Vending-Tattoo-patched.apk /system/app/Vending.apk
cp: can't create '/system/app/Vending.apk': File exists
And when I try to delete Vending.apk, I get :
Code:
rm /system/app/Vending.apk
rm: can't remove '/system/app/Vending.apk': Directory not empty
This isn't a major problem, my phone works good, but i would be thankful for all help i can get

[Q] Thinkpad stuck semi-rooted (Help!) EDIT: SOLVED

Hey all. I have a 32 GB US TPT that was on 0075. I rooted it using djrbliss's method, and at some point managed to screw up my systemui.apk. I couldn't get it working again, so I attempted a factory reset. For some reason, that left Superuser in my list of apps, and Superuser will say that it has granted apps superuser permission, but whenever I try to do anything that would require root (like delete a system app), it doesn't work.
Also, I've tried to reinstall stock 0075 from a zip, but when I did that it said something about the update check failing on account of missing system apps.
So I'm kind of stuck. How do I fix this? I want to get the tablet fully re-rooted so I can install CWM and that 0075 no bloat nandroid backup.
I would first try to run the root script from djrbliss again.
Without root you are not able to restore the system-apps but they are mandatory for any update.
I forgot to mention that I did try re-running the root script. It gave me error messages saying it was unable to copy any of the stuff like superuser.apk.
Try the following. As you still can do su and promt changes to #.
Copy busybox to your device:
1. adb push busybox /data/local/tmp (busybox is located in djrbliss root script)
2. adb shell
3. su
4. cd /data/local/tmp
5. ls (to see if busybox is there)
6. busybox mount -o rw,remount /system
7. mount (to see if /system is mounted as RW)
Did all that, busybox is there, but I don't see /system at all in the list that comes up after mount. Did you mean sysfs? That one says rw.
PS: sorry for being generally clueless about this stuff. This is my first time doing anything much under the hood with Android.
Edit: another curious issue I just noticed: the tablet connects to my computer just fine via MTP, and shows up under adb devices, but when I select mount the SD card, the tablet immediately reboots. Also, it doesn't show up under adb devices if I don't select either, but that might be normal.
qdmcgraw said:
Did all that, busybox is there, but I don't see /system at all in the list that comes up after mount. Did you mean sysfs? That one says rw.
PS: sorry for being generally clueless about this stuff. This is my first time doing anything much under the hood with Android.
Click to expand...
Click to collapse
Please post output from mount.
It should look like this for system:
/dev/block/mmcblk0p3 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Exe557 said:
Please post output from mount.
It should look like this for system:
/dev/block/mmcblk0p3 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
Oh, yeah, that's there, but it's listed as ro. Everything else the same as what you wrote.
Quiet hard to help without supplying output from shell.
What do you get after typing busybox mount -o rw,remount /system?
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
43c71c543bf7457 device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb push busybox /data
/local/tmp
1317 KB/s (1867568 bytes in 1.384s)
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ su
su
# cd /data/local/tmp
cd /data/local/tmp
# ls
ls
busybox
# busybox mount -o rw,remount /system
busybox mount -o rw,remount /system
# mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p3 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p4 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/block/mmcblk0p6 /mnt/pia ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordere
d 0 0
/dev/block/mmcblk0p9 /mnt/persdata ext4 rw,nosuid,nodev,noatime,barrier=1,data=o
rdered 0 0
/dev/block/mmcblk0p10 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,d
efault_permissions,allow_other 0 0
/dev/block/loop0 /persdata/absolute ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/block/vold/179:9 /mnt/external_sd vfat rw,dirsync,nosuid,nodev,noexec,relat
ime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,ioch
arset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Looks ok and it accept the command without any errors.
Try this please and post output:
busybox mount -o remount,rw /system; mv system/bin/aba system/bin/aba_bak
Have you tried installing Titanium Backup and running it? I remember one time when I ran TB after running the YAREFTP script to get OTA2 rooted. Titanium Backup reported that SuperUser was installed but it's binaries were incorrect (or something to that effect) and offered to fix it for me. Root seemed fine after that.
Might be worth a try. Also, did you re-install superuser and then run it?
Exe557 said:
Looks ok and it accept the command without any errors.
Try this please and post output:
busybox mount -o remount,rw /system; mv system/bin/aba system/bin/aba_bak
Click to expand...
Click to collapse
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
List of devices attached
43c71c543bf7457 device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ su
su
# cd /data/local/tmp
cd /data/local/tmp
# ls
ls
busybox
# busybox mount -o remount,rw /system; mv system/bin/aba system/bin/aba_bak
busybox mount -o remount,rw /system; mv system/bin/aba system/bin/aba_bak
failed on 'system/bin/aba' - No such file or directory
#
Mhm, so looks like it is not there and it will not prevent your /system to remount as rw.
I'm out of ideas.
pwstein said:
Have you tried installing Titanium Backup and running it? I remember one time when I ran TB after running the YAREFTP script to get OTA2 rooted. Titanium Backup reported that SuperUser was installed but it's binaries were incorrect (or something to that effect) and offered to fix it for me. Root seemed fine after that.
Might be worth a try. Also, did you re-install superuser and then run it?
Click to expand...
Click to collapse
I installed Titanium Backup just now, but it didn't give me any error message like that. I don't know how I'd go about reinstalling Superuser.
Exe557 said:
Mhm, so looks like it is not there and it will not prevent your /system to remount as rw.
I'm out of ideas.
Click to expand...
Click to collapse
Damn, well thanks anyway. I appreciate you helping out.
Damn, I see the error now
As your are in /data/local/tmp mv system/bin/aba system/bin/aba_bak will not work.
So it should be:
busybox mount -o remount,rw /system; mv /system/bin/aba /system/bin/aba_bak
I think that one went through. It just accepted the command with no error message.
If it goes through it should be mounted as rw. Otherwise it is impossible to modify data on /system folder.
Check mount
Exe557 said:
If it goes through it should be mounted as rw. Otherwise it is impossible to modify data on /system folder.
Check mount
Click to expand...
Click to collapse
Yep, it appears to be mounted as rw now
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ su
su
# cd /data/local/tmp
cd /data/local/tmp
# ls
ls
busybox
# busybox mount -o remount,rw /system; mv /system/bin/aba /system/bin/aba_bak
busybox mount -o remount,rw /system; mv /system/bin/aba /system/bin/aba_bak
# mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p3 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p4 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/block/mmcblk0p6 /mnt/pia ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordere
d 0 0
/dev/block/mmcblk0p9 /mnt/persdata ext4 rw,nosuid,nodev,noatime,barrier=1,data=o
rdered 0 0
/dev/block/mmcblk0p10 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,d
efault_permissions,allow_other 0 0
/dev/block/loop0 /persdata/absolute ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/block/vold/179:9 /mnt/external_sd vfat rw,dirsync,nosuid,nodev,noexec,relat
ime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,ioch
arset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
#
So does that mean everything is working properly?
So far it looks ok. As it is mounted as RW you can install CWM recovery now.
Edit: Keep in mind to use correct CWM image for your TPT. It has to fit region and size.
Some people bricked the tablet while using the wrong image.
Exe557 said:
So far it looks ok. As it is mounted as RW you can install CWM recovery now.
Click to expand...
Click to collapse
I did just now. It worked! Thank you so much!

Categories

Resources