[REQ] Boot partition in internal memory. - Touch Diamond, MDA Compact IV ROM Development

Hi world!
I don't know if this is the right place to ask for this feature, since I guess this is more hardware dependent than just plain programming:
Is it possible to create a bootable partition in the internal memory of the Diamond?
This could possible kill my need for USB memory once and for all.

hello,
i do it with sd-cards under linux.
one possible way is to use vmware.
when you put your diamond to windows, select on diamond harddisc.
vmware-linux have to recognized a harddisc.
now you can make partitions with fdisk.
i know, my guideapplication is very grossly. but the two sentence
costs you more than five or more houers of work, if you dont know,
how to use fdisk or vmware with linux inside.
why you want partition your internal memory?
okokur

I do it in my X51V, it need if you want start a kernel linux boot.
with Linux partition manager you must create small partition swap in strorage memory and put the kernel img here, in the storage card you must put the haret.exe + config file.
the commands are:
The SD card needs to be partitioned into two partitions: one small FAT partition that WinCE can see, and one EXT2 partition used as root file system. I'll assume that the block device of the SD card is called /dev/sda. Replace this with the correct device on your system. Instruction could be slightly different for each version of fdisk :
* Delete all partitions on the SD card:
fdisk /dev/sda
d
1
d
2
d
3
* Create partitions, for example a 10MB /dev/sda1 and /dev/sda2 using the rest:
fdisk /dev/sda
n
p
1
<default> (should be cylinder 1)
+10M
n
p
2
<default>
<default> (should be last cylinder of the card)
t
1
4
w
* Create file systems, a VFAT on /dev/sda1 and EXT2 on /dev/sda2:
mkdosfs /dev/sda1
mke2fs /dev/sda2
* Copy HaRET, the kernel and default.txt onto sda1:
mount /dev/sda1 /mnt
[diamond] cp zImage???????????????/mnt/zImage
cp haret-0.4.8.exe /mnt/haret.exe
cp default.txt /mnt/default.txt
umount /dev/sda1
mount /dev/sda2 /mnt
[diamond] bzcat diamond?????????.rootfs.tar.bz2 | (cd /mnt; tar x)
umount /mnt
3) Boot
start haret.exe and tap the "Run" button...
enable Mirror Mode(Start -> Settings -> System>Mirror).
for Diamond you need Zimage and rootfs
look here http://linuxtogo.org/~lgorris/kaiser-bootkit/
for other problem or command here
http://forum.xda-developers.com/showthread.php?t=402002

I think it just works fine...
But Haret doesn't work on Diamond.

Related

Applications to your SD card ?

Hi guys,
sorry because this has probably been answered somewhere but I couldn't find it ....
So here it goes: I just installed Modaco's ROM and it works perfectly. Now I would like my apps to install directly on the SD card.
What I understand is that I need to create a EXT3 partition but I don't know what the hell that means, nor how to do it.
I just put my SD card in the hero, didn't format anything ....
Dould you give a step by step guide ? On how to create that EXT3 partition, how to use A2SD afterwards ? Also, what to do with the currently installed applications ?
Thanks
Geeum
Dould you give a step by step guide ?
Click to expand...
Click to collapse
http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/
how to use A2SD afterwards?
Click to expand...
Click to collapse
Just use MoDaCo's custom ROMs. (It will do it automatically)
can app2sd work with official ROMs not rooted?
Hi guys I finally partitioned my sdcard to have an ext3 partition.
I thought A2SD was automatic but apparently applications don't go to the sdcard: my phone memory has changed after I installed an app ...
Here is what I get if I type the 'print' command on parted
Code:
(parted) print
print
print
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 8166MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7110MB 7110MB primary fat32 lba
2 7110MB 8134MB 1024MB primary ext3
3 8134MB 8166MB 32.3MB primary linux-swap(v1)
So I DO have ext3. Then I found this post that explains how to check if A2SD is working:
Thanks! Here is my way to check if a2sd is working:
Check if the ext3 partition exists (please see androidandme.com for details):
Code:
# mount | grep mmcblk0p2
mount | grep mmcblk0p2
/dev/block/mmcblk0p2 on /system/sd type ext3 (rw,noatime,nodiratime,errors=continue,data=ordered)
Compare available/used space on mmcblk0p2:
Code:
adb shell
# df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98520 0 98520 0% /dev
tmpfs 4096 0 4096 0% /sqlite_stmt_journals
/dev/block/mtdblock3 174080 153460 20620 88% /system
/dev/block/mtdblock5 169728 27240 142488 16% /data
/dev/block/mtdblock4 133120 1160 131960 1% /cache
/dev/block/mmcblk0p2 468331 11767 431579 3% /system/sd
Now install an app from the market (as suggested by fleming222) and again run "df". Compare the available (or used) space on /dev/block/mmcblk0p2 with the first "df".
Click to expand...
Click to collapse
This is what I get (I can see on the first line that my ext3 is not listed ... weird)
Code:
/ # mount | grep mmcblk0p2
mount | grep mmcblk0p2
/ # df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98508 0 98508 0% /dev
/dev/block/mtdblock4 133120 1496 131624 1% /cache
HELP !
By the way I'm running MODACO's 2.6 custom ROM ...
Geeum said:
By the way I'm running MODACO's 2.6 custom ROM ...
Click to expand...
Click to collapse
The best way to do it if your not too good with the adb commands is to install the AMON recovery image for Hero.
It has all the options to create the correct sd card partitions from the recovery mode, then just install your custom rom and everything should work.
You will need to format your sd card so you may want to create a backup of it. And I would suggest that you wipe the phone clean as well. Once you install the modaco rom it automatically moves all of your apps to the sd card.
The link for the recovery image is here:
http://forum.xda-developers.com/showthread.php?t=561124
You will also need Instant Root (http://neilandtheresa.co.uk/Android/), which you should install first, it is an .apk file so you will need a file manager for your phone. It should pop up with a notification "instant root was successfully" or along those lines. (If you have a problem installing Instant Root make sure Settings>Applications>Unknown Sources is checked)
You should then place the AMON recovery image onto the sdcard making sure it is not put into any folders (root).
Instant root then allows for root access with adb shell using the following 2 commands:
1) adb shell
then
2) su
the icon should change from a $ to #.
Now flash the recovery image with the following command:
flash_image recovery /sdcard/recovery-RA-HERO-v1.2.3.img
That should do it, remove the usb and battery and once you have replaced the battery boot into recovery mode.
I ran the following commands in this order from recvoery mode:
- Wipe data + cache (factory reset)
- Wipe ext partition on SD-card
- Wipe Dalvik-cache on SD-card (NOT on /data !) [email protected] ALWAYS WORK
- Partition SD-card : 500MB Ext2, 32MB Swap, remaining Fat32
- Convert ext2 to ext3
- Installed ROM
Hope this helps
Hi and thanks for your reply. I finally sorted my problem, I was typing the commands from the recovery console, and now my ext3 shows:
Code:
# mount | grep mmcblk0p2
mount | grep mmcblk0p2
/dev/block/mmcblk0p2 on /system/sd type ext3 (rw,noatime,nodiratime,errors=conti
nue,data=ordered)
I checked the space with df, and I can see it changing when installing apps.
However, so does the 'internal memory of the phone' in the settings panel; it keeps getting smaller as I install apps
Why is that ?
really want to do this but i find it all to hard and confusing
Geeum said:
I checked the space with df, and I can see it changing when installing apps.
However, so does the 'internal memory of the phone' in the settings panel; it keeps getting smaller as I install apps
Why is that ?
Click to expand...
Click to collapse
I think this is inevitable as the app uses some part of the phone memory for cache files etc (I am not 100% certain on this, just saw it written in an older post on the same topic).
I do not know if this is a coincidence but for some reason I have tried partitioning manually (the way your doing it) in the past and have recently used the AMON recovery image for partitioning instead. I notice that the recovery image tends to use less of the internal storage for each installed app, I don't know why but you could try it out yourself.
guys, i am using modaco's 2.6 rom. so if i just create partitions this custom rom will automatically install newly installed apps to the sd card. right?
but what if i already got many apps installed? will those be deleted while creating partitions?
is there any way so that i can backup the whole application folder and restore after creating partitions?
cheers
apparently if you do ext2 + swap + fat32, you can't do a Nandroid backup (it keeps giving errors). anyone got similar issues?
kazuni said:
apparently if you do ext2 + swap + fat32, you can't do a Nandroid backup (it keeps giving errors). anyone got similar issues?
Click to expand...
Click to collapse
is it so? if so then that wud be a disaster.

[Q] Resize ext partition

Hi i have an ext partition of 512 mb . I want to inatall an hd rom but it's requirement is 1gb ext . How can i rezize the ext partition to 1gb. I have try rom manager but it give you only 512mb. I have downloaded gparted but i'm getting error after creating the partition. It won't apply the changes. Any help
GParted should work just fine - used it to resize my ext3 partition from 512 mb to 1 gb.
Are you trying to resize the partition when the phone is still on? - i.e. ROM loaded, USB in disk mode? - That would explain why the partitions are locked in some sense.
Can you try the following and post back if it was successful:
Mount the SD card using a card reader (i.e. not through your phone) and then try GParted to resize the partitions
OR (if you dont have a separate sd card reader)
Boot into recovery (ROM not yet loaded into memory to lock sections of your sdcard), and then try GParted to resize the partitions
You could also try using this tool to partition the sd card: MiniTool Partition Wizard, or even use the Amon-Ra recovery - flash it with unrEVOked and use that to partition your sd card.
As suggested above, you can try using an Ubuntu live cd of GParted by either burning it to a cd or boot it from a usb stick: http://www.ubuntu.com/desktop/get-ubuntu/download.
Or, you use it from within Ubuntu (vid: http://www.youtube.com/watch?v=sVK-t...eature=related)
1) Connect your phone to your computer (or use an SD Card adapter...., in this case skip to 4)
2) Pull down the notification bar and mount the phone
3) Start Gparted
4) Gparted will search available drives. (Your phone should show up as a USB drive, and will be something like /dev/sdb1 or /dev/sdc1, etc..)
Warning: double-check you've not selected a hdd by mistake!
5) In the upper right corner, select the correct USB device for your phone. (i.e. check to make sure it is correct size for your SD card)
6) Right click on each partition and select 'unmount'
7) Right click on each partition and select 'delete'
If you know what you are doing, you can re-size the partitions and add a new 2nd partition formatted as ext2/3/4
8) Right click on the big gray bar (should say unallocated x.xx gb) and click 'new'
9) Enter configurations
Free Space preceding = 0
Create as = Primary
New size = [don't touch]
File system = fat32
Free Space Following = 512 (or whatever you want)
10) Click add
11) Right click on the big gray bar (should say unallocated x.xx gb) and click 'new'
12) Enter configurations
Free Space preceding = 0
Create as = Primary
New size = [don't touch]
File system = ext2/3/4 (recommend ext4)
Free Space Following = 0 (or ~32 if you want swap)
Click add
13) Click edit, then 'Apply All Operations' to write changes to disk
14) Quit GParted
15) Unmount your SD Card
16) Reboot your phone
I had installed a dual boot with windows phone 7 and android. the partitions look like this:
fat (media files) ________________ | ext4 (android os) | ________________windowsphone 7
using gparted, i successfully deleted wp7 partition. now i tried moving the ext4 to the end so i could increase the size of the fat. but it won't let me. so then i tried copying the ext4 and pasting it at the end of what used to be the windowsphone7 (now is unallocated). but it keeps dropping the connection to the sdcard while its copying the files in the old ext4 to the new ext4 in the card reader and saying: end of file while reading Resource temporarily unavailable. it gives me at that point the options ' retry, cancel, ignore'.
i can't figure out what is wrong. i want to be able to preserve the file systems so i don't have to setup android and all the apps and files again, because i've moved to linux mint and i'm new to linux. and i don't know if all the necessary utilities i used on windows will work successfully under wine or playonlinux. etc..
help

[Q] Cannot Partition SD ext

Hi Guys, bought a sandisk 16 GB Card, i am trying to format the various partitions so far:
1. Using Clockwork it creates an unrecognised partition after FAT Partition
2. Tried Ubuntu - will format whole card in either FAT or EXT 2/3/4 but will not create an ext after the FAT Partition (again unknown partition format after FAT)
3. Tried minitool partition manager - Can fortmat whole card in either fat or EXT. Cannot create an EXT after FAT - Unknown partition format
4. Tried ADB, will create primary partition 1 but not an ext partition after
Card id new and i believe genuine
any help greatly appreciated
Well I use gparted boot cd and works fine
Sent from my HTC Desire using Tapatalk
ironjon said:
Well I use gparted boot cd and works fine
Sent from my HTC Desire using Tapatalk
Click to expand...
Click to collapse
+1
Otherwise flash amonra-recovery, create an ext2-partiton and upgrade this to an ext3-partition with this recovery.
Sent from my HTC Desire using XDA App
Have you tried Rom Manager? I used that to partition my 16GB sandisk
I used Ubuntu and it worked fine. Did you unmount the partitions in Ubuntu ?
Did you format the partition after you've created it ?
paul.c said:
I used Ubuntu and it worked fine. Did you unmount the partitions in Ubuntu ?
Did you format the partition after you've created it ?
Click to expand...
Click to collapse
Hi, thanks for the replies, yes i unmounted in ubuntu but i seem to only be able to create one (working) ext partition but it has to be the full card, or multiple Fat partitions. When i create an ext after the FAT32 partition all partition managers & ubuntu see the second partition as 'other' and it is full.
When creating an ext with ubuntu it indicates 'cannot mount invalid argument'.
I have not tried using AMON as i was unsure if it was dependent upon GSM or CDMA type phones and also any issues with Amoled or SLED (my desire is SLED).
Tried Rom Manager an it does not even attempt to create a partition, indicates complete but nothing when i view partitions with either partition managers or ubuntu.
Lastly, tried via ADB but again it threw an error when creating the second EXT Partition, it creates a partition of sorts but again unknown and full.
In all cases, i cannot format the ext partition with any tools i know - ubuntu, partition manager, Esaus, ADB
Never had this issue with my 8gb Nokia card
Many thanks for your help though guys & girls
hi,
i read you try to do this with adb.. did you try the folowing cmd?
Code:
Step 1: Connect your phone to your computer via USB. Reboot into recovery mode.
Command: adb shell reboot recovery (this will reboot your phone into Cyanogen’s recovery image. Or power on phone when holding home button)
Command: adb shell (type this after your phone has booted and on the recovery screen. it should take you to a # prompt)
Code:
Step 2: Open parted to partition your SD card.
Command: parted /dev/block/mmcblk0 (opens parted and mounts your SD card)
Code:
Step 3: Check the size and partitions of your SD card. The print command will display this info. You can see the size of my SD card is 7969 MB (8 GB). I have 1 partition which is fat32. If your SD card is blank and no partitions are listed, you can skip to Step 5.
Command: print (displays SD card information)
Code:
Step 4: Remove all existing partitions. If you have multiple partitions, remove each one at a time.
Command: rm 1 (deletes partition number 1)
Command: rm 2 (if needed. keep going till all partitions are removed)
Command: print (check when you are done to make sure all partitions are removed)
more info howTO parted there
hope this help
jamadant said:
Hi, thanks for the replies, yes i unmounted in ubuntu but i seem to only be able to create one (working) ext partition but it has to be the full card, or multiple Fat partitions. When i create an ext after the FAT32 partition all partition managers & ubuntu see the second partition as 'other' and it is full.
When creating an ext with ubuntu it indicates 'cannot mount invalid argument'.
I have not tried using AMON as i was unsure if it was dependent upon GSM or CDMA type phones and also any issues with Amoled or SLED (my desire is SLED).
Tried Rom Manager an it does not even attempt to create a partition, indicates complete but nothing when i view partitions with either partition managers or ubuntu.
Lastly, tried via ADB but again it threw an error when creating the second EXT Partition, it creates a partition of sorts but again unknown and full.
In all cases, i cannot format the ext partition with any tools i know - ubuntu, partition manager, Esaus, ADB
Never had this issue with my 8gb Nokia card
Many thanks for your help though guys & girls
Click to expand...
Click to collapse
The procedure should be this:
Insert SD, unmount. Create FAT, leave 1024, format FAT, format remaining as ext3/4.
fragargon said:
hi,
i read you try to do this with adb.. did you try the folowing cmd?
Code:
Step 1: Connect your phone to your computer via USB. Reboot into recovery mode.
Command: adb shell reboot recovery (this will reboot your phone into Cyanogen’s recovery image. Or power on phone when holding home button)
Command: adb shell (type this after your phone has booted and on the recovery screen. it should take you to a # prompt)
Code:
Step 2: Open parted to partition your SD card.
Command: parted /dev/block/mmcblk0 (opens parted and mounts your SD card)
Code:
Step 3: Check the size and partitions of your SD card. The print command will display this info. You can see the size of my SD card is 7969 MB (8 GB). I have 1 partition which is fat32. If your SD card is blank and no partitions are listed, you can skip to Step 5.
Command: print (displays SD card information)
Code:
Step 4: Remove all existing partitions. If you have multiple partitions, remove each one at a time.
Command: rm 1 (deletes partition number 1)
Command: rm 2 (if needed. keep going till all partitions are removed)
Command: print (check when you are done to make sure all partitions are removed)
more info howTO parted there
hope this help
Click to expand...
Click to collapse
Many thanks, tried this procedure again with the error message SEGV_MAPPER (Address not mapped to object) Aborted when i try to create EXT 2
Lost now
hi,
i look up the reason of that error, seems to be a bug from some lib.c inherited by parted but those are mention around 2006 amazing...
i know that the tut mentin ext2 as ext partition but why didn't try ext3 before doing this u can check out what does your actually partition says with
# fdisk -lu /dev/block/mmcblk0
give back the report plz
I suggest Amon-RA recovery.
It's very simple and fast
p.s: i don't suggest using Rom Manager, too much trouble
fragargon said:
hi,
i look up the reason of that error, seems to be a bug from some lib.c inherited by parted but those are mention around 2006 amazing...
i know that the tut mentin ext2 as ext partition but why didn't try ext3 before doing this u can check out what does your actually partition says with
# fdisk -lu /dev/block/mmcblk0
give back the report plz
Click to expand...
Click to collapse
Hi Thanks for your help, i tried to partition ext 2, 3 & 4 but get the same issue regardless of partition type. I believe that the card may be a fake as all the transferring from phone to usb card reader has started to make the branding 'rub off'.
Therefore, i have sent it back and will hopefully get a refund or replacement.
many thanks for your time & efforts
regards
jamadant
okay, so soon with new one anyway you know where to go if need it

Nook Touch Partition Hacking

Folks are starting to look at the ST partition table and the file layout on the ST. This post is intended for other folks with power tools to think about.
My goals:
- expose the BN content (so I can read the New Yorker on my NC, mostly, but also so I can manage the library on my ST with Calibre as I do on the NC)
- understand how much room I have on the internal memory
- increase the amount of memory available for sideloading.
I got in well over my head during a conference call last week, but my ST is reborn and now able to do cool things.
However: I did not start from a factory fresh partitioning scheme, sadly. My first backup of the device went permanently offline (the disk and linux install containing it) and I was unable to return to it after I'd borked the ST pretty badly on the call. All I really was sure of was the partition order.
The tools:
- "noogie." Available and discussed at http://nookdevs.com/NookTouch_Rooting
- the rooting disk from http://forum.xda-developers.com/showthread.php?t=1132693 (currently at 1-6-24 - mad props to the folks who put that together!)
- a working Linux installation with USB support. Vmware player in Windows works just fine for this.
Note: currently, that third element is key; this is not intended as a walkthrough that tons of people could follow today, but to spark awareness of the technique - it seems possible that something very much like the DeanG scripts for redoing the NC partitions could emerge. Hint Hint.
First: the noogie disk is super cool. You boot from it and it mounts all of your ST partitions. So you can get a complete backup in linux (or Mac) by :
#dd if=/dev/sdX of=virigin.ST.img bs=1M
A true disk image backup.
You could (if you were patient) get the individual partitions as well - there is value in doing that, because within the first three partitions your serial number is stored. It's possible to restore this image to a different ST -- but then you've also transferred your serial number. whoops.
You can mount the partitions in linux and copy all the files from each of them as well.
After you have a backup, power off, insert the simple touch root disk, and power up. It will boot to a screen that reads "rooted forever" (as does Noogie) and after a pause, will continue booting as it does some setup.
You will wind up with ADB enabled over wifi by default and google apps installed.
You may also need to restart immediately -- I've found that sometimes after rooting, my s/n is all zeroes. Restarting clears that.
I also find that in order to get the Android marketplace working, I need to hunt down a copy of Vending.apk that is 2 meg (2,125,824 bytes on disk) in size and install it over the copy that touchnooter installs. I believe this one is the one that folks use for cm7?
The command to install it is:
#adb install -r Vending.apk
The -r is needed to avoid getting told the signature's bad. It's a reinstall flag.
So , once rooted, you have access to ADB and to fdisk for examining and changing disk layout.
The layout is interesting. Here's the issue: I know the order of the layout, but I screwed up my partition boundaries before I started, so the actual values here are from AFTER I finished:
(these values are from the fdisk display; they are not commands)
/dev/block/mmcblk0p1 c Win95 FAT 1-38
/dev/block/mmcblk0p2 c Win95 FAT 39-46
/dev/block/mmcblk0p3 83 Linux 47-141
/dev/block/mmcblk0p4 5 Extended 142-926
/dev/block/mmcblk0p5 83 Linux 142-285
/dev/block/mmcblk0p6 6 FAT16 406-807
/dev/block/mmcblk0p7 83 Linux 808-926
/dev/block/mmcblk0p8 83 Linux 286-405
It's partitions 5-8 that are interesting.
5 is /system, and I leave it untouched.
6 is /media - the area you can copy files to. 6 is -- on my device -- the SECOND to last PHYSICAL partition.
7 is /cache. It is the LAST physical partition.
8 is /data - and it is the 6th PHYSICAL partition.
The device restore scripts from BN don't care how big the partitions are, but they do care what ORDER they're in.
I will give my current partition table at the end - I want to avoid posting a (wrong) copy of what I thought I started with, because I screwed it up.
A stock ST writes your purchases to /data, not to /media.
It writes them to /data/media, in fact.
So, first question: what happens if you do an
#rm -r
inside /data/media, then
#cd ..
#rmdir media
then do
#ln -s media /media to so you wind up with
lrwxrwxrwx root root 2011-08-29 20:19 media -> /media
in your /data partition?
1) It works
2) restart, grab stuff from BN - and you see it from your desktop system. Your content is visible.
Win!
Ok, so the next thing is: bugger . I only have 240 M or so of room for stuff now? Eh?
shell back in and use fdisk to delete the partitions and rebuild them.
The order is key here. They are named as they're made, but you need them laid out out of physical order.
The following worked for me:
#fdisk /dev/block/mmcblk0
d6
d6
d6
Partitions 6, 7 and 8 are gone now.
Next, to create partitions of a useful size in the correct order
n
(creates p6)
406 807
n
(creates p7)
808
926
n
(creates p8)
286 405
write your changes from fdisk.
reboot.
But - now you've picked stuff and moved it around. It's a Really Good Idea to reformat the partitions before use.
The best way is probably to use the mkfs tools on the device.
Best way, schmest way. I booted to Noogie and used qtparted in linux so I had a gui to doublecheck my partition layout.
formatted these as ext3 for the Linux partitions at 7 and 8, and as fat16 for the win partition at 6.
It's entirely possible that you could format that as fat32, but it comes from the factory at fat16 so I stuck with that.
Power down, remove noogie, power up.
I got a "failed to install" followed by a reboot followed by being back in the OS.
I did not have to reroot to get my apps, but I did need to reroot to fix the marketplace - the /data partition being blown out meant that the Android market was crashing.
Now, to finish:
go back in via adb and reestablish the symlink (you just blew it out when you resized /data)
So:
shell in
#cd /data/media
#rm -r
(only inside /data/media, it WILL tear out any files it sees.) then
#cd ..
#rmdir media
then do
#ln -s media /media
And your stuff is put on the /media directory and can be managed properly.
I think this stuff may well be scriptable.
There's a great thread on the repartitioning that I found last night, making use of sfdisk rather than fdisk:
http://forum.xda-developers.com/showthread.php?t=1225196
As far as I know, swapping /data/media out to /media is new, but if it's not I apologize for being unaware of it.
So, here's the layout I finished with:
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 38 77808 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p2 39 46 16384 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p3 47 141 194560 83 Linux
/dev/block/mmcblk0p4 142 926 1607680 5 Extended
/dev/block/mmcblk0p5 142 285 294896 83 Linux
/dev/block/mmcblk0p6 406 807 823296 6 FAT16
/dev/block/mmcblk0p7 808 926 243696 83 Linux
/dev/block/mmcblk0p8 286 405 245728 83 Linux
Partition table entries are not in disk order
Can you please format your commands in such a way that they look correctly? Current formatting in the post with your commands seem strange and incorrect.
I think all are OK except the fdisk commands.
Unfortuantely, the fdisk commands are given inside of an ascii gui of sorts, to there's really no 'great' way to represent them, I don't think.
I've prepend the others with # so it's obvious they're shell commands.
How's about symlinking various things to a 2nd partition (ext4?) on the sdcard then?
gparted?
Has anybody tried gparted to resize the partitions? If it works it could be useful.
Have any one tried doing it on windows and using which software? I'm thinking of mini tool's partition manager. But i'm not sure. Anyone?
roustabout said:
#cd /data/media
#rm -r
(only inside /data/media, it WILL tear out any files it sees.) then
#cd ..
#rmdir media
then do
#ln -s media /media
And your stuff is put on the /media directory and can be managed properly.
Click to expand...
Click to collapse
Thanks a lot for this, but the second and last lines are wrong:
rm -r should be rm -r *
ln -s media /media should be ln -s /media media
Still, thanks for the idea!
I wonder if symlinking to the sdcard could fix the whole 'shelves don't work for sideloaded books on sdcards' problem.

[MOD] Mounting sdcard as userdata(a/b dualboot hack)

Here's the setup, it assumes you want to assign your sdcard as data partition for slot b...
Have the same system on both slots during setup.
Pull vendor partitions(instructions assume your using linux), modify fstab files, reflash vendor images.
adb pull /dev/block/mapper/vendor_a vendor_a.img
adb pull /dev/block/mapper/vendor_a vendor_a.img
Resize vendor image to modify files within, extend the image by 100MB
e2fsck -vfy vendor_a.img
e2fsck -vfy vendor_b.img
For vendor_b.img do:
Get current size in MB ex output 1253
du -m vendor_b.img
Resize +100MB
resize2fs vendor_b.img 1353M
Mount the image to access content
mkdir mnt
mount vendor_b.img mnt
Replace fstab.default and fstab.emmc with examples provided, sync, unmount.
cat fstab.default.sdmod.b.txt >mnt/etc/fstab.default
cat fstab.emmc.sdmod.b.txt >mnt/etc/fstab.emmc
sync
umount mnt
For vendor_a.img we hide the sdcard from vold. Keeping slot a system from declaring the sdcard as corrupted with the persistent notification about formating the card.
Get current size in MB ex output 1253
du -m vendor_a.img
Resize +100MB
resize2fs vendor_a.img 1353M
Mount the image to access content
mount vendor_a.img mnt
cat fstab.default.sdmod.a.txt >mnt/etc/fstab.default
cat fstab.default.emmc.a.txt >mnt/etc/fstabs.emmc
sync
umount mnt
Reboot phone into fastbootd, flash vendor images
fastboot flash vendor_a vendor_a.img
fastboot flash vendor_b vendor_b.img
Setup an sdcard with gpt partition map and one f2fs partition
Example device paths are: /dev/sdb(sdcard mounted with usb) or /dev/mmcblk0(sdcard mounted in card reader)
Get this CORRECT to avoid damaging other storage devices!
fdisk /dev/mmcblk0
g
n
(use defaults for partition size etc. We format with make_f2fs from platform tools next)
w
/path/to/platform-tools/make_f2fs /dev/mmcblk0p1
With freshly formated sdcard in phone, and both vendor a and b images flashed to respective slots, we set slot b as active and boot it.
fastboot set_active b
fastboot reboot
UFS(internal) data is/stays encrypted
SDHCI(sdcard) is not encrypted.
Mount slot b's data partition inside slot a with
adb shell mkdir /data/mnt
adb shell mount /dev/block/mmcblk0p1 /data/mnt
Use a root file explorer to get into /data/mnt
Todo:
Possibly encrypt sdcard, not sure if android allows two encrypted partitions, may be one or the other. I have an example fstab line in the file, however I did not get phone to boot with sdcard encrypted flags.
Modify orangefox recovery to see sdcard as data partition to allow formatting the partition on device(other than running make_f2fs from slot a)
Upload vender images to androidfilehost to download
mrbox23 said:
Here's the setup, it assumes you want to assign your sdcard as data partition for slot b...
Have the same system on both slots during setup.
Pull vendor partitions(instructions assume your using linux), modify fstab files, reflash vendor images.
adb pull /dev/block/mapper/vendor_a vendor_a.img
adb pull /dev/block/mapper/vendor_a vendor_a.img
Resize vendor image to modify files within, extend the image by 100MB
e2fsck -vfy vendor_a.img
e2fsck -vfy vendor_b.img
For vendor_b.img do:
Get current size in MB ex output 1253
du -m vendor_b.img
Resize +100MB
resize2fs vendor_b.img 1353M
Mount the image to access content
mkdir mnt
mount vendor_b.img mnt
Replace fstab.default and fstab.emmc with examples provided, sync, unmount.
cat fstab.default.sdmod.b.txt >mnt/etc/fstab.default
cat fstab.emmc.sdmod.b.txt >mnt/etc/fstab.emmc
sync
umount mnt
For vendor_a.img we hide the sdcard from vold. Keeping slot a system from declaring the sdcard as corrupted with the persistent notification about formating the card.
Get current size in MB ex output 1253
du -m vendor_a.img
Resize +100MB
resize2fs vendor_a.img 1353M
Mount the image to access content
mount vendor_a.img mnt
cat fstab.default.sdmod.a.txt >mnt/etc/fstab.default
cat fstab.default.emmc.a.txt >mnt/etc/fstabs.emmc
sync
umount mnt
Reboot phone into fastbootd, flash vendor images
fastboot flash vendor_a vendor_a.img
fastboot flash vendor_b vendor_b.img
Setup an sdcard with gpt partition map and one f2fs partition
Example device paths are: /dev/sdb(sdcard mounted with usb) or /dev/mmcblk0(sdcard mounted in card reader)
Get this CORRECT to avoid damaging other storage devices!
fdisk /dev/mmcblk0
g
n
(use defaults for partition size etc. We format with make_f2fs from platform tools next)
w
/path/to/platform-tools/make_f2fs /dev/mmcblk0p1
With freshly formated sdcard in phone, and both vendor a and b images flashed to respective slots, we set slot b as active and boot it.
fastboot set_active b
fastboot reboot
UFS(internal) data is/stays encrypted
SDHCI(sdcard) is not encrypted.
Mount slot b's data partition inside slot a with
adb shell mkdir /data/mnt
adb shell mount /dev/block/mmcblk0p1 /data/mnt
Use a root file explorer to get into /data/mnt
Todo:
Possibly encrypt sdcard, not sure if android allows two encrypted partitions, may be one or the other. I have an example fstab line in the file, however I did not get phone to boot with sdcard encrypted flags.
Modify orangefox recovery to see sdcard as data partition to allow formatting the partition on device(other than running make_f2fs from slot a)
Upload vender images to androidfilehost to download
Click to expand...
Click to collapse
I would rather buy another phone

Categories

Resources