[DEV] Filesystem Table - Galaxy Tab 10.1v Android Development

recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) '(null)' 0000 '(null)' 0
1 /efs ext4 /dev/block/mmcblk0p1 (null) '(null)' 0000 '(null)' 0
2 /recovery emmc /dev/block/mmcblk0p2 (null) '(null)' 0000 '(null)' 0
3 /boot emmc /dev/block/mmcblk0p3 (null) '(null)' 0000 '(null)' 0
4 /system ext4 /dev/block/mmcblk0p4 (null) '(null)' 0000 '(null)' 0
5 /cache ext4 /dev/block/mmcblk0p5 (null) '(null)' 0000 '(null)' 0
6 /data ext4 /dev/block/mmcblk0p8 (null) '(null)' 0000 '(null)' -16384
Thanks to Root we're now able to begin our work on ClockworkMod!
I'll be backing up all the partitions and then trying to get something set up.
Regards

How did you manage to get a nice list like that? I had check '/dev/block/' and guess my way through .

That's a little trick
After you've managed once to boot into recovery a nice little file under /cache/recovery called last_log appears

seraphimserapis said:
That's a little trick
After you've managed once to boot into recovery a nice little file under /cache/recovery called last_log appears
Click to expand...
Click to collapse
Nice find and thanks for the share .

Egan said:
Nice find and thanks for the share .
Click to expand...
Click to collapse
you're welcome

Maybe I'm ready the info wrong, but are you sure the file is thrustworthy? It also tells that the device is a P7510.
And that it fails to mount /system to p4
Sent from my GT-P7100 using XDA Premium App

That would be due to the recovery being ripped from that model.
Either way, the holy grail is buried in one of those undefined devices
EDIT: anyone looked at nvflash? You can get it to boot into apx mode by holding VOL-UP / VOL-DOWN when powered off. Too low-level?

the problem is currently only, that we can't get sdcard to mount because its a folder that gets created at boot time.

bcmobile said:
EDIT: anyone looked at nvflash?
Click to expand...
Click to collapse
I used it couple of times on my LG Optimus 2X and it is a life safer. You just cant brick your device when you have the proper APX file. IMO it is not too low-level, rather a great option for when you really mess things up.
How does one create such an APX file?
EDIT: APX file is really a ZIP with the nvflash.exe, some DLLs, images (*.img) and config files. You have to extract and run 'nvflash.exe'. Have a dig tonight and see if we can come up with a good nvflash restore image.
EDIT2: There is some BCT file in there which is compiled. Anyone know something about this type of file?
EDIT3: Asked Paul O'Brien on Twitter if he can point me in the right direction. He made the ZIP for the LG Optimus 2X.

Egan said:
EDIT3: Asked Paul O'Brien on Twitter if he can point me in the right direction. He made the ZIP for the LG Optimus 2X.
Click to expand...
Click to collapse
Excellent! Paul is also creating us a forum over at MoDaCo. I hope this means MCR action for the 10.1v!

bcmobile said:
Excellent! Paul is also creating us a forum over at MoDaCo. I hope this means MCR action for the 10.1v!
Click to expand...
Click to collapse
I've found out how the sdcard gets mounted.
There is a executable in /system/bin that gets used on device init.
Will have to figure out how to use it.

seraphimserapis said:
I've found out how the sdcard gets mounted.
There is a executable in /system/bin that gets used on device init.
Will have to figure out how to use it.
Click to expand...
Click to collapse
Isn't that the purpose of bin
Not that I could be of much help I guess but maybe if you told us which.. someone might have an answer...
Sent from my GT-I9000 using XDA Premium App

gjroeleveld said:
Isn't that the purpose of bin
Not that I could be of much help I guess but maybe if you told us which.. someone might have an answer...
Sent from my GT-I9000 using XDA Premium App
Click to expand...
Click to collapse
/system/bin contains all the executables i need to find out how to include this special executable at recovery boot time.

Just thinking, but the fastboot thing could be a really nice feature..
If we partition part of the "SD -card " we could build a multiboot without too much trouble...
Sent from my GT-I9000 using XDA Premium App

seraphimserapis said:
/system/bin contains all the executables i need to find out how to include this special executable at recovery boot time.
Click to expand...
Click to collapse
You might need to use a recovery.zip and execute it from an updater script. Not sure why, but the old CM recovery used to boot to a cut-down menu with the option to "Flash recovery.zip from SD Card", which would then load full CM recovery.
Perhaps it was for the same reason?

I got a viewpad 10 also a tegra II .
I have rooted it an flashed a dump of 3 devicesmixed up together to boot hc on it.
Maybe it is a long shot but it might contain how root and cwm will work.
It hadto be flashed treu nvflash
If you need it i wil share.
Just trying to help
And if you dont need it or you think it is useless noproblem just trying to help.

bcmobile said:
Excellent! Paul is also creating us a forum over at MoDaCo. I hope this means MCR action for the 10.1v!
Click to expand...
Click to collapse
It appears Paul isnt very helpful in this case. I friendly asked him twice via Twitter, but neither got a reply (while he was heavily replying on others). I guess we have to find out some other way or any of you may have a direct link with Paul?

Egan said:
It appears Paul isnt very helpful in this case. I friendly asked him twice via Twitter, but neither got a reply (while he was heavily replying on others). I guess we have to find out some other way or any of you may have a direct link with Paul?
Click to expand...
Click to collapse
I think Paul has lots of other work and devices to support Give him a rest.

seraphimserapis said:
I think Paul has lots of other work and devices to support Give him a rest.
Click to expand...
Click to collapse
I usually give replies like you do now over at Modaco . Maybe I just want to get it going. Still a simple tweet like "sorry can not help you" or "getting back on that" would be nice.
EDIT: I found some more info on how to retrieve the BCT file from the device itself. I'll try things later this week and hopefully have some progress to show by the weekend.

Some more partitions listed in ueventd.p3.rc in the IO tab recovery ramdisk
Code:
# misc partition
/dev/block/mmcblk0p6 0660 system system
# modem partition
/dev/block/mmcblk0p7 0660 system radio

Related

[REQUEST] Can someone post a guide to how to get Froyo on eMMC?

I don't want to dual-boot, even, just have a nice "normal" Nookie Froyo install on eMMC. I've seen several allude to the fact that it worked for them but no reviews of how they did it. I've backed up my 2.1 install with Clockwork so I'm not really worried about that.
TIA.
It's quite simple actually. All you need is basic knowledge of adb.
All disclaimers apply, I'm not responsible for any damage. Just know that mine is running on internal partitions. And the SD does mount too!
Before doing anything, I would recommend applying a dd from your partitions to your pc.
With, for example on mmcblk0p1 (boot) adb: dd if=/dev/block/mmcblk0p1 of=boot.img
You should do that for each partition to be safe (0p1 to 0p8).
All the following commands can be execute one after one, the separations are only there to makes things a bit more clear.
Then,
Boot to a working Nookie (NF) with your uSD fresh from burning, without any google apps, and without any uSD damaged errors.
Empty your internal system and copy uSD system over, by doing:
- adb shell mount -o remount,rw /dev/block/mmcblk1 / (---there is a space after the 1---)
- adb shell
- mkdir tmpfolder
- mount /dev/block/mmcblk0p5 tmpfolder
- cd tmpfolder
- rm -r * (---note that there is space after the r---)
- cd ..
- cp -r system/* tmpfolder (---this will take a few minutes---)
- umount tmpfolder
Click to expand...
Click to collapse
Then, you need to boot push the attached files (bottom of post) except for the 2 vold files to your boot partition: mmcblk0p1. Unzip, copy content, not zip.
You could very well replace uImage with the new Quickie overclocked uImage for froyo (see dev thread).
To push attached files to boot, do:
- mount /dev/block/mmcblk0p1 tmpfolder
- exit
- adb push [folder-containing-4-attached-files-except-vold.fstab] tmpfolder
- adb shell
- umount tmpfolder
Click to expand...
Click to collapse
I would also recommend erasing all your data. But that's up to you, if you want to keep your data on it. In any case, you can revert back with the data.img you created above . So next part you could skip, haven't tried skipping personally:
Non mandatory, but you could do:
- mount /dev/block/mmcblk0p6 tmpfolder
- cd tmpfolder
- rm -r *
- cd ..
- umount tmpfolder
Click to expand...
Click to collapse
Then you need to push vold.fstab and vold.conf (unzip volds, copy content) to system/etc
Copy vold's to system/etc:
- mount /dev/block/mmcblk0p5 tmpfolder
- exit
- adb push [folder-with-vold's] tmpfolder/etc/
- adb shell
- umount tmpfolder
- rm -r tmpfolder
- exit
Click to expand...
Click to collapse
Then shut down, remove uSD, and boot.
Again, you can choose to push the Quickie uImage, I you prefer, but the accelerometer doesn't work with it at the moment. The 950 kernel does sometimes crash on boot, but once booted is quite stable.
I think that's all folks. I could have been a bit vague at some times, but this should work. And if you made your imgs as recommended, you're bullet proof.
To revert back to initial state with img files, you need to copy files to sdcard and then dd:
- adb shell mount -o remount,rw /dev/block/mmcblk1p1 sdcard
- adb push XXX.img sdcard (--could take a few minutes--)
- dd if=XXXX.img of=/dev/block/mmcblk0pX
Click to expand...
Click to collapse
Do that for each partition.
For those who don't feel up to the task, I could make a CWR flashable zip file of all this. The only thing is, CWR dosen't boot on Nookie just yet. So you couldn't restore with a zip after the change.
[Before doing anything, I would recommend applying a dd from your partitions to your pc.
With, for example on mmcblk0p1 (boot) adb: dd if=/dev/block/mmcblk0p1 of=boot.img
You should do that for each partition to be safe (0p1 to 0p8).
[/QUOTE]
I am a little confused here. What are the names of the 7 other partitions? Thanks, Great guide btw!
See here.
Do you see improved speed and touch response running nookie from emmc?
im getting a "No such file or directory" error after "adb push [folder-with-vold's] tmpfolder/etc"
I created the directory but now it looks like i am stuck at the landscape android splash screen on boot...
any ideas? I am attempting to redo the whole process again just incase i missed something.
Sorry, there's a slash after etc.
Make sure you've copied the systen files, with "ls" inside tmpfolder where you copied system. Should be a etc folder there.
Sam
to the op: I'm not knocking you here, but do you have a basic idea of generic linux file hierarchy or operations in general? Getting a basic grasp on working with files in a linux terminal will make all of these operations make a lot more sense, since most "adb shell" commands are basic linux commands.
FastCR said:
to the op: I'm not knocking you here, but do you have a basic idea of generic linux file hierarchy or operations in general? Getting a basic grasp on working with files in a linux terminal will make all of these operations make a lot more sense, since most "adb shell" commands are basic linux commands.
Click to expand...
Click to collapse
Thanks but I don't see how that comment adds anything here.
Looks like the issue is above commands copy the actual system folder (not the contents of the folder) To the root of the partition. ls shows the folder "system" not the contents including etc. They are inside the folder but if the partition is mounted as system then the folder is redundant. Will check copying the contents and see if that helps.
Once I get it working in will post back to let others know
**** in the first block of code replace
Code:
- cp -r system tmpfolder (---this will take a few minutes---)
with
Code:
- cp -r system[B]/*[/B] tmpfolder (---this will take a few minutes---)
many thanks!
FastCR said:
to the op: I'm not knocking you here, but do you have a basic idea of generic linux file hierarchy or operations in general? Getting a basic grasp on working with files in a linux terminal will make all of these operations make a lot more sense, since most "adb shell" commands are basic linux commands.
Click to expand...
Click to collapse
Why would you go out of your way to say that? It's not constructive. As a junior member with three posts and 0 thanks after a year and a half, sharpen your teeth here at XDA before you act like a big shot.
Right thanks. Changed it.
Has it worked for you?
Sent from my HTC Desire using XDA App
samuelhalff said:
You could very well replace uImage with the new Quickie overclocked uImage for froyo (see dev thread).
Click to expand...
Click to collapse
Are you certain on this part? Last I read in that thread, Froyo needs a different minimum kernel.
UPDATE: Nevermind, I missed this updated effort.
Homer
Well, last time I checked, my NC was running at 950 on froyo with setcpu.
Check the forum. There's a nookie version of quickie. Except accelerometer doesn't work..
First, huge thanks to the second poster - great guide! Can we sticky this?
Second, yes I know what dd does, etc, I've been working with Linux for about ten years . I just don't know the ins and outs of embedded devices yet.
samuelhalff said:
Right thanks. Changed it.
Has it worked for you?
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
yeah i was up till 4am last night but got it working. first i tried to use my existing nf sd card... bad idea. would boot from emmc to the touch android screen to begin, but could not get past. i assume it was the issue on nookdevs because wifi was not enabled. so i removed the setupwizard.apk but somehow bricked and was unable to boot from emmc. so i took the following steps to get things working properly:
1. reimage boot and system from the stock 1.0.1 images and reset the nook to stock, didnt even touch. at the intro screen i just powered it off.
2. next i took a fresh nf sdcard and run steps from your post(with the correction to copy system contents)
3. from there i had a working nf from sdcard! i did my tweaks (google apps, market fix and button remapping from nookdevs froyo tips)
i might to put together a post with a more verbose set of instructions for a one stop froyo shop but if i do i will be sure to give you credit for your contribution.
thanks again!
Hi,
Second, yes I know what dd does, etc, I've been working with Linux for about ten years . I just don't know the ins and outs of embedded devices yet.
Click to expand...
Click to collapse
Well, that's a nice contrast. I've been working on Linux/Android for about 2 months now
I should have mentioned that the NF uSD Card must be a newly burnt image, without all the nookie tips added to it. Of course, your Google framework will crash if you port it without your data.
By the way, there's a nice trick to get past the numb android interface, simply touch every corner of the screen, starting with top left and going clockwise. You'll then be sent the your home screen, and from there you'll log on to google account again.
I think the best way of doing it would to create a flashable .zip, which I'll make tonight if I find the time and if people are really interested. But don't forget CWR dosen't work on nookie for the time being. The only way back would be through adb.
So, does anyone wish to have a flashable zip of this? Or will it be a waist of time?
Sam
samuelhalff said:
Hi,
Well, that's a nice contrast. I've been working on Linux/Android for about 2 months now
I should have mentioned that the NF uSD Card must be a newly burnt image, without all the nookie tips added to it. Of course, your Google framework will crash if you port it without your data.
By the way, there's a nice trick to get past the numb android interface, simply touch every corner of the screen, starting with top left and going clockwise. You'll then be sent the your home screen, and from there you'll log on to google account again.
I think the best way of doing it would to create a flashable .zip, which I'll make tonight if I find the time and if people are really interested. But don't forget CWR dosen't work on nookie for the time being. The only way back would be through adb.
So, does anyone wish to have a flashable zip of this? Or will it be a waist of time?
Sam
Click to expand...
Click to collapse
I would love a flashable .zip. I think many others would as well.
starkruzr said:
I would love a flashable .zip. I think many others would as well.
Click to expand...
Click to collapse
Can't wait for a flashable zip. Maybe even some cm7 release candidates would make me real happy.
Sent from Nooted NookColor using XDA App

[Q] MCR fr17 Fear Kill Edition is based on ext3 or ext4

Hi All,
Sorry for such a noob question but the MCR fr17 Fear Kill edition runs on ext3 or ext4 ?
Also, is there a way to check if its ext3 or ext4? Many thanks in advanced.
You can check with by running mount from a terminal.
Being an MCR based ROM it should be EXT4 though.
T_T Pardon me for being ignorant but I'm very new to the terms used here.
Terminal <-- this meaning? I believe this is an external program run using the computer to SSH into the phone right? Or if I'm wrong, any guides for me to follow or can help to pinpoint to a link where I can learn all this?
Thanks in advanced.
Terminal = https://market.android.com/details?id=jackpal.androidterm
Install it, fire it up and at the prompt just type 'mount'
You'll be greeted with a couple of pages of gibberish, scroll to the top of it, and you'll see system & data mentioned:
Code:
/dev/block/mmcblk0p1 on[B] /system type ext3[/B] (ro,relatime,errors=continue,data=writeback)
/dev/block/mmcblk0p8 on [B]/data type ext3[/B] (rw,nosuid,nodev,noatime,errors=continue,data=writeback)
As you can see, my system is EXT3
Rusty! said:
Terminal = https://market.android.com/details?id=jackpal.androidterm
Install it, fire it up and at the prompt just type 'mount'
You'll be greeted with a couple of pages of gibberish, scroll to the top of it, and you'll see system & data mentioned:
Code:
/dev/block/mmcblk0p1 on[B] /system type ext3[/B] (ro,relatime,errors=continue,data=writeback)
/dev/block/mmcblk0p8 on [B]/data type ext3[/B] (rw,nosuid,nodev,noatime,errors=continue,data=writeback)
As you can see, my system is EXT3
Click to expand...
Click to collapse
Mine says ext4
Using fear 10
Sent from my LG-P990 using XDA App

[HOW TO] G.B on International Builds using 2ndinit (minor update 04/07/11)

Before anything............. This may Brick your phone, follow instructions and it wont
Big shoutouts to:
2nd-init------
skrilax_cz for writing this awesome trick!
edgan for getting it working on atrix with taskset
this hack:
eval for crazy loopback mount idea and all scripts
unknown for lots of helpful testing and debug
XLR88 for the system.img of GB 2.3.4
This is an example of the sort of thing that 2ndinit makes possible
but it is a quick hack and running with the wrong kernel - so still buggy
Bugs
1) The screen flips out when locked, so basically you swipe left and screen goes right.
2) No wifi
3) Camera dont work
4) Moto sign in not working
5) fingerprint
Working
1) Mobile data
2) network
3) Google sign in
4) Market
5) Calls
Will update when fixes are found and bugs are ironed out.
How to get GingerBread via 2ndinit on a locked bootloader for motorola atrix
Tools you need
Adb or Rootexplorer, 2ndinit.apk, terminal
Fastboot
Install 2ndinit.apk
Reboot
in terminal type
ls -a /sys/kernel/debug
Click to expand...
Click to collapse
should get output not
...
Click to expand...
Click to collapse
Download this ...........http://download839.mediafire.com/gv6kzdu34z3g/lcldnltaqj8xd9x/2ndGB.tgz
extract this to sdcard
Download this ...........http://hotfile.com/dl/122055970/0a6dfce/moto-fastboot.zip.html
Extract to sdcard
Delete everything in /preinstall
adb shell
su
cd /preinstall
rm -rf
Click to expand...
Click to collapse
copy 2nd-init, taskset, busybox to /preinstall
In ternimal
chmod 755 2nd-int
chmod 755 taskset
chmod 755 busybox
Click to expand...
Click to collapse
Rename hk. Img to system.img to and then copy to /preinstall folder
copy files from /ETC/rootfs/ to /system/etc/rootfs/ and set permissions
chmod 644 /system/etc/rootfs/*
Click to expand...
Click to collapse
copy this to /system/bin/ download and add gb directory to /data/ so it becomes /data/gb/
In terminal type
ls -a /sys/kernel/debug
Click to expand...
Click to collapse
you should get nothing at all
reboot.....
Backup your data this is a recommendation just in case
reboot again...........
when rebooting hold volume down then scroll down to EARLY USB ENUMERATION then volume up (do this everytime you want gingerbread)
wait.............
You should successfully boot into GingerBread... Congradulations
getting back to froyo
reboot
If all this fails, install 2ndinit.apk from here
Then repeat this tutorial...
Sorry about the crap video
WATCH HERE
If anyone can help to solve the flip of screen here is some clues that may help
1) screen is working prefectly until screen turns off, then it flips
Glad my work could be of use =)
And thanks for taking this off my hands while I'm away... hope you can fix the touch screen left-right input flip ... if anyone has any ideas, PM me, _unknown and stevendeb25. Here's to hoping all international users can enjoy 2.3.4 soon!
PS. haha thanks for quoting all my cursing in IRC about my /data failures
How my hack works
For international devs who want an idea of how I did it (before stevendeb25's tutorial & release) the following details my mount_ext3.sh:
Loopback hack only loads if you fastboot menu to early USB enum, so, run if ro.usb_mode==debug (plus helps us debug to adb early... why /system/etc/rootfs/default.prop we copy to / has ro.secure=0 & persist.service.adb.enable=1) In addition to default.prop we copy, extracted files from GB's ramdisk:, /init, /init.rc (modified, comment out mounting /system) and ueventd.rc from etc/rootfs, plus symlink /sbin/ueventd->/init.
Next, mknod and mount /preinstall rw, where we keep taskset, 2nd-init and busybox binaries, as well as system.img (CG60 from hktw 2.3.4 sbf.) It's probably already in /dev/block/ but this varied across froyo builds so mknod and mount rw to be safe. Good idea to use /preinstall/busybox from now on as /system mount dis/appears.
e2fsck -y the system.img and then losetup the loopback mount, umount -f -l /system, and mount -t ext3 <loopbackdevice> /system. For debug cat out /proc/mounts to a file in /preinstall or /data, actually I also append ">>/preinstall/debug 2>&1" to every command. Finally, now you can (taskset) 2nd-init your new system!
Unfortunately, seems necessary to fastboot -w or just rm -r /data/* between boots of froyo and GB. Annoying, but I couldn't easily get a GB-only /data mounted.
Now, can you fix the input flip left-right after lock screen? Clues are: it doesn't happen if this trick is tried on GB kernel (with Froyo ramdisk, system, and same 2nd-init trick.) Also, it persists after warm reboot, GB->GB. Pulling in /system/lib/hw from Froyo didn't help. Tho you'll want to bring back (and insmod) aev.ko, evfwd.ko, plus revert dhd.ko to Froyo version, as the first two are in-kernel on GB, and the latter seems to differ. I am fairly confident most bugs can be fixed by replacing (lock screen? nvrm_daemon?) pieces of GB userspace with Froyo versions in system.img. I just lost a bit of ambition after finding the fastboot oem unlock in the BL plus I will be away for a bit.
So, good luck to stevendeb25 and all you non-ATT Atrix hackers!
At least International users get some Gingerbread love! Good job guys!
i can't believe!!!
what a great new!!!
thanks guys!
the video seems to be really amazing!
wanna try it!!!!
that bootscreen looks awesome at first part in the video, is that stock?? oo
Excellent work brothers, you guys are really making us proud as well as you should be!
Very good job!
Now I can start dreaming about GB in my non-att atrix
You sexy, sexy man! Rawr!!
Great news
Sent from my MB860 using XDA Premium App
stratax said:
that bootscreen looks awesome at first part in the video, is that stock?? oo
Click to expand...
Click to collapse
Yeah stock orange uk bootscreen
Sent from my MB860 using XDA Premium App
Lol..
Awesome Steven, lookin' forward
bongd said:
You sexy, sexy man! Rawr!!
Click to expand...
Click to collapse
Stock Bell Atrix on Rogers with updated radio, Rooted, deodexed, Honeycomb theme, and frozen!
Released ............ enjoy guys, if dont want flip screen, dont lock the phone
This remember me when we try to put android on Windows Mobile Phones!haha
Anyway, nice work man, Let's play a lil
Wow, good work guys. I am sure this has been torture for international users. For the past couple of weeks, we in the states (or anyone on at&t) have been like kids on Christmas, while everyone else sits on the sidelines It's a good thing the 2nd init port got put to good use.
HolySorento said:
This remember me when we try to put android on Windows Mobile Phones!haha
Anyway, nice work man, Let's play a lil
Click to expand...
Click to collapse
Android has been ported to the Iphone, but as far as I know only to the older generations.
c'mon guys, are you trying that??
post your opinions!!
stevendeb25 said:
Released ............ enjoy guys, if dont want flip screen, dont lock the phone
Click to expand...
Click to collapse
Great work steve
Steven, is there no way for you to use drivers from the hktw build to fix wifi and camera?
Or do those require kernel level access or something?
Sent from my MB860 using XDA Premium App
stevendeb25 said:
Yeah stock orange uk bootscreen
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
Think anyone could post this? It looks much better than the ATT one.
tasty_boy said:
c'mon guys, are you trying that??
post your opinions!!
Click to expand...
Click to collapse
I'd love to try but without wifi and that flip issue I think I'll pass this version.
Sinful Animosity said:
Steven, is there no way for you to use drivers from the hktw build to fix wifi and camera?
Or do those require kernel level access or something?
Click to expand...
Click to collapse
Other way around... if you pull in dhd.ko from the latest Froyo build you flashed on your system, as well as aev.ko and evfwd.ko (and /system/etc/firmware or wifi/ ?) into loopback mounted /system you will have more chance of working wifi in HKTW2.3.4. (HINT HINT you could do this directly in the mount_ext3.sh script... copy useful 2.2 stuff to /preinstall, copy back into new /system after unmount,remount, even insmod if you have to...)
Remember, this trick produces a mismatch between /system version (GB,2.3.4) and kernel version in boot.img which is actually running. We can take care of ramdisk post-hoc before 2nd-init but older kernel and its API is still in place so pieces of HKTW userspace will have to be replaced/modded to fix bugs. This version of mount_ext3 is an early release for the hackers who want to tinker until it works... good luck! I will have only web and ssh access off and on for 10 days but can answer any questions by PM, on IRC or here..

[DEV-ONLY][RECOVERY]CWM 6.0.1.x Using Pseudo File System

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] Dead emmc? (mulitple fsck errors on /data)

Hi guys,
Before I start, as it may or may not be related, just a note that I modified my partition table a few months ago to make DATAFS larger and UMS smaller.
So, I've been having a few problems with my Note lately. It had a small fall once (10-20cm) and the battery popped out. After that the phone refused to boot (stuck at GT N7000 logo). I just assumed "something went wrong", and as I wanted to clean my phone anyway, I just wiped / restored apps from Titanium.
All was fine and dandy. Except my phone crashed again today (screen off, still playing FM radio but won't come back on). Went straight into recovery and decided to run fsck just for kicks... and was greeted with a looooong list of errors. Skipping to the juicy bits:
Code:
Illegal block number passed to ext2fs_test_block_bitmap #3745358202 for multiply claimed block map
[b](Many, many of the above)[/b]
...
Multiply-claimed block(s) in inode 32765: 159256 159257 159258 159259 159260 159261 159262 159263
[b](Many, many of the above)[/b]
...
Pass 1D: Reconciling multiply-claimed blocks
(There are 13649 inodes containing multiply-claimed blocks.)
...
I didn't leave the scan to complete, will probably do it overnight.
My /system partition seems fine however
Code:
e2fsck -c /dev/block/mmcblk0p9
e2fsck 1.41.11 (14-Mar-2010)
/dev/block/mmcblk0p9: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p9: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p9: 2032/54544 files (1.3% non-contiguous), 208212/218112 blocks
I will reflash with pit from Odin tonight once I'm home, and see if that helps. I guess my question is though, do I even bother? Looks to me like my emmc is (partially) dead, should I just reflash all stock and bring it to a service center?
Thanks for the help!
Well, what do you know, looks like I've fixed my issue. Been going through some checks for bad blocks through dd, and the partition could be read without issues, so figured it couldn't be that bad.
For reference, what I've then done is:
- In parted, use mkfs to recreate the datafs partition as ext2
Code:
parted /dev/block/mmcblk0
mkfs
10
ext2
- Convert the ext2 partition to ext3
Code:
tune2fs -j /dev/block/mmcblk0p10
- Convert the ext3 partition to ext4
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p10
- Run e2fsck
Code:
e2fsck /dev/block/mmcblk0p10
- Did a factory reset from recovery and rebooted
And voila
Now if anyone could tell me how I change the title of my thread to mark it solved please?
Lol you fix faster then we can respond to your questions.
Wanted to say that your emmc doesn't look fried, since the
errors say that parts of your filesystem are multiply claimed,
so a format should do the trick.
Good to see that you found it already
Hehe, thanks for the tip though
I also initially thought this was just a partition issue, but I just got confused... In my mind, a factory reset would do a format already, and if so, doing a format myself wouldn't help. I'm however quite glad I was wrong
How did you resize the partitions?
cooldoud said:
Now if anyone could tell me how I change the title of my thread to mark it solved please?
Click to expand...
Click to collapse
First congrats for fixibg your phone.
Now go on first post press edit thetr you will see the title too and you can change it.
Sent from my GT-N7000 using Tapatalk 2

Categories

Resources