Join Us!

Help needed to exec...
 
Notifications
Clear all

Help needed to execute nanddump (cross-compiled for ARM) on  

  RSS
apurva.rustagi
(@apurva-rustagi)
New Member

Hi All,

I need your help regarding executing nanddump on Nexus One.
I achieved root access after booting unsecured boot image on the phone. I verified this root access by accessing /data/data directory on the phone. Also after executing adb shell i get # prompt instead of usual $ prompt.
I cross compiled MTD-UTILS for arm architecture using guide at http//elinux. org/CompilingMTD Utils.
I then transferred nanddump tool onto SD card and trying to execute in the adb shell but i keep getting error "permission denied". I then tried to do chmod 777 nanddump which passes out without any warning/errors. But the nanddump command still fails with permission denied error.
Can anyone help me out with this issue?

Regards,
Apurva R

Quote
Posted : 20/07/2010 8:41 am
chad131
(@chad131)
Member

Complete stab in the dark… But have you set execute permissions on the binary? Chmod +x filename

ReplyQuote
Posted : 20/07/2010 9:29 am
apurva.rustagi
(@apurva-rustagi)
New Member

I did execute chmod 777 which means rwxrwxrwx permissions on the executable. This command passes out without warnings/errors. However the nanddumpstill fails.

ReplyQuote
Posted : 20/07/2010 9:39 am
Patrick4n6
(@patrick4n6)
Senior Member

sudo?

ReplyQuote
Posted : 20/07/2010 10:30 am
apurva.rustagi
(@apurva-rustagi)
New Member

sudo and su binaries are not available on android platform (

ReplyQuote
Posted : 20/07/2010 10:33 am
AlexC
(@alexc)
Active Member

I wonder if the issue is coming from running it from the SD card? But if you have root you should be able to do what the h**l you want - that's the point right?

Is the "permission denied" coming from the shell (saying that you don't have permission to execute the file - although this shouldn't be the case), or is it an error message being passed out by nanddump?

ReplyQuote
Posted : 20/07/2010 4:09 pm
apurva.rustagi
(@apurva-rustagi)
New Member

Its the shell who is giving the error. Following is the screenshot.

cd /sdcard/mtdutils-arm
# ls
ls
bin2nand
docfdisk
doc_loadbios
flashcp
flash_erase
flash_info
flash_lock
flash_otp_dump
flash_otp_info
flash_unlock
ftl_check
ftl_format
mkbootenv
mkpfi
mtdinfo
mtd_debug
nand2bin
nanddump
nandtest
nandwrite
nftldump
nftl_format
pddcustomize
pfi2bin
pfiflash
rfddump
rfdformat
ubiattach
ubicrc32
ubicrc32.pl
ubidetach
ubiformat
ubigen
ubimirror
ubimkvol
ubinfo
ubinize
ubirename
ubirmvol
ubirsvol
ubiupdatevol
unubi
# ./nanddump
./nanddump
./nanddump permission denied

ReplyQuote
Posted : 20/07/2010 5:46 pm
apurva.rustagi
(@apurva-rustagi)
New Member

The binaries can be downloaded at http//www.4shared.com/file/MFrQFpYY/mtdutils-arm.html

It would be a great help if someone else can verify if the binaries are compiled correctly or not.

I verified the ELF file signature by doing the cat. So i do not think that this is probably the case.

ReplyQuote
Posted : 20/07/2010 5:52 pm
apurva.rustagi
(@apurva-rustagi)
New Member

Andrew Hoog kindly replied to my email and suggested the following
Apurva,

Congrats on your progress so far. I suspect your issue is that Android went to great lengths to make sure the /sdcard has the “noexec” option set. I believe you can check with a simple “mount” command. The solution is to put the file somewhere on the file system where the “noexec” option is not set. With root, it’s practically anywhere but /sdcard. Hope this helps, let us know.

Andrew Hoog
Chief Investigative Officer
tel 312-878-1100
[email protected]

However I am facing similar problem when I place it in /system/bin folder. (

ReplyQuote
Posted : 25/07/2010 10:12 am
tdaitoku
(@tdaitoku)
New Member

I think your nanddump is dynamically linked program.
So, Try statically linking. D

Tad

ReplyQuote
Posted : 12/08/2011 7:47 am
Share: