Related
Yeah, first thing the 'uber coders' will think is 'google it' or 'rtfm'. Well been all over and still can't get it to work. But I'll jump though the hoops and hopefully someone will point out where the missing information is. As much documentation that is out there for Android, there is much left to be desired and checked for clarity. So here it goes:
After having many issues with Clockwork Mod recovery, I finally got AmonRA installed and was able to install CM5.0.7 (8 would not install properly at all...too many broken thing like FCs on settings and such).
Things I have done to try to get Apps2SD working:
1/ Manually partitioned SD card
2/ Use Recovery option to partition the card (converted to EXT4 as per Cyanogen's suggestion)
3/ Tried following advice here: http://code.google.com/p/android-roms/wiki/A2SD
4/ Tried following advice here: http://forum.xda-developers.com/showthread.php?t=520582
- which leads to here: http://forum.xda-developers.com/showpost.php?p=3879988&postcount=41 (which seriously need to be re-written.you can't type adb push while already in adb shell....not recognized)
5/ Ubuntu's Disk Utility tells me the EXT4 partition is clean.
So where to go from here? Nothing seems to make any sort of impact on this phone.
...to the QnA section.....
have you enabled apps2sd?
Settings>Applications and tick the Apps2SD box
Moved as not development.
garok89 said:
...to the QnA section.....
Click to expand...
Click to collapse
Nope, looking now....so far I've got 3 tabs opened because of that....this process is seriously sad. Why are there so many ways (some more poorly written than others) to do the same damn thing that the ROM is supposed to do itself? Don't worry, I'll try yet again another set of instructions to get this to work. Geeze....wasn't this hard the last time I enabled it. Seriously, I do't know why I torture myself with this....
garok89 said:
have you enabled apps2sd?
Settings>Applications and tick the Apps2SD box
Click to expand...
Click to collapse
See, now that's just insulting. Although I will forgive you if you have some sort of mental deficiency and missed reading the subject of this thread.....but just in case, I'll return the favour. If "Apps2SD" is greyed out, that means I am at Settings/Applications and quite have the capability to select option on the phone by pressing/touching the screen. Guess what.....it stayed greyed out. This is why I have a new thread here with the 5 other things that I've read, quite exhaustively, to whit there have been no positive results.
So, following the directions outline here: http://forum.xda-developers.com/showthread.php?t=534714
NO freaking change. This is on a fresh ROM install of 5.0.7. Seriously, My card size in 8GB, like his, so I used almost his numbers, just a few bytes different, and nada.
Talk about a sad state.
Yes I repartitioned the card, yes I wiped the partitions (after reinstalling the first time and getting nothing but FCs, wiped each section available in the Amon RA recovery menu....three times each.)
So, let's try yet another method.....
I downloaded Apps2SD.apk. Installed it and ran it....guess what...it aid my card wasn't paritioned?!?! Umm....wft? Why the hell was CM NOT seeing the paritions? This card has been partitioned at least 20 times in the last month, in various methods. Yeah, this i good for it's lifespan....
So I went through it's partitioning process...guess what...still greyed out.
Opened the app again... "It looks like your SD cars isn't partitioned..."...are you kidding me?? (yes the app was granted Super User permissions when it ran....)
So....where do I find the part in CM that is broken and not allowing Apps2SD to work?
How is it that after wiping each item THREE TIMES in th recovery list, and a FRESH INSTALL that my background is still the same????
What is not being wiped?
with 2.1 theres an option for all your settings to be backed up to google. if your background is stored in the same folder on the fat32 partition of your sd card, when you load the new rom, your phone will set your background to what it was.
i know because i went from 5.07 with one background to jubeh's 2.2 with another background, needed gps, wiped EVERYTHING(data, system, ext partition etc.) in RAmon's recovery, flashed 5.08 and had my old background from 5.07 set, along with all my old apps downloading automatically...half hour later and my phone was done syncing and set up exactly how i like it, w/o me doing anythin.
that's how your background is still the same. =P
edit: looking at your signature..is your ext fs first on your sd card? i might be wrong but i think the fat32 needs to be first???
JadedTech said:
Nope, looking now....so far I've got 3 tabs opened because of that....this process is seriously sad. Why are there so many ways (some more poorly written than others) to do the same damn thing that the ROM is supposed to do itself? Don't worry, I'll try yet again another set of instructions to get this to work. Geeze....wasn't this hard the last time I enabled it. Seriously, I do't know why I torture myself with this....
See, now that's just insulting. Although I will forgive you if you have some sort of mental deficiency and missed reading the subject of this thread.....but just in case, I'll return the favour. If "Apps2SD" is greyed out, that means I am at Settings/Applications and quite have the capability to select option on the phone by pressing/touching the screen. Guess what.....it stayed greyed out. This is why I have a new thread here with the 5 other things that I've read, quite exhaustively, to whit there have been no positive results.
Click to expand...
Click to collapse
i was not attempting to be insulting, i run the cmupdater support and have received numerous "app2sd is greyed out" emails when in fact it was the "move to sd" that was greyed out, not the apps2sd toggle. so get down from your high horse and dont assume that you are better than anyone else. in my experience dealing with hundreds of support requests, i have found it is the person who asks the question, not the people who attempt to help, who are the problem.
"computers don't make mistakes, people using computers make mistakes" comes to mind...
although ubuntu is showing it as clean, choose the "repair SD.ext" option in the recovery...
and although it is unlikely to correct it, fix apk uid mismatches. apps2sd can be a funny thing which can work one day and not the other at times.....
i dont know why i am still trying to help you after pretty much calling me mentally retarded, but hey....
oh, and by "the qna section" i meant that you asked a question in the development area, ie. the wrong section
See, now that's just insulting. Although I will forgive you if you have some sort of mental deficiency and missed reading the subject of this thread.....but just in case, I'll return the favour. If "Apps2SD" is greyed out, that means I am at Settings/Applications and quite have the capability to select option on the phone by pressing/touching the screen. Guess what.....it stayed greyed out. This is why I have a new thread here with the 5 other things that I've read, quite exhaustively, to whit there have been no positive results.[/QUOTE]
you have to have a partition and it will not be greyed out
Either the poor behavior in this thread is going to stop or I'll close it. There is no need to be insulting in any way.
garok89 said:
i was not attempting to be insulting, i run the cmupdater support and have received numerous "app2sd is greyed out" emails when in fact it was the "move to sd" that was greyed out, not the apps2sd toggle. so get down from your high horse and dont assume that you are better than anyone else. in my experience dealing with hundreds of support requests, i have found it is the person who asks the question, not the people who attempt to help, who are the problem.
Click to expand...
Click to collapse
Ok, a few things to clear:
1/ This has truly been one of my frustrating experiences in all the tech I have ever played with (and that's pushing 30 years). Granted you would not know my experiences and my tenaciousness in following directions, despite them having me going off-the-beaten-path because something does not fit any proposed remedy.
What was insulting was the fact that you assumed that I wouldn't check the most basic thing when the ONLY indication that Apps2SD was not working was that tick being greyed out. But that would be because I didn't go into great detail about that. I was kinda hoping that was a given because without it being ticked, it obviously doesn't work.
So, since there was some bas assumptions made, allow me to be the first to apologize deeply and hopefully we can move forward.
garok89 said:
"computers don't make mistakes, people using computers make mistakes" comes to mind...
although ubuntu is showing it as clean, choose the "repair SD.ext" option in the recovery...
Click to expand...
Click to collapse
Did that, no change. Although I will add in that your quote applies just as well to programmers as it does the users
garok89 said:
and although it is unlikely to correct it, fix apk uid mismatches. apps2sd can be a funny thing which can work one day and not the other at times.....
Click to expand...
Click to collapse
Well, doesn't seem to work at all here.<shrug>
garok89 said:
i dont know why i am still trying to help you after pretty much calling me mentally retarded, but hey....
Click to expand...
Click to collapse
That would be because I think you recognized how frustrated I have been and in reality, I'm not really venting at you but at the lack of a solution, despite there being soo many ways to supposedly fix this issue. That would also be because you are most likely the kind of techie that hates to see things not work and will spend more time trying to fix it rather than give in and simply 'reinstall' because you want to know the reason why it happened in the first place. Maybe I'm wrong there, maybe I'm not. I'm am seriously glad that you are taking your time because not a single other person has.
garok89 said:
oh, and by "the qna section" i meant that you asked a question in the development area, ie. the wrong section
Click to expand...
Click to collapse
Yeah, I forgot to apologize to the mod for that. Sorry Mod....
So, have any other ideas how to fix this? I am rather loathe to just try to 'update in hopes that it automagically fixes the issue' approach.
tdt1345 said:
you have to have a partition and it will not be greyed out
Click to expand...
Click to collapse
You might want to read my first post again.....
"Things I have done to try to get Apps2SD working:
1/ Manually partitioned SD card"
jamesd86 said:
with 2.1 theres an option for all your settings to be backed up to google. if your background is stored in the same folder on the fat32 partition of your sd card, when you load the new rom, your phone will set your background to what it was.
i know because i went from 5.07 with one background to jubeh's 2.2 with another background, needed gps, wiped EVERYTHING(data, system, ext partition etc.) in RAmon's recovery, flashed 5.08 and had my old background from 5.07 set, along with all my old apps downloading automatically...half hour later and my phone was done syncing and set up exactly how i like it, w/o me doing anythin.
that's how your background is still the same. =P
edit: looking at your signature..is your ext fs first on your sd card? i might be wrong but i think the fat32 needs to be first???
Click to expand...
Click to collapse
Yeah...I realized this after I left the house and was getting into the car. Just too frustrated when I posted. It was one of those 'don't drink and drive' but more of a 'don't vent and post' type of deals....well, at least not here. Thanks any ways.
have you tried ext2 before upgrading to ext4?
ext4 didnt like my spare g1 too much....but my main one got along fine with it
JadedTech said:
1/ Manually partitioned SD card"
Click to expand...
Click to collapse
Is the partition system ids correct:
Code:
# fdisk /dev/block/mmcblk0
Command (m for help): p
Disk /dev/block/mmcblk0: 8166 MB, 8166309888 bytes
252 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 15624 * 512 = 7999488 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 952 7436993 b Win95 FAT32
/dev/block/mmcblk0p2 953 1020 531216 83 Linux
Command (m for help):
The 'b' for the vfat partition and '83' for ext
The startup scripts use there values for some autodetection in cm5.
If all you change is the Id data wont be lost but you are at fault if you don't backup.
garok89 said:
have you tried ext2 before upgrading to ext4?
ext4 didnt like my spare g1 too much....but my main one got along fine with it
Click to expand...
Click to collapse
That is a very interesting observation as I have been automatically upgradeding to EXT4 (as I did read that is what Cyanogen uses...figured if it was good enough for him....) so I just reformatted my SD card from the Recovery partition into EXT2 with a 32MBswap and the rest in FAT32. No change. Damn....seemed like one of those 'simple and yet not obvious' type of answers that may have worked too...
ezterry said:
Is the partition system ids correct:
Code:
# fdisk /dev/block/mmcblk0
Command (m for help): p
Disk /dev/block/mmcblk0: 8166 MB, 8166309888 bytes
252 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 15624 * 512 = 7999488 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 952 7436993 b Win95 FAT32
/dev/block/mmcblk0p2 953 1020 531216 83 Linux
Command (m for help):
The 'b' for the vfat partition and '83' for ext
The startup scripts use there values for some autodetection in cm5.
If all you change is the Id data wont be lost but you are at fault if you don't backup.
Click to expand...
Click to collapse
Now this produced something interesting.
Code:
# fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 243328.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help):
#
So, how does one go about fixing this if this is the reason that "in certain setups cause problems"? This seems to be a likely candidate for the root of the issue.
Redo partitions in Fdisk?
instead of doing it from recovery
do it from ubuntu via gparted
Sorry for jumping in here but... A while back Dusty wrote a great tut for doing this correctly. Did you follow his thread instructions? If not, take a look. It may have the key to your happiness.
http://forum.xda-developers.com/showthread.php?t=534714&highlight=51dusty
JadedTech said:
So, how does one go about fixing this if this is the reason that "in certain setups cause problems"? This seems to be a likely candidate for the root of the issue.
Redo partitions in Fdisk?
Click to expand...
Click to collapse
The size warning only applies to the short falls of BIOS booting x86 PCs. We don't boot the dream from the sdcard or is the phone booted with a x86 BIOS...
If it was you need to ensure the boot partition is near to the beginning of the disk.. you can safely ignore it
Hi!
Last 48h I've been digging forums for an answer. Is it possible to partition SD Card in Milestone using "parted" and THIS guide?
The problem comes with one little thing:
Code:
C:\Users\DrNO>adb shell
Milestone-Recovery:/
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
bash: parted: command not found
Milestone-Recovery:/
# exit
After sleepless night I'm richer in knowledge that (probably) parted is not included in AOR (it's 3.3 that I'm using) [as zeppelinrox posted HERE]
OK, 51dusty used CM recovery, I've tried CMR2.5.0.7, with little success. Maybe I've used it the wrong way but hey!... First I had trouble finding it, then tried to install/flash it through "ROM Manager 4.x", ok it said that's done, reboot into recovery > "Error". Then I looked into the package it looked like an "update" to apply in AOR. It worked, but "adb shell" freezes, it unfreezes after closing CMR. wtf... it was 3 a.m.
1. Am I doing something wrong?
2. Is it possible to implement "parted" in AOR
3. Is it possible to use mentioned above guide on Milestone?
The reason is to part SD "the right way" and split it: FAT32+EXT2(3)+SWAP
Please, help
You can't have swap on Milestone.
And... that's the guide that I used as well... I made a step by step post about it... see my Handy Dandy Fixes thread I linked to it in there... I think I called it "The Hard Way" but ended up being fun...
Oh... and it took me a whole weekend to get it right!
ok, i'll try that anyway, also I'll try to "mount" swap using app called "A2SDGUI", it did miracles with ext2 and it has swap initialing capabilities. when I try to punch it, it flashes short text for half a sec, something about not finding suitable partition, if I get it right, it might work...
two additional Qs:
1. call me retarded but where do I find proper "parted"?
2. is there a windows app that can part disk and make not only ext but swap too? currently I don't have any linux system running, I could install one or make live CD but it would be only for one thing only so I think that you can understand my lazyness ;P
DrNO[PL] said:
2. is there a windows app that can part disk and make not only ext but swap too? currently I don't have any linux system running, I could install one or make live CD but it would be only for one thing only so I think that you can understand my lazyness ;P
Click to expand...
Click to collapse
http://www.partitionwizard.com/free-partition-manager.html
Guide to using Minitool partition wizard.
http://forum.xda-developers.com/wiki/index.php?title=SD_card_partitioning
DrNO[PL] said:
1. call me retarded but where do I find proper "parted"?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=12361294&postcount=842
thank you Sir for those above and more that I've already read around forum search module is not so great as I thought, because it never returned that post withw "parted".
will report soon how's the battle evolving...
Good luck.
ok then...
parted worked, SD8GB splited nicely:
FAT32 7,25GB
EXT3 512MB
SWAP 32GB
that was easy
next thing "apps2ext", reinstalled Darktremor script, restored ext2 backup, worked, mounted FAT, copied backup, reboot, OS did't even noticed any change (except cutting ext2 by a half and upgrading to ext3, in a good way). then swap. first i've tried some apps, like DroidSwap (only FC's), then Swapper2, which found swap partition, but is still limited by the "f" kernel. formating went OK, (un)mounting part. FAILed. then I've started messing arround > in short, bricked soft :] nothing serious, only /system could not mount, thank you nandroid you exist. now I'm back to the point after spliting SD, having Firefox weighting something like 0.8GB in memory with opened tabs about swap vs milestone. after much reading I'll try more serious approach, more digging, lower coding, no apps, console yes, wish me luck.
quick question, people keep saying linux-swap on milestone is not possible, therefore why are you still including it?
I believe it's possible but the commands the set it up / use it are unknown. It doesn't follow the standard "linux way".
Someone please correct me if I'm wrong.
Swap relies on the kernel being compiled with CONFIG_SWAP. Unfortunately for us, Motorola did not enable swap in the kernels they release. Coupled with the kernel verification scheme, we are unable to swap the kernel with one that has CONFIG_SWAP enabled.
If you do a mkswap and swapon on Milestone, you'd get "Not Implemented". So, swap support is not possible. I'd like to be proven wrong though.
Sent from my Milestone using XDA App
swap enable = impossible, dude..
If you read some threads at droidforums, alot of guys don't use swap anyway as it kills the sd card quicker.
Compcache is more interesting... you can squeeze more apps in the same amount of free ram via compression.
The debate is that it takes time to uncompress the app from ram when it's recalled but ram is fast and it would be even faster with a V6 under the hood lol
SWAP is impossible, because motorola kernel don't support it. So, as long as we can't compile our own kernel on Motorola Milestone, this will remain impossible.
Sent from my Milestone using XDA App
For anyone actively working with and on the webtop portion of these phones, you'll have noticed that webtop suffers greatly from sluggish response. I decided to experiment and through that, managed to alleviate a large portion of my problems. By creating and enabling a swap partition, I gained a very noticeable increase in performance on my webtop.
1: Remove SD card from phone and mount onto a computer capable of formating as Linux Swap.
Linux machines can obviously do this with any partition manager.
Windows machines can do so with: Paragon Partition Manager
Mac: I'm not currently sure what tool can handle creating swap partitions.
2: Create Swap partition on SD Card. (I personally made mine 1.5 GB)
3: Put SD Card back into phone and boot fully into webtop.
4: In Synaptic, download Partitionmanager. (This is the only partition manager package I have found to do anything at all in the webtop. If anyone has any luck with others, please post what lead to your success.)
(Path Method):
5: Inside Partitionmanager, navigate to the swap partition of your SD card and take notice of the "Device:" line underneath the the bar Volumes bar.
6: If in gnome, Alt+F2 and type
Code:
gksudo gedit /etc/fstab
If in any other desktop environment, open a terminal and type
Code:
sudo gedit /etc/fstab
7: Append the following line to fstab replacing "<path>" with the value in the "Device:" line of partitionmanager:
Code:
<path> none swap sw 0 0
(UUID Method)
5: Inside either Webtop terminal or phone Terminal Emulator type:
Code:
su
blkid
Look for the line which contains
Code:
TYPE="swap"
.
Alongside "TYPE" should be a
Code:
UUID="xxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx"
.
(If no "UUDI" is listed, take the path of the device from the same line and do the following replacing "<path>" with the path value from above.)
Code:
sudo mkswap <path>
6: If in gnome, Alt+F2 and type [code]gksudo gedit /etc/fstab
If in any other desktop environment, open a terminal and type
Code:
sudo gedit /etc/fstab
7: Append the following line to fstab replacing "<UUID>" with the value in the "UUID=" line of blkid:
Code:
UUID=<UUID> none swap sw 0 0
8: Reboot phone
9: Download Script Manager from the android market.
10: Download View attachment swap.sh.zip and unzip it to a directory of your SD Card where you won't erase it.
11: In Script Manager, navigate to the directory you placed the script and select "swap.sh".
12: Check:
Code:
"Run as root" and "Run at boot"
13: Click "Run"
14: Profit!
To see if it is working, open terminal emulator or a terminal window on either phone or webtop. Type the command "free". and take notice of the "Swap" line. It should tell you the partition size, amount used, and amount free.
Hope this helps someone.
**Tested Working Phones**
Motorola Droid Bionic
Motorola Milestone A854 (Nearly Identical to A855) {blkid is not compiled on this phone. /etc/fstab is non-existent. Easiest way of making the proper /etc/fstab is to partition the swap as the 2nd partition on the card and only have 2 partitions total. This will ensure that the path for the swap is "/dev/block/mmcblk0p2"}
Motorola Atrix 4G using faux123's 2.4beta (Several kernels for the Atrix 4G do not support swap. faux123's 2.4beta does, however) thanks nabicat
If anyone has any other phones that they can confirm working, PM me and I'll add them to the list. If anyone has a phone that requires any special steps, be sure to list the steps taken along with the PM.
*UPDATE!! 06/23/12*
I am currently running the ICS leak 2033 on my Bionic. Webtop is running ICS Tablet. For starters, even without swap space, this version of webtop runs smooth as butter. Swap space IS still capable, though, and does still improve performance. To those who are leery about having android instead of ubuntu for webtop, I challenge you to try it. Some will like it (I certainly do). Others will hate it.
One change that needs to be noted: ICS kernel doesn't support the -a tag on "swapon" instead of using "-a" you'll need to put the path in the command script instead. In my case, the script now reads "swapon /dev/block/mmcblk0p2". It still needs to be run as root. Webtop picks up immediately when you run the script, so no extra steps there. Chrome beta is sexual on webtop 3.0, btw.
Special Thanks:
Sogarth: Fantastic work with webtop2sd across multiple platforms. Opened monstrous doors for all of this.
tallnerd1985: Compiling a great guide for multiple steps of unlocking webtop
[mbm]: Fixing what Moto broke
Natronics: Providing the UUID solution in this guide
Very nice, I will have to test this out tomorrow. Webtop is working well minus some hiccups with Bluetooth mice not clicking properly and display.
But if I want to use this for Citrix receiver and OpenOffice, will definitely want to get this going.
hey bang, an easier way to find the UUID of the swap partition is to run blkid from terminal....it should actually list it as TYPE="swap".
Awesome thanks! I'll give this a try right now and report back!
Natronics said:
hey bang, an easier way to find the UUID of the swap partition is to run blkid from terminal....it should actually list it as TYPE="swap".
Click to expand...
Click to collapse
Very nice. I'll update the guide when I get a chance to reflect that. I'm guessing from either terminal emulator on phone and terminal in webtop?
I ran it on the webtop terminal. it showed the UUID with the quotations after the UUID. so I removed the quotations and entered the UUID into fstab.
---------- Post added at 05:40 PM ---------- Previous post was at 05:17 PM ----------
this is what it looks like in blkid:
/dev/block/mmcblk0p2: UUID="a0a11111-a94e-4fa1-ada0-69186b667b1e" TYPE="swap"
The UUID should look like this when you paste it in fstab:
UUID=a0a11111-a94e-4fa1-ada0-69186b667b1e
this is what the finished product looks like in fstab:
UUID=a0a11111-a94e-4fa1-ada0-69186b667b1e none swap sw 0 0
If you don't see a UUID when you do blkid...
get the location of the partition using blkid... mine was /dev/block/mmcblk0p2
then do a:
sudo mkswap /dev/block/mmcblk0p2
replace the /dev/block/mmcblk0p2 with your sdcards path if it is different than mine. That will set a UUID to the swap partition.
Just a note to those who aren't familiar with linux and/or UUIDs. YOUR actual UUID will be different. You'll have to actually run blkid in either the webtop terminal or terminal emulator (both work. run as super user).
UUID has benefits and drawbacks when compared with the device paths:
UUID values won't change unless the partition is destroyed and recreated. If it's moved around and/or resized, it'll remain the same.
Paths are easier to determine and remember for the less knowledgeable.
Thanks for clarifying the uuid being different for everyone. Forgot to mention that part.
Sent from my HTC Flyer P510e using XDA App
Oops, got distracted half way though. Anyways, works great! Noticeably snappier right away. Thank you so much for noticing this! Seems like Motorola should have had this on from the get go...
I have Paragon installed on my computer but I am still fuzzy on how to make this swap partition. Can anyone help me?
dB Zac said:
I have Paragon installed on my computer but I am still fuzzy on how to make this swap partition. Can anyone help me?
Click to expand...
Click to collapse
delete or resize the existing partition to create blank space. Make a new partition the size you want for swap. Choose "Linux Swap" as the partition type.
I couldn't find an option for swap partition. I made the space but couldn't get past that step
dB Zac said:
I couldn't find an option for swap partition. I made the space but couldn't get past that step
Click to expand...
Click to collapse
It's called "File System Type" or "Partition Type". It's the same option as where you'll find "FAT32" and "NTFS" file systems. You're looking for either "Linux Swap" or "Swap Space"
Banggugyangu said:
It's called "File System Type" or "Partition Type". It's the same option as where you'll find "FAT32" and "NTFS" file systems. You're looking for either "Linux Swap" or "Swap Space"
Click to expand...
Click to collapse
Man, that is weird. I found all those options but there is no option that says swap.....
Sent from my DROID BIONIC using Tapatalk
dB Zac said:
Man, that is weird. I found all those options but there is no option that says swap.....
Sent from my DROID BIONIC using Tapatalk
Click to expand...
Click to collapse
I'm not using it myself, so I don't know for sure what options you have. Perhaps you can list them or post a screenshot of them so I can know more of what's going on?
NTFS, FAT16, FAT32 and none is all it offers
dB Zac said:
NTFS, FAT16, FAT32 and none is all it offers
Click to expand...
Click to collapse
Hmm that must be a limitation on the free version. You could always download a live CD of ubuntu and use GParted inside that to do the job.
Banggugyangu said:
Hmm that must be a limitation on the free version. You could always download a live CD of ubuntu and use GParted inside that to do the job.
Click to expand...
Click to collapse
confirmed. the free version did not have the "swap" partition options but the paid one does
If you paid for it, that's a little foolish, as downloading ubuntu is free and comes w/ GParted on the live CD.
During my time hacking on android I've discovered some nice easter eggs deep in the android platform. One such easter egg is the mounting of ext4 images directly in the init.rc script. This is a feature I have never seen used by any oems and only by one custom rom [ EDIT: and by letama in his Sony Xperia Boot Manager ]! looking at the git logs this functionality has been present since September 2010 [ commit 49b8124a1759cb8b27e0c21a1a5a54b8a81bdb19 ]. What this effectively gives us is the ability to overlay a pseudo partition layout over the top over the existing layout, thus avoiding any "Danger" of accidental bricking the device by reformatting the SDCard. This is very similar to the way archos mount the stock file system and a variation/extension on the existing methods we use for the SDE Roms.
Although the explanation assumes the use of the SD models it should be fairly straightforward to apply the the HDD models.
THE METHOD:
PART 1 - Prepare a recovery ext4 image file
1. Build CWM6 from the CM10 source.
2. Modify The Recovery's init.rc file to look something similar to this
Code:
on early-init
start ueventd
on init
export PATH /sbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
symlink /system/etc /etc
mkdir /boot
mkdir /sdcard
mkdir /system
mkdir /data
mkdir /cache
mount /tmp /tmp tmpfs
mkdir /partitions 0771 system system
mount ext4 /dev/block/mmcblk0p4 /partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext4 [email protected]/partitions/CAC /cache nosuid nodev
mount ext4 [email protected]/partitions/DATA /data nosuid nodev
mount ext4 [email protected]/partitions/SYS /system
mount ext4 [email protected]/partitions/SDCARD /sdcard nosuid nodev
mount ext4 [email protected]/partitions/BOOT /boot
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
service ueventd /sbin/ueventd
critical
service recovery /sbin/recovery
service adbd /sbin/adbd recovery
disabled
# Always start adbd on userdebug and eng builds
# In recovery, always run adbd as root.
on property:ro.debuggable=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
#write /sys/class/android_usb/android0/enable 1
write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
write /sys/class/android_usb/android0/iProduct $ro.product.model
write /sys/class/android_usb/android0/iSerial A101S_REC
#start adbd
setprop service.adb.root 1
# Restart adbd so it can run as root
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
3. Modify the etc/recovery.fstab to look like this
Code:
# mount point fstype device
/cache ext4 /dev/block/loop1
/data ext4 /dev/block/loop2
/system ext4 /dev/block/loop3
/sdcard ext4 /dev/block/loop4
4. Creating an empty ext4 image file name REC and mount it on your pc. [ 5MB should do it ]
5. Copy the contents of the built recovery/root directory to the root of your mounted image.
6. chmod init.rc , default.prop and ueventd.rc to 644 ( rw-r-r- )
7. umount the ext4 image and push it to the root of you data partition
That's stage 1 complete. Part 2 Will Follow Shortly.....
Part 2 - Make a dual boot initramfs.cpio.lzo
1. Change the name of the /data directory to /bootdata by modifying the etc/mountpoints file in the initramfs.cpio.lzo. This stops CWM getting confused when trying to un/mount the data partition
Code:
mount_name mount_dev mount_point mount_fs mount_opts volume_name error_code custom_opt
rawfs /dev/mmcblk0p1 /mnt/rawfs rawfs none 150
system /dev/mmcblk0p2 /mnt/system ext4 rw,noatime,noexec system 152
bootdata /dev/mmcblk0p4 /bootdata ext4 rw,noatime,noexec bootdata 154 crypt_compat
storage /dev/mmcblk1p1 /mnt/storage ext4 rw,noatime #storage_name# 155
storage_A80S /bootdata/media /mnt/storage bind bootdata none 155
storage_A101S /bootdata/media /mnt/storage bind bootdata none 155
storage_A101XS /bootdata/media /mnt/storage bind bootdata none 155
storage_LUDO /bootdata/media /mnt/storage bind bootdata none 155
storage_A80H /dev/hdd1 /mnt/storage ext4 rw,noatime #storage_name# 155
storage_A101H /dev/hdd1 /mnt/storage ext4 rw,noatime #storage_name# 155
usbhost_ehci /dev/storage_ehci1 /mnt/usbhost_ehci vfat rw,noatime,utf8,shortname=mixed none 156
usbhost_otg /dev/storage_otg1 /mnt/usbhost_otg vfat rw,noatime,utf8,shortname=mixed none 156
rfsext4 /dev/loop0 /new-root ext4 rw,noatime none 157
rfsext3 /dev/loop0 /new-root ext3 rw,noatime none 157
rootfs /dev/loop0 /new-root squashfs ro,cts_compat none 157
ramdisk /tmp/ramdisk /ramdisk vfat loop,rw,utf8,shortname=mixed #ramdisk_name# 158 ramdisk,ramdisk_size=256
2. Using sirduke989 dmenu initramfs you can modify the init script in the initramfs to mount /bootdata instead of /data and also add /bootdata/REC and /bootdata/BOOT to the list
of known locations , I see this a temporary measure as there are a number of other ways to enable dual ( Triple?!? ) booting
3. Flash the modified initramfs and your choice of kernel using either the recovery menu or kd_flasher, I used the 3.0.21 kernel extracted from the 4.0.24 aos file.
You should now be able to boot into CWM Recovery!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Clearly I'm a developer not a photographer!!
Part 3 - Create rest of the "partition" images.
You should have a /partitions directory in you device root, This is what is normally mounted as your /data ( /dev/block/mmcblk0p4) and contains normal android user data e.g installed app settings databases etc. This is where I've created the reset of my Partitions which are just more ext4 images files. I did this using "dd if=/dev/zero ...." and "mke2fs -text4 ...." on the device through adb whilst booted into CWM. This saved time in pushing large empty ext4 files from my pc.
I called my image CAC ( cache ) DATA ( data ) SYS ( system ) SDCARD ( sdcard ) BOOT ( boot ) you can obviously call them what you like and place them anywhere as long as you match up the image names with those in init.rc and make sure the loop numbers are correct in the etc/recovery.fstab everything should be fine.
You can play around with the files sizes, I have an 8gb my current file sizes at the moment are
BOOT = 25MB
CAC = 500MB
DATA = 3GB
SYS = 500MB
SDCARD = 2GB
The sdcard mount point is probably worth pointing at an external sd if you have one available. I have a 32GB Class 10 that I'll probably set up.
After you've setup your psuedo partitions you should then be able to reboot into recovery, if you've done things correctly you mount output should contain the following
Code:
/dev/block/mmcblk0p4 on /partitions type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/loop1 on /cache type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/loop2 on /data type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/loop3 on /system type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/loop4 on /sdcard type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/loop5 on /boot type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
Everything seems to function correctly, I have successful done a backup and restore of my system partition. I have also applied CWM-SuperSU.zip through install zip from sdcard. Mounting and Remounting works although I'm not sure if Mount USB Storage works yet, I didn't on linux and I've not tested on windows and finally wiping and formating was also successful.
Part 4 - Notes on setting up rom images.
Now you may of already realized normal archos images don't come as separate the /boot and /system images so work is require to split them up.
Also if you want to split the /system from the reset of a archos image your boot partition will need to be about 50MB as archos have they /bin /lib /usr directories which contains binary files that use /lib/libuClibc-*.so as it's libc which brings there root filesystem in at around 38MB.
There is a very strong case for ditching these binaries especially when using AOSP/CM based roms. My intial tests show this is possible.
Just like the recovery init.rc Similar changes have to be made to the roms init.rc
Moving Forward:
of course, there's a lot to do but I wanted to at least get this initial information out there for people to consider. I'm currently booting a Linaro 4.1.1 rom using the split partitions. I have also been working on better booting methods which is why I haven't given any details re the initramfs init script but It's fairly straight forward to adjust and adapt. I'll write up more details soon!
More Research!
As I mentioned, I've been further looking into different booting methods and I think I'm approaching what could be a workable solution that will make the Gen9 more like standard android devices
Here's some more of my findings
1. It turns out that we can dump the existing initramfs.cpio.lzo and we can use a standard android ramdisk layout as the android init will load instead of the init script that is currently being used, this also removes the need for switch root and other nonsense that archos have in there. There was one gotcha when had me stumped for about ten minutes, I needed to add "write /sys/class/leds/lcd-backlight/brightness 75" to the init.rc to turn the screen on.
2. It's possible to stop android either using adb shell stop or stopping each service zygote etc, and start CWM while android is booted. It's probably also feasible the manage booting between recovery and android using the persist properties system which should make switching between the 2 fairly easy to control without much tweaking to any binaries. Looking at other devices, namely samsung, they seem to do something similar with recovery being in the same boot.img as the standard files, they simply load a recovery.rc instead of the main init.rc, this might mean that we have to patch CWM to load the correct init.rc I've not looked at the code properly yet but It's not going to be an issue anyway as all the code is fully available, You've gotta love open source.
3. By mounting /dev/block/mmcblk0p1 to /mnt/rawfs we are still able to use abcbox, reboot_into writes to the params file in the partition to control boot switching, so we can maintain booting into sde while leaving the stock android partition in place. I was unable to get any immediate joy from kd_flasher, that maybe because we currently have the ramdisk we want to overwrite mounted as the rootfs. Again I can't imagine it being too difficult to jig this, It can probably be worked out by looking at the current recovery ramdisk scripts should kd_flasher style functionality be required at any point.
4. Most of the binaries that rely on uClibc can be recompiled against bionic without any issue, usb_modeswitch for example. If there are any closed source ones, then the dynamic linker ld-uclibc or whatever is called, ultimately symlinks back to uClibc and we can just grab the one file and place it in the /lib directory. I tested /usr/bin/lsdvd in this way and It seemed to work fine.
I've got all this going on while still leaving a stock android fully intact, which is a great fallback Just in case.... Keeping these modifications at a safe level is one of the primary goals to enable much wider use
I'll put together some examples within the next couple of days to demostrate what I'm talking about here.
I've got a Linaro 4.1.1 ( JRO03R ) which has working powervr drivers with a 3.0.21 kernel, although that's about all that's working on it at the minute.
It's more a proof of concept than anything else, The kernel would need recompiling to add tracefs functionality which is required by jellybean but using the same magic should leave the powervr drivers functioning still, If anyone's interested I can stick that up, I've foolishly deleted ( misplaced/can't remember ) the device files I used to build this.... Too many android source trees and not using git properly leads to school boy errors.
I'm currently working on an omapzoom 4.1.2 tree using the blaze_tablet device as a base, I think this may yield the best results for the archos.
I suppose one other thing to do is the fix up a stock rom to use these methods and give it CWM, that should be pretty simple to do. Although ICS is ooold and I'm really not a fan of some of archos' methods e.g booting 4 different devices off one firmware. Although to their credit they do demostrate just what possible with deviating android from it's normal standard structures.
Hopefully this has whetted your appetites, I'm pretty excited about what's possible here as I feel it brings these archos devices in line with most others.
Me Again!
Just a cheeky little update, I been trying the figure out the best approach to handle switching between android and recovery mode. In effect I kind of wanted to create a Stage 4 bootloader! because you can never have too many bootloaders LOL I certainly wanted to do a "proper" job on it and try to avoid changes to the android platform code.
While to doing research into this I found this patch to the linux kernel which the android team submitted for review, Reading the mailing list thread I don't think it's been accepted yet! It's true what they say about the Kernel Mailing List, You need to bring your A game and be sure of what your doing..
Anyways the patch add a boot-control-block driver to kernel which check for a boot flag, which is exactly what I need to make booting into alternative configuration nice and simple. I suppose it wouldn't be too difficult to chuck in support for the fastboot protocol on one of those configurations. So a CWM Shouldn't be too far off now!!!
As a little treat I've attached a recovery based ram disk if anyone what's to play, just flash it with you favourite kernel on to your sde partition. Then You can boot into recovery and set your self up a pseudo partition image layout through adb. You won't be able to be into android, obviously until you put your old initramfs back.......
This is totally unsupported.
Click to expand...
Click to collapse
I'm just chucking up for those who want to get a feel for to do so. If your uncomfortable playing around in this area then stand well back, It's not prime time yet!!!!
However Feel free to ask questions of a technical bent but If you can't get it to boot then tough luck I'm afraid for now! :laugh:
You shouldn't be able to do any damage with this be I wouldn't go selecting wipe/format etc until you've got some partition images sorted.
I've add abcbox to sbin and symlink reboot_into. It does not seem to fully reboot but It will set the boot flag which you then follow with a call to reboot, That will reboot back into CWM (sde).
Onward
EDIT: Here's the Init.rc and etc/recovery.fstab that It attempts to use.
Code:
on early-init
start ueventd
on init
export PATH /sbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
symlink /system/etc /etc
mkdir /boot
mkdir /sdcard
mkdir /system
mkdir /data
mkdir /cache
mkdir /mnt
mkdir /mnt/rawfs
mount /tmp /tmp tmpfs
mkdir /partitions 0771 system system
mount ext4 /dev/block/mmcblk0p4 /partitions
mount rawfs /dev/block/mmcblk0p1 /mnt/rawfs
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext4 [email protected]/partitions/CAC /cache nosuid nodev
mount ext4 [email protected]/partitions/DATA /data nosuid nodev
mount ext4 [email protected]/partitions/SYS /system
mount ext4 [email protected]/partitions/SDCARD /sdcard nosuid nodev
mount ext4 [email protected]/partitions/BOOT /boot
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
service ueventd /sbin/ueventd
critical
service recovery /sbin/recovery
service adbd /sbin/adbd recovery
disabled
# Always start adbd on userdebug and eng builds
# In recovery, always run adbd as root.
on property:ro.debuggable=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
#write /sys/class/android_usb/android0/enable 1
write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
write /sys/class/android_usb/android0/iProduct $ro.product.model
write /sys/class/android_usb/android0/iSerial A101S_REC
write /sys/class/leds/lcd-backlight/brightness 75
#start adbd
setprop service.adb.root 1
# Restart adbd so it can run as root
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
Recovery.fstab
Code:
# mount point fstype device
/cache ext4 /dev/block/loop0
/data ext4 /dev/block/loop1
/system ext4 /dev/block/loop2
/sdcard ext4 /dev/block/loop3
Any words about hdd versions?
DragosP2010 said:
Any words about hdd versions?
Click to expand...
Click to collapse
I all depends how you want the structure it, What it would change is the mount point of the paritions directory. After that. everything is loop mounted and sitting on top of the existing structure.
Code:
mount ext4 /dev/block/mmcblk0p4 /partitions
Great stuff!!!!
Hey trevd,
that's fantastic... i will definitely try this CWM in a few days with my custom kernel and bootloader (mountpoint will need some tweaks as well ).
I'm very busy these days, so i gess i'll leave some longer statements to the recent developments in a few days.
Just in short... it's very pleasant to see all these open developments popping up and i really, really appreciate this kind of hacking!
Keep on your great work... you rock!!
Cheers,
scholbert
Hi Trevd,
Nice job!
I've been using the same kind of trick on my Xperia S boot manager project, recovery on loops and mount [email protected] in inits. You may want to take a look at what I did there (see my sig), it may have some use for your project.
Basically, what I do is storing multiple kernels+cpios on the regular kernel partition. I use one (trimmed down to maximize space) to handle the boot logic and cwm, and I have enough space to handle two "regular" kernels. I handle kernel switch just before they load with a small assembly loader. It works very nicely on Xperia, and it's very nice to be able to dual boot with isolated cwms. I can't remember maximum size on a g9 kernel rawfs file, but I think you could have at least enough space to have two kernels to isolate recovery.
Hey letama,
nice to read you :highfive:
letama said:
I've been using the same kind of trick on my Xperia S boot manager project, recovery on loops and mount [email protected] in inits. You may want to take a look at what I did there (see my sig), it may have some use for your project.
Click to expand...
Click to collapse
Cool stuff again...
letama said:
Basically, what I do is storing multiple kernels+cpios on the regular kernel partition. I use one (trimmed down to maximize space) to handle the boot logic and cwm, and I have enough space to handle two "regular" kernels. I handle kernel switch just before they load with a small assembly loader. It works very nicely on Xperia, and it's very nice to be able to dual boot with isolated cwms. I can't remember maximum size on a g9 kernel rawfs file, but I think you could have at least enough space to have two kernels to isolate recovery.
Click to expand...
Click to collapse
AFAIK, we got around ~30MBytes in the raws partition on our tablets so would be possible to put some more kernel+cpios here easily.
Anyway, made some experiments with my latest u-boot port for the tablet this weekend.
I was able to bring up my A80S completely from MicroSD and boot into CWM by using uImage and uInitramfs (based on trevd's CWM image).
There's also some lowlevel multiboot implemented now by using the volume keys... but i know that i use a very special setup, so this is more a proof of concept and not a suitable environment for the average user
Cheers,
scholbert
Thanks Letama + Scholbert
I'll look at all this stuff this week....As a aside, I've played around with mmcblk0p3 and given myself an mmcblk0p5 / 6 of 4MB each. I found parted to be pretty useful (read:safe) for this..... I'm dubious about playing around with the rawfs too much at this point, mainly because I don't understand it fully, yet!.
Have you guy seen this https://github.com/swetland/omap4boot ( I think it's along the line of what Scholbert been working with/on )
Like I've mentioned to ultimate goal is a solution that is "safe" for the average user and also leaves the rest of the tablet in-tact, it maybe a lofty goal but worth a shot. :good:
Thanks for the input guys!
scholbert said:
AFAIK, we got around ~30MBytes in the raws partition on our tablets so would be possible to put some more kernel+cpios here easily.
Click to expand...
Click to collapse
30 for init kernel ? That's plenty indeed! Cool!
Anyway, made some experiments with my latest u-boot port for the tablet this weekend.
I was able to bring up my A80S completely from MicroSD and boot into CWM by using uImage and uInitramfs (based on trevd's CWM image).
There's also some lowlevel multiboot implemented now by using the volume keys... but i know that i use a very special setup, so this is more a proof of concept and not a suitable environment for the average user
Click to expand...
Click to collapse
Nice job! Too bad that Archos doesn't do this on their board with a small internal switch. Would be cool for people like me with big fingers and poor soldering skills
trevd said:
I'll look at all this stuff this week....As a aside, I've played around with mmcblk0p3 and given myself an mmcblk0p5 / 6 of 4MB each. I found parted to be pretty useful (read:safe) for this..... I'm dubious about playing around with the rawfs too much at this point, mainly because I don't understand it fully, yet!.
Click to expand...
Click to collapse
Hummm... You're going to end with a full re-partitioning scheme with system and data if you continue this way . Just be careful when you recreate partitions to let the empty space at the beginning of the disk untouched, instant brick ahead if you go there...
Just in case, here is what I did with my repartition script (do you have it ?): delete p3, delete p4, re-create p3 (careful with start point, leave the hole! it should start just after p2) as extended partition, big enough to hold the new partitions, recreate p4 (same thing about the hole, it should start after p3) with what remains and then you can create p5,p6,p7 with the size you want inside p3.
Last advice: rawfs, don't touch it .
Anyway, the good thing with what I did on Xperia S is that you don't mess with rawfs and re-partition, it's just like flashing a very big SDE kernel from recovery with unmodfified sde firmware, that's all. If I find some time, I'll take a look to see if we can do the same thing here.
letama said:
Just in case, here is what I did with my repartition script (do you have it ?): delete p3, delete p4, re-create p3 (careful with start point, leave the hole! it should start just after p2) as extended partition, big enough to hold the new partitions, recreate p4 (same thing about the hole, it should start after p3) with what remains and then you can create p5,p6,p7 with the size you want inside p3.
Click to expand...
Click to collapse
Hi
Yes I have read your previous threads on the subject which provided alot of the inspiration for the work currently at hand, It is also why I am being ultra careful around the partitions
I think maybe I'm just being too clever trying too pull everything back a step into the intramfs when we can just do the old switch root method method.... It's a little messy on the inside but it will get the job done!
Well, I don't like much the switch root too, it's not a very "Android way" of doing things and make some apps not very happy with it, but yes, it will get the job done, one root for recovery, one root for firmware. And Archos stock would be difficult without switch root, they did put far too much stuff outside of system.
letama said:
Well, I don't like much the switch root too, it's not a very "Android way" of doing things and make some apps not very happy with it, but yes, it will get the job done, one root for recovery, one root for firmware. And Archos stock would be difficult without switch root, they did put far too much stuff outside of system.
Click to expand...
Click to collapse
I'm very much for the "Android Way" I believe the archos stock roms can be re-jigged as the stuff outside of the system is not required by the system, this is all stuff that is a result of the BuildRoot build system and has a dependency on uClibc.
I'm going to try and get something usable this week, can I store additional files in the rawfs partition without running into trouble?
trevd said:
I'm very much for the "Android Way" I believe the archos stock roms can be re-jigged as the stuff outside of the system is not required by the system, this is all stuff that is a result of the BuildRoot build system and has a dependency on uClibc.
Click to expand...
Click to collapse
Well, it's required. It's used inside Android, it handles audio, wifi, codecs, smb...
I'm going to try and get something usable this week, can I store additional files in the rawfs partition without running into trouble?
Click to expand...
Click to collapse
In rawfs or initramfs ? I wouldn't add any file in rawfs, it would be difficult to do and I don't know how would behave the bootloader if it sees new files there. Initramfs you're free to do whatever you want until you reach maximum size of kernel+initramfs.
trevd said:
Have you guy seen this https://github.com/swetland/omap4boot ( I think it's along the line of what Scholbert been working with/on )
Click to expand...
Click to collapse
Well kind of... while i try to stick with the MicroSD our fellow vincencb follows the omap4boot path.
He already made a port of barebox bootloader to work with this tool and pushed it to the repos.
This way you may put anything you like on the tablet's RAM by using MicroUSB for communication and file transfer.
My way is more to get a full featured u-boot and put it into a state, where it might replace stock loader.
Last step is to put it in internal eMMC... so this is also research and development for now.
trevd said:
Like I've mentioned to ultimate goal is a solution that is "safe" for the average user and also leaves the rest of the tablet in-tact, it maybe a lofty goal but worth a shot. :good:
Click to expand...
Click to collapse
Yepp that sounds like a reasonable approach.
letama said:
30 for init kernel ? That's plenty indeed! Cool!
Click to expand...
Click to collapse
To be even more precisely, there are 32512*1K blocks for the rawfs partition.
On my device there's ~12MB left...
letama said:
Nice job! Too bad that Archos doesn't do this on their board with a small internal switch. Would be cool for people like me with big fingers and poor soldering skills
Click to expand...
Click to collapse
Yeah, a real switch would be nice indeed... there's some unused testpoints giving us additional GPIO
Need to solder though...
trevd said:
I'm very much for the "Android Way" I believe the archos stock roms can be re-jigged as the stuff outside of the system is not required by the system, this is all stuff that is a result of the BuildRoot build system and has a dependency on uClibc.
Click to expand...
Click to collapse
Some stuff outside of system is quite useful and gives us something like a minimal linux ecosystem.
Very useful at console level... some tools seem to be used by the Android system as well.
trevd said:
I'm going to try and get something usable this week, can I store additional files in the rawfs partition without running into trouble?
Click to expand...
Click to collapse
Mmmh, letama maybe right with being very careful with this part of internal storage. If it get's corrupt you'll risk a brick (could be restored though by using external boot mechanism).
Anyway the best would be to mount it RW and use the kernel driver to access it... the unknown part is still the bootcode.
There's some kind of allocation table at the beginning of rawfs partition. It is yet unknown how bootcode behaves with an additional entry
Anyway, this is a real nice project and i would really appreciate to see it pushing forward.
Take your time trevd, and again thanks a lot for contribution!!
Have a nice day,
scholbert
Not to put this down in any way, but wouldn't TWRP be better for the G9? It has a full touch tablet UI, which is better than CWM's
Sent from my Galaxy Nexus using Tapatalk 2
Quinny899 said:
Not to put this down in any way, but wouldn't TWRP be better for the G9? It has a full touch tablet UI, which is better than CWM's
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Hi Quinny
There's nothing to stop us using whatever recovery we like.... they all work the same way ( I think ) , i.e the code is compiled into a recovery binary. Unfortunately my touch screen stopped working long ago so I wouldn't really benefit
scholbert said:
To be even more precisely, there are 32512*1K blocks for the rawfs partition.
On my device there's ~12MB left...
Click to expand...
Click to collapse
Ah, yes, but there is space reserved for each file there, what I have to figure is how much is reserved for custom file (sde kernel). I don't want to have to shift the files located after custom to make room for sde kernel , it would defeat the "no-fuss/no-risk" of the method.
Anyway the best would be to mount it RW and use the kernel driver to access it... the unknown part is still the bootcode.
There's some kind of allocation table at the beginning of rawfs partition. It is yet unknown how bootcode behaves with an additional entry
Click to expand...
Click to collapse
Definitely. Re-partitioning is much safer if space is needed.
trevd said:
.... they all work the same way ( I think ) , i.e the code is compiled into a recovery binary.
Click to expand...
Click to collapse
This is a good keyword: The recovery binary itself!
Most tools inside the recovery are simply linked to busybox, which itself is a link to recovery executable.
In other words, we have some code responsable for the menu and framebuffer stuff and we have busybox.
The strings command gave me version 1.2.0. Now my question...
How to configure this part of code?
I'd like to enhance the busybox part.
Could you please provide a little to howto for a compiler run?
Will i need all that Android stuff installed...
I you have any clue, please point me in the right direction.
Lazy,
scholbert
scholbert said:
How to configure this part of code?
I'd like to enhance the busybox part.
Could you please provide a little to howto for a compiler run?
Will i need all that Android stuff installed...
Click to expand...
Click to collapse
Yes, you need full android repo. Android Build system is messy and tightly coupled, busybox is compiled with bionic (android libc), recovery is built on top of it with few android libraries links. Isolating all this "mess" would be difficult. Except disk space required, there is no big deal in getting full android repo.
I'd suggest to take a look at this, you should do the "Prepare the Build Environment" section.
I don't know how trevd built his recovery, but what I did is create a gen9 device to get proper configuration for recovery (frame buffer config, ...). You can get mine if you want, it's a little outdated (latest cwm doesn't need a specific gfx anymore, the custom one I used has been moved to upstream for instance), but it should give you a base.
To do that, you have to create an "archos" directory in cm9/device directory, then from inside it do:
Code:
git clone git://gitorious.org/archos-ics/device-g9.git gen9
Then, you need to setup the build env once. From cm9 root, you have to do that:
Code:
. build/envsetup.sh
(it setups android build environment)
then
Code:
lunch
then choose full_gen9-eng.
(it selects device target for build)
You should have something like that:
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full_gen9
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76L
============================================
from this point, you can compile:
make -j4 recoveryimage (change j4 with the number of parallel build you want depending on your cpu).
whole recovery fs should be in out/target/product/gen9/recovery/root, with recovery command in sbin
Last, how do you want to extend it? If you want to add custom commands, take a look at cwm bootable/recovery/extendedcommands.c, it may be easier to add stuff there than in busybox.
[Q] encryption, ext2/4, and "filesystem too large to mount safely" error fix?
Hello again,
With my Droid 3 (thanks to Minimoto) again working great, I've turned my attention back to encrypting some of my data on the external SD card. I had used "LUKS Manager" some time ago so that seemed the logical place to start.
Okay, the short *short* version is: What does the error message (from dmesg output) "EXT4-fs (dm-4): filesystem too large to mount safely on this system" mean and how do I fix it or work around it?
The details:
I have a 32 GB SD card with a normal ~20 GB FAT partition that Android sees and uses just fine. On my laptop I created an ext4 file system on the second partition (the remaining ~12 GB of space). Android does not see or use this, but from a terminal I *can* mount it without problems. I chose to mount /dev/block/mmcblk0p2 (external SD partition 2) at /mnt/sdcard-ext-p2. Just FYI, but I wrote a short script and put it at /etc/init.d/03mount_sdpart2 to mount this second partition at the correct mount point and it works fine. Even after a reboot the script runs without problems and now I always have my new ext4 file system present.
The reason for creating the ext4 file system is because FAT does not support files larger than 4 GB and therefore my encrypted volume cannot be larger than 4 GB *if* I create that volume on a FAT file system. With the new ext4 file system, now using the LUKS Manager app, I created a new volume at the above mount point with a size of approximately 11.25 GB. This worked fine, too. The last step, however, actually mounting this encrypted volume, keeps failing. It was supposed to be mounted at /mnt/sdcard/LUKS. Unfortunately, LUKS Manager did not produce much in the way of information about why it had failed.
A quick note about file sizes: If I use an app like "ES File Explorer" and go to /mnt/sdcard-ext-p2 where the large volume file exists, ES says the volume file has a size of -805306366 bytes, obviously wrong. Fortunately, if I use the terminal and look at the file size with "ls -l" it has the correct size. Furthermore, after I opened the volume below using lm.cryptsetup I can use its "status" command and after converting the values from sectors (each sector is 512 bytes) it also displays the correct size of the encrypted volume.
So, back to the terminal where I decided to do the steps manually and see where it failed. For the most part, I used different device and directory names than what LUKS Manager would have used, mostly to be sure I wouldn't accidentally conflict with another process/app. The 'lm.cryptsetup' binary is provided by LUKS Manager and placed in /system/bin. I have the version of busybox that, I assume, ships with Minimoto which is busybox v1.20.0. This is where the 'losetup' I am using comes from.
Concerning loopback devices: LUKS Manager defaults to using/creating high numbered loopback devices, 300 for the first volume created. On Android the loop devices are created in /dev/block, but some tools don't seem to look there. In particular, lm.cryptsetup complains about not being able to find a free loopback device and 'losetup -f' (which displays the next free/available loopback device) always refers to devices in /dev regardless of where they really are. Making symlinks such as "ln -s /dev/block/loop0 /dev/loop0" for each of the currently present loop devs (0 through 7, and 300) fixes both of these problems. That said, whatever manner LUKS Manager uses to execute the underlying tools works properly with the loop devs being located in /dev/block. This can be verified by using "lm.cryptsetup status <crypt_dev>" and the status output shows that it is correctly attached to, for example, /dev/block/loop300. Making these symlinks is more of a convenience/fix for when one is working directly on the command line.
Where, before, 'losetup -f' indicated that /dev/loop0 was free (even though it did not exist), after making the symlinks the same command indicates that /dev/loop4 is the next free loop. On my phone, at that moment in time, that was the correct answer. loop4 also makes sense because I have four apps that I have "moved to SD" and for each app that you do this one loopback device is used (so loop0 - loop3 were used by apps "moved" from main internal storage). Creating these symlinks also made lm.cryptsetup stop complaining/erroring about not being able to find a free loop dev. Finally, running "losetup" without arguments is supposed to list the used loop devs and what is using them. Before making the symlinks is produced no output, and now, after the symlinks, it displays:
Code:
/dev/loop0: 0 /mnt/secure/asec/blah_appA.asec
/dev/loop1: 0 /mnt/secure/asec/blah_appB.asec
/dev/loop2: 0 /mnt/secure/asec/blah_appC.asec
/dev/loop3: 0 /mnt/secure/asec/blah_appD.asec
/dev/loop5: 0 /ss/safestrap/rom-slot2/cache.img
/dev/loop6: 0 /ss/safestrap/rom-slot2/userdata.img
/dev/loop7: 0 /ss/safestrap/rom-slot2/system.img
As you can see, loop4 is missing/available. Also, rom-slot2 is correct as it is where I opted to install Minimoto, rom-slot1 currently containing CM 10.1.
With the loop device issues taken care of, the steps I performed are as follows:
Code:
$ su
# lm.cryptsetup luksOpen /mnt/sdcard-ext-p2/MyCrypto.vol MyCrypto
<type in passphrase>
# ls /dev/mapper
MyCrypto control
# mkdir /mnt/sdcard/luks-tst
# mount /dev/mapper/MyCrypto /mnt/sdcard/luks-tst
mount: mounting /dev/mapper/MyCrypto of /mnt/sdcard/luks-tst failed: File too large
# dmesg | tail -2
[20665.748504] EXT4-fs (dm-4): filesystem too large to mount safely on this system
[20665.750732] EXT4-fs (dm-4): filesystem too large to mount safely on this system
You can see from the above block my commands and the output, especially errors, that followed. Clearly, the file is "too large"... but how? The whole point of this extra partition and ext4 file system stuff was specifically to get around the FAT 4GB file size limitation. Unfortunately, while these errors tell me that something is too large, what *part* is too large? Is the 11.25 GB volume *container* too large, or the ext2/4 file system that exists inside the volume? And if either is too large, what is the maximum size I can make them? I did try adding "-t ext2" and "-t ext4" to the mount command, but neither one changed the outcome nor did they change the messages that were output.
The 'mount' binary (like most others) is provided by busybox, so it could possibly be part of the problem. However, the last two errors above come from the kernel log (via dmesg) which means that at least part of the issue is the kernel, maybe the file system modules. I also checked the logcat output, just in case, but it did not contain anything related or useful. Minimoto 1.7 is using kernel version 2.6.35.7 and perhaps it has some maximum size issues I am unaware of. With the exception of my Droid 3, I haven't used a 2.6.x Linux kernel in a very long time.
I've searched around here as well as the fairly small LUKS Manager message board and the Net at large, but I haven't been able to find the answers I'm looking for. Any ideas as to what I might have done wrong, or something I haven't done but should? I'm not sure how to proceed. Just to be perfectly safe, I did try rebooting but it made no difference.
--John Gruenenfelder
Re: [Q] encryption, ext2/4, and "filesystem too large to mount safely" error fix?
Could it be that your mount point is within the FAT fs, what about creating a new mount point at say /mnt/LUKS
Sent from my XT860 using xda premium
Re: [Q] encryption, ext2/4, and "filesystem too large to mount safely" error fix?
I tried using /mnt/LUKS (instead of the previous /mnt/sdcard/LUKS) as the mount point, but nothing changed. The "filesystem is too large..." messages still appeared.
I don't know why there are two such messages separated by about 2/1000th of a second in the dmesg output even though I issued just one command. It was the same way in my first post.
If I recall, the original reason for putting the mount point under /mnt/sdcard was so that most apps could see/use the new area without having any extra knowledge.
--Sent from my DROID3 using xda app-developers app