Jump to content


Photo

Hardware hacking this puppy, input?


  • Please log in to reply
265 replies to this topic

#21
deekarma

deekarma

    Regular

  • Members
  • PipPip
  • 68 posts
Big props if we can get a step by step tutorial!

  • 0

#22
Dogmann55

Dogmann55

    Enthusiast

  • Members
  • PipPipPip
  • 226 posts
  • Location:London
  • Interests:Dobermann's, Mobile Data, F1
  • Devices:Streak 32GB Setve's Froyo
Hi plink212

Sounds really good waiting to see how the next steps go but so far it sounds amazing especially if it means we can end up with 64GB of storage and it's faster. Just one question though what will happen when the 2.2 update is released would you need to replace the original card and then do it all again?

Marc

  • 0
Dell Streak 32GB Unlocked
Froyo V1.6.1 By DJ_Steve

The only problem with common sense is it's just not that common

#23
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak
Bravo plink212!

If you have a Linux box it would be easier to create the partitions to suite your storage device as partitions 5 and 6 and then format them ext3.
Use tar to copy the files over to their respective partitions to get the perms right.

Should work right away and give you the full card to use without having to modify mount tables. You would have had to dd only if there were boot partitions on that card, but there's not so it's unnecessary.

Edited by popetodd, 24 June 2010 - 02:21 AM.

  • 0

#24
t-bon3

t-bon3

    Newbie

  • Members
  • Pip
  • 48 posts
  • Gender:Male
  • Interests:Android
  • Devices:LG G2, Nexus 7

Time to order a 32Gb class 10 and see how much quicker this will run.

Where are you going to get a 32Gb Class 10 MicroSD card? eBay? ;)

  • 0

#25
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak

Where are you going to get a 32Gb Class 10 MicroSD card? eBay? :(

Apparently no where just yet! :)
So I'll do the next best and grab a 16Gb Class 10. ;)

  • 0

#26
plink212

plink212

    Newbie

  • Members
  • Pip
  • 46 posts
  • Location:London
OK so have hit a few speed bumps here
It appears that the filesystems are mapped by init.rc and that this file is stored in the boot.img file which is loaded at each boot.
This means that I can use my extra space but only manually, as I cannot use vold to mount the partition for me.
So here is where I am at
1. work out how to modify the boot image to create a sub folder under /sdcard on the rootfs and modify vold.conf to mount the sdcard to the subfolder, then modify init.rc to mount the internal partition to /sdcard
2. leave everything as it is and mount my new partition to a folder I create on each boot.

any tips and tricks would be appreciated

Tim

  • 0

#27
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak

OK so have hit a few speed bumps here
It appears that the filesystems are mapped by init.rc and that this file is stored in the boot.img file which is loaded at each boot.
This means that I can use my extra space but only manually, as I cannot use vold to mount the partition for me.
So here is where I am at
1. work out how to modify the boot image to create a sub folder under /sdcard on the rootfs and modify vold.conf to mount the sdcard to the subfolder, then modify init.rc to mount the internal partition to /sdcard
2. leave everything as it is and mount my new partition to a folder I create on each boot.

any tips and tricks would be appreciated

Tim

Do you have a Linux box available to repartition and format this card with?
If so give what I outlined above a shot, I bet it works.

  • 0

#28
plink212

plink212

    Newbie

  • Members
  • Pip
  • 46 posts
  • Location:London

Do you have a Linux box available to repartition and format this card with?
If so give what I outlined above a shot, I bet it works.


Problem with that is that say I extended partition 6 i would have a large /data partition and if i extended partition 5 i would have a large cache partition
The numbers need to be 5 and 6 as they are the entries in the init.rc file.
Unless of course I have completely missed the point of what you are suggesting

Tim

  • 0

#29
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak

Problem with that is that say I extended partition 6 i would have a large /data partition and if i extended partition 5 i would have a large cache partition
The numbers need to be 5 and 6 as they are the entries in the init.rc file.
Unless of course I have completely missed the point of what you are suggesting

Tim

You do misunderstand (or maybe I do...).

What you want is a large data partition and a reasonable cache.
This card is where the apps get installed to and the data partition is where that happens.

So in Linux run fdisk, create partitions 1->4 with a single sector apiece, that will take care of any partition reordering that may occur.
Create partition 5 and make it reasonable, it's just a cache partition, say around 1Gb (twice the internal memory).
Create partition 6 and make it the rest of the card.
Then format each one with ext3.
Then copy over the data from the respective partitions on the original card using tar.
Put it back in and boot it up, that OS will mount it and it should show as a ton of space to install programs into.

I don't think you are going to be using the internal card as some kind of extra storage unless you play some games like creating a partition from what you have after you dd that is the rest of the card, mount it by hand as a subdirectory hanging off the /sdcard directory and then make a script that runs on startup that mounts it there all the time. But even that should be trivial.

Come to think of it that kind of opens up the possibility of a secret (security through obscurity) storage space that is only accessible when mounted but isn't obvious due to the devices factory specified 2 Gb internal capacity. Hmmm...

Edited by popetodd, 24 June 2010 - 08:17 PM.

  • 0

#30
plink212

plink212

    Newbie

  • Members
  • Pip
  • 46 posts
  • Location:London

You do misunderstand (or maybe I do...).

What you want is a large data partition and a reasonable cache.
This card is where the apps get installed to and the data partition is where that happens.

So in Linux run fdisk, create partitions 1->4 with a single sector apiece, that will take care of any partition reordering that may occur.
Create partition 5 and make it reasonable, it's just a cache partition, say around 1Gb (twice the internal memory).
Create partition 6 and make it the rest of the card.
Then format each one with ext3.
Then copy over the data from the respective partitions on the original card using tar.
Put it back in and boot it up, that OS will mount it and it should show as a ton of space to install programs into.

I don't think you are going to be using the internal card as some kind of extra storage unless you play some games like creating a partition from what you have after you dd that is the rest of the card, mount it by hand as a subdirectory hanging off the /sdcard directory and then make a script that runs on startup that mounts it there all the time. But even that should be trivial.

Come to think of it that kind of opens up the possibility of a secret (security through obscurity) storage space that is only accessible when mounted but isn't obvious due to the devices factory specified 2 Gb internal capacity. Hmmm...

hmm, okay with you know.
I was thinking of using the space for media, do I really need that amount of space for applications?
I like the idea of a startup script have you any ideas of how to make one.
Also if you mount the extra space beneath /sdcard then when you connect the streak in mass storage it will not work as you will not be able to dismount the /sdcard mount as it will have a locked folder, no?
What I think the ideal solution would be to use vold/dbus or something similar to automount the space beneath the sdcard or mount the sdcard beneath the /sdcard mount, as the dell media app if nothing else seems to look directly at the /sdcard mount point

Tim

  • 0

#31
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak

hmm, okay with you know.
I was thinking of using the space for media, do I really need that amount of space for applications?
I like the idea of a startup script have you any ideas of how to make one.
Also if you mount the extra space beneath /sdcard then when you connect the streak in mass storage it will not work as you will not be able to dismount the /sdcard mount as it will have a locked folder, no?
What I think the ideal solution would be to use vold/dbus or something similar to automount the space beneath the sdcard or mount the sdcard beneath the /sdcard mount, as the dell media app if nothing else seems to look directly at the /sdcard mount point

Tim

Hmm, excellent points.

Don't want to use vold for this as it won't need to be controlled for random mounting.
First things first though, have you picked up Root Explorer yet? With this you can make the flash read write and create a mount point and edit files on it. This would be the first step as a directory in root (/intstorage for example) needs to be created for a mount point.
vold.cfg looks good but I am sure there is a standard Unix type fstab somewhere that can be edited to add the mount to, as I said this can be done with Root Explorer and should persist through a shutdown and restart.
I'll start looking now for the fstab file for Android, if you know what and where this is let me know and I'll get you the exact string to add to it.
Same for all you devs out there, pipe in if you already know where this is to save us some time looking for it.

[EDIT] Found it, it's /init.rc.
I'm working out what out add and where to add it.

Edited by popetodd, 24 June 2010 - 10:37 PM.

  • 0

#32
plink212

plink212

    Newbie

  • Members
  • Pip
  • 46 posts
  • Location:London

Hmm, excellent points.

Don't want to use vold for this as it won't need to be controlled for random mounting.
First things first though, have you picked up Root Explorer yet? With this you can make the flash read write and create a mount point and edit files on it. This would be the first step as a directory in root (/intstorage for example) needs to be created for a mount point.
vold.cfg looks good but I am sure there is a standard Unix type fstab somewhere that can be edited to add the mount to, as I said this can be done with Root Explorer and should persist through a shutdown and restart.
I'll start looking now for the fstab file for Android, if you know what and where this is let me know and I'll get you the exact string to add to it.
Same for all you devs out there, pipe in if you already know where this is to save us some time looking for it.

[EDIT] Found it, it's /init.rc.
I'm working out what out add and where to add it.

Problem with the init.rc is that the rootfs partition that it loads into is a ram disk and all changes seem to be lost at restart

Edited by plink212, 25 June 2010 - 12:13 PM.

  • 0

#33
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak

Problem with the init.rc is that the rootfs partition that it loads into is a ram disk and all changes seem to be lost at restart

Yup. I see that is the issue.

So, without actually modifying the image itself (looks like that is what will be required to make it a perm change) a script that can be run after startup looks like the best way.

Something like this then:
#!/system/bin/sh/system/bin/mount -w -o remount rootfs //system/bin/mkdir /storage/system/bin/mount -t ext3 -w /dev/block/innersd0p1 /storage/system/bin/mount -r -o remount rootfs /
This assumes that your new partition is number 1, if it is not change the "p" designation in the block device to the partition number you set up for the extra space on the card. It also assumes that you have formatted the filesystem in that partition as ext3.

I read on another thread in another platform forum here that someone thought Paul was placing init scripts in /data/system/etc/init.d to have them run at boot, if that is the case you could call this script S99InternalMount or similar and place it in that directory and it should mount up the partition after the system has started.

[EDIT] Nope, that's not the init script directory on this device. Will look around a bit to see if I can find one.
On the plus side the script work perfectly to create the mount pint.

Then to access it while plugged in through USB place a soft link on the SD card to this directory? Don't know if that will work as there is some funny business with the SD card when USB charging.

Be sure to chmod 755 so no one will be able to start something you don't want started by modifying the file.

Edited by popetodd, 25 June 2010 - 03:30 PM.

  • 0

#34
Shift_

Shift_

    Newbie

  • Members
  • Pip
  • 12 posts
I wonder why they decided to use microsd cards as main memory...it seems much slower than having memory directly onto the board.

  • 0

#35
rovex

rovex

    Enthusiast

  • Members
  • PipPipPip
  • 242 posts
  • Devices:Dell Streak
  • Twitter:@Rovex
Not really, its not main memory, its storage so the effect isn't particularly significant.

  • 0

#36
plink212

plink212

    Newbie

  • Members
  • Pip
  • 46 posts
  • Location:London
ok was wondering if this might help us
service flash_recovery /system/etc/install-recovery.sh
disabled
oneshot

#Jeff flash recovery image
on property:sys.init.fdiskcmd_complete=1
start flash_recovery


it seems that, that shell script does not exist in /system/etc/ if this is the case maybe we can use it to our advantage and run the remount script that way

Tim

  • 0

#37
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak
You know Tim, I have some apps on my machine that I installed that start up at boot so there must be a way to register them or a file they create somewhere that does this. It's just a matter of figuring out what and where and then the script can be run automatically.

  • 0

#38
craigdabbs

craigdabbs

    Regular

  • Members
  • PipPip
  • 92 posts
  • Devices:Touch HD

You know Tim, I have some apps on my machine that I installed that start up at boot so there must be a way to register them or a file they create somewhere that does this. It's just a matter of figuring out what and where and then the script can be run automatically.


im using startup manager to stop all these programs starting up for no reason, in the apps there is a custom tab where you can run your own programs at start. I assume you can somehow add it there or find aanother similar app. Iv not done this btw. You need root tho, but thats not so bad to get done :lol:

  • 0
T-Mobile MDA Compact - Nokia N95 - Touch HD - Dell Streak (streakdroid 1.5.1)

#39
popetodd

popetodd

    Diehard

  • Members
  • PipPipPipPip
  • 479 posts
  • Gender:Male
  • Location:Northampton, UK
  • Devices:iPaq HW6945, Dell Streak
Just gave that a try, couldn't find anywhere that I could specify a particular script to run from.

Edited by popetodd, 26 June 2010 - 11:18 PM.

  • 0

#40
plink212

plink212

    Newbie

  • Members
  • Pip
  • 46 posts
  • Location:London

Just gave that a try, couldn't find anywhere that I could specify a particular script to run from.

Going to try this to edit the init.rc
Howto: edit boot images

Tim

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users