[Q] Help needed mount img file in ubuntu - HD2 Android Q&A, Help & Troubleshooting and Genera

I have downloaded a nand androuid build that I am 99% happy with. I do however want to change a couple of things on the build.
I have downloaed and got ubutu up and running on a virtual box. I have then copied the system.img file on to a usb drive and copied it into ubuntu. Location of the file is in stephen which is my logon name.
I have also created a folder called mount which I want to mount the img file to.
I have done this before in ubuntu using ext2 files but I can not get the mount command to work for an img file. Is there an way to mount the img file, remove the files I do not want and then comple a newer smaller img file?
EDIT: logged on as root and moved the system.img and mount folder to main file system folder. Ran command mount -t img /system.img /mount but now getting error unknown filesystem type 'img'
Any help would be appreciated.

Related

How to edit data.img and system.img from Nandroid backup?

I am looking at modifying the contents of the data.img and system.img files that were created by nandroid.
I've looked around, but came up empty.
How can I do this?
outsider787 said:
I am looking at modifying the contents of the data.img and system.img files that were created by nandroid.
I've looked around, but came up empty.
How can I do this?
Click to expand...
Click to collapse
I just recently learned that you have to unyaffs them. Not sure how to recomplie (is that the right word?) them after you make edits though.
I've been trying to get the system.img file mounted on the device itself (since it has yaffs2 built into the kernel), but no luck so far.
Has anyone else have had any success mounting these .img files from within the android OS?
Yaffs won't work that way since the image isn't a block device. It has to actually be on a block device to mount.
Ok.
What if I make a partition on my SDcard, somehow write the data.img file to that partition, and then mount that partition.
Would that work?
I have only one problem. I don't know how to write the .img file to a partition.
Anyone have any idea?

Fastest way to pull system files to pc?

What would the best way to pull all my system files so I can start messing with them be?
Connect to computer via disk drive and then adb pull /system?
Tar the whole partition with cvjpf to preserve permissions and put the tar on your SD.
Evostance said:
What would the best way to pull all my system files so I can start messing with them be?
Connect to computer via disk drive and then adb pull /system?
Click to expand...
Click to collapse
working on the exact same thing hahaha lol but it should be in general
sfjuocekr said:
Tar the whole partition with cvjpf to preserve permissions and put the tar on your SD.
Click to expand...
Click to collapse
thats a good way too
i've mounted the system.img
mount -o loop -t ext3 system.img /tmp and you can put /what ever directory you want instead of temp if you want.
i got the system.img from an official ruu and its rom.zip
got quiet a lot to do tonight
Moved to General

Partitioning microSD card

After setting up my wife's A7 and using it for three weeks, I have decided to open mine up. I waited because I wanted to see if CES had anything I wanted more. I decided they didn't.
So, I am starting from scratch again.
The main issue I've had with my wife's A7 has been the lack of storage space for apps, especially the big games.
Bazbob seems to have a solution by partioning the microSD card and using Apps2sd.
I took a new Class 10 16GB microSD card.
I downloaded and burned Ubuntu onto a CD from here: http://www.ubuntu.com/desktop/get-ubuntu/download
Put the card in my laptop, restarted it into Ubuntu.
Ran gparted.
Shrunk the Fat32 partition to just under 8GB and added another partion as ext2 primary.
When I restarted my laptop, my sd reader in the laptop doesn't work.
When I put it into the A7, it says the SD card has Total Space of 7.73GB.
At this point, I'm not sure what to do next.
Help is appreciated!
jazzbone said:
After setting up my wife's A7 and using it for three weeks, I have decided to open mine up. I waited because I wanted to see if CES had anything I wanted more. I decided they didn't.
So, I am starting from scratch again.
The main issue I've had with my wife's A7 has been the lack of storage space for apps, especially the big games.
Bazbob seems to have a solution by partioning the microSD card and using Apps2sd.
I took a new Class 10 16GB microSD card.
I downloaded and burned Ubuntu onto a CD from here: http://www.ubuntu.com/desktop/get-ubuntu/download
Put the card in my laptop, restarted it into Ubuntu.
Ran gparted.
Shrunk the Fat32 partition to just under 8GB and added another partion as ext2 primary.
When I restarted my laptop, my sd reader in the laptop doesn't work.
When I put it into the A7, it says the SD card has Total Space of 7.73GB.
At this point, I'm not sure what to do next.
Help is appreciated!
Click to expand...
Click to collapse
You needed to make a second partition EXT2 and format it. You then need to mount the partition. I did this by using the install-recovery.sh that it located in /system/etc. I used the following tutorial and it worked. I got over 12gb of space to install apps.
http://forum.xda-developers.com/showthread.php?t=832799
I did try to mount the new partition to /storage which is also /sdcard and i was still not able to use titanium backup to move apps. The only way i have alot of space is use this method.
I'm also mounting the fat32 partition to location /storage so that when i download apps thats where they are stored until you install them. Also Titanium backup dumps the backups here. This is done with a custom mod of Dexters 1.0c mod.
I did not use adb, i used a app called quicksshd which allows you secure ftp into the tablet and make changes. I suggest using a windows programs called winscp and putty.
Thanks for replying rfisher.
Turns out that my laptop lost the drive letter for the sd card. That's fixed now. When I insert the card into my laptop, it says that you need to format the card in the drive to use it. Any idea why?
I am confused by your instructions.
You said
You needed to make a second partition EXT2 and format it.
Click to expand...
Click to collapse
I did that. First partition is FAT 32, and second partition is EXT2, primary.
Maybe I didn't format the partition? I just created it.
I'll install busybox and see how far I can get with it.
With the other A7, I was never able to work with ADB.
This device really makes me feel like an idiot.
Still can't believe I was the first to get Google Apps working on my wife's tablet!
no adb
Well, the hours of frustration have returned...
I can't get adb running on my laptop.
I installed Android SDK.
When I type adb in the cmd window on my laptop, I get
"adb" is not recognized as an internal or external command, operable program or batch file"
I have tried moving the ADK folder to c:\
and
to:
C:\Users\Bucks HP
No luck.
I added the path c:\android-sdk-windows\platform-tools
to the environment variables in my system properties.
My head is going to explode!
Well, I got adb working, I think...
Problem was in the cmd window. I had to change the path.
Now, I can't install busybox. I followed the instructions from the wiki.
When I type "adb push busybox /data/local"
it returns: cannot stat 'busybox' : no such file or directory.
I pasted the busybox file in the
C:\android-sdk-windows\platform-tools
folder.
Was that the right place for it?
Is the busybox file just a text file?
Also, mine is named busybox-armv6l
Should it be renamed? I tried "adb push busybox-armv6l /data/local"
and got the same result...
I gave up on installing busybox via the wiki instructions.
I installed Titanium Backup and installed busybox through it.
Now, when I type: cd /system
mkdir sd
I get :
mkdir failed for sd, read-only file system
What does that mean and how do I fix it?
Thanks
The saga continues...
With the busybox from Titanium Backup installed,
I needed to type:
adb shell
su
mount -o remount,rw /dev/block/mmcblk3p1 /system
exit
exit
Then, following the tutorial, I am up to step 12:
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this we’ll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Android’s init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.
My question is: How do you create scripts?
You would create them with notepad++ which is a windows program. Then using adb push them to the /system/etc directory.
I used a app called quicksshd and a windows program called winscp to copy the files to the directory. If you used my method you first need to make the /system directory rw before it will let you copy the files. It worked for me, the only thing i did differently is edit init.rc to mount the first partition of the sd card to /storage, but this was creating a modded 1.0c rom. So the result is about 4gb for my sd memory and 12gb for installing apps.
jazzbone said:
The saga continues...
With the busybox from Titanium Backup installed,
I needed to type:
adb shell
su
mount -o remount,rw /dev/block/mmcblk3p1 /system
exit
exit
Then, following the tutorial, I am up to step 12:
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this we’ll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Android’s init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.
My question is: How do you create scripts?
Click to expand...
Click to collapse
Hi rfisher
Thanks for replying!
While waiting, I opened Notepad++, copied the text in the tutorial window into it and saved the file as Unix.
Then, I copied it to a USB drive, put it in the A7, and copied to the system/etc folder.
Is that acceptable?
Then, I followed steps 13-15.
I think I did something wrong. I am not seeing it in Root Explorer. What should I be looking for?
Was I supposed to install Apps2SD already?
I got winscp and quicksshd working. YEAH!
Used them to copy the files as you did.
Restarted A7.
Still don't see the other partition.
PS. I was just rereading your earlier post and you mentioned:
I did try to mount the new partition to /storage which is also /sdcard and i was still not able to use titanium backup to move apps. The only way i have alot of space is use this method.
I'm also mounting the fat32 partition to location /storage so that when i download apps thats where they are stored until you install them. Also Titanium backup dumps the backups here. This is done with a custom mod of Dexters 1.0c mod.
Looking on my A7, I don't see a location that is /storage
My tablet is fresh out of the box, without any firmware updates yet.

[Q] Boot partition access

On Root Explorer or other similar file explorers, the 'boot' partition seems to be missing, hidden or not accessible. Even Mount Manager can't find it. I think it's not a partition to be accessed as it is needed for booting.
The main reason for this thread is for http://forum.xda-developers.com/showthread.php?t=1196426. When backing up boot.img, it fails. I think this isn't directly related but the problem seems to occur to both the system and the user.
jhonnyx1000 said:
On Root Explorer or other similar file explorers, the 'boot' partition seems to be missing, hidden or not accessible. Even Mount Manager can't find it. I think it's not a partition to be accessed as it is needed for booting.
The main reason for this thread is for http://forum.xda-developers.com/showthread.php?t=1196426. When backing up boot.img, it fails. I think this isn't directly related but the problem seems to occur to both the system and the user.
Click to expand...
Click to collapse
I think this is due to the boot partition being extracted, which is why there's the /sys folder with the kernel in. Not all folders are from the system.img, you find that by extracting it
Quinny899 said:
I think this is due to the boot partition being extracted, which is why there's the /sys folder with the kernel in. Not all folders are from the system.img, you find that by extracting it
Click to expand...
Click to collapse
Thanks. Forgot about the distribution of components throughout different partitions.
Boot.img is not a folder, it makes up the filesystem structure, so in the boot ramdisk, there are files such as default.prop, init.swift.rc which are in the root filesystem (in root explorer) The ramdisk inside boot.img is what mounts all the partitions and prepares the filesystem. So it is set to mount the /system, /data partitions etc. The devices 1st bootloader (Hard bootloader) reads this partition then boots from it. Then the boot partition will load the Linux kernel, and begin to boot android.

External SD card write support for T530N? - solved

Is there any fix for external SD card write support for the T530N? I'm on a rooted stock Samsung build BOI2 ROM and TitaniumBackup is not happy .
UPDATE: I followed the information in the thread [FIX] SD Card Write Restriction ALL Firmwares and Models and it works.
I attached an edited platform.xml file in case anyone wants it. The upload is named platform.xml.txt so it has to be renamed to platform.xml before being copied to /system/etc/permissions
Obviously keep a backup copy of the original in case anything goes wrong. Also be careful, because if there are any problems or errors with that file and it can't be read by the system, there will be MAJOR issues. I recommend using the "more" command in the terminal emulator to validate that the file looks good, prior to copying it to /system/etc/permissions as outlined in the steps below.
Before being copied the /system directory must first be re-mounted as read-write with the following command:
mount -o remount,rw -t ext4 /dev/block/platform/msm_sdcc.1/by-name/system /system
Since I did not have a root file manager I just installed terminal emulator, switched to superuser with "su -", copied /system/etc/permissions/platform.xml to the sdcard, copied it to my computer, edited it, copied it back to sdcard, then copied it via the root shell to /system/etc/permissions.
I can verify it works and TitaniumBackup is now happy.
Aethera said:
Is there any fix for external SD card write support for the T530N? I'm on a rooted stock Samsung build BOI2 ROM and TitaniumBackup is not happy
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2716881

Categories

Resources