File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Access System Folder ???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Access System Folder ????" Watch "Access System Folder ????" New topic
Author

Access System Folder ????

Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79


Hello,

I use Android SDK 2.3.3 API 10. When I start my emulator, I can browse folders, push files to folders. But I can't access /system or any of its sub-folders. I try tp do adb push, from shell, mount -o remount rw /system, su -root, etc. Despite I can't perform mkdir, cp, cat operations on system folder.

Why so and how to access it ??

Please help me, am badly stuck up. Any help, guidance is highly appreciated.

Thanks

Regards,
Trupti (SCJP)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
What are you trying to accomplish by accessing those directories? Those are not accessible on an actual device, either, unless it is rooted.


Ping & DNS - updated with new look and Ping home screen widget
Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79

Ulf Dittmer wrote:What are you trying to accomplish by accessing those directories? Those are not accessible on an actual device, either, unless it is rooted.


Thanks for quick response.

Our Emulator's aren't already rooted ? If not,
mount -o remount rw /system
OR
su -root

should let me access it or not ? If this all is not rooting then how do I root my emulator to access those folders ?

I want to install few packages like busybox so system, hence I need it.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

Look at the debug options at http://developer.android.com/guide/developing/tools/emulator.html
Then there is also this earlier post: http://www.coderanch.com/t/461467/Android/Mobile/Logging-as-root-android-emulator

PatienceIsAVirtue


JBoss In Action
Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79

Thanks Peter Johnson,

After trying all those ways, now I keep getting "Read Only file system", "not enough memory", "Out Of Memory", etc such messages. I have set my emulator's heap size as 2048 and RAM as 1024. If I make RAM as 2048, the emulator fails to start. When I copy the file to /data/local folder, it copies properly. Then when I try to copy to /system/ folder, I get from the above errors. Why so ? And if memory if the problem, I can't increase the memory. With this scenario, what to do and how to overcome this memory problems and access system folder to copy and install.

EDIT : On increasing the memory the emulator hangs at boot and cannot start only. The MAX memory I can give is heap : 512 and RAM 256.

Can you help me know and gude a solution for the problem !
Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79


Please have a look at the following commands, and try to help me knoew the reason for the problem or the cause or the sollution or where am I going wrong :

C:\Android\android-sdk\tools>adb shell
# su
su
# export PATH=/data/busybox:$PATH
export PATH=/data/busybox:$PATH
# cp /sdcard/tun.ko /system/lib/
cp /sdcard/tun.ko /system/lib/
cp: cannot remove '/system/lib/tun.ko': Read-only file system
# mount
mount
rootfs on / type rootfs (ro)
sysfs on /sys type sysfs (rw)
/dev/block/mtdblock0 on /system type yaffs2 (ro)
/dev/block/mtdblock1 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock2 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/vold/179:0 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,u
id=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset
=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

# mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
# cp /sdcard/tun.ko /system/lib/modules/*
cp /sdcard/tun.ko /system/lib/modules/*
cp: cannot remove '/system/lib/modules/*': No such file or directory
# cp /sdcard/tun.ko /system/lib/
cp /sdcard/tun.ko /system/lib/
cp: cannot remove '/system/lib/tun.ko': No such file or directory
# cat /sdcard/tun.ko > /system/lib/tun.ko
cat /sdcard/tun.ko > /system/lib/tun.ko
cannot create /system/lib/tun.ko: not enough memory
#


All I am trying to do is copying tun.ko to the /system/lib/modules/ folder. Can anyone please help me know where am I going wrong ! Why am I not able to copy the file even after remounting ???

Please help me out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access System Folder ????
 
Similar Threads
Problem in accessing the local files & folders in web application
Problem Installing OpenVPN to Emulator
Accessing chinese folder through URL
Folder Browser Dialog on a button click
configuring J2EE environment variables