DFT-Cotulla's Development Thread

Status
Not open for further replies.
Search This thread

donmarkoni

Senior Member
Sep 21, 2010
1,871
2,203
Belgrade
HTC U12+
Xiaomi 12 Pro
...
But do Android and applications really need that functions?
I know that /etc/ is linked to /system/etc and many other things, but is it really needed for /data?

Starting with 4.2 Google added 3 places where the data/media is linked. This was so there could be multiple users per device similar to the way Windows is. Each user gets their own folder for data. Though the weird part is, if you delete from any of the symlinks it deletes it from data/media as well. Hope that helps.
...

DeSaint2, mate, you are... erm... wrong. Well, you are thinking straight, but your symlinks got mixed-up. ;) Those symlinks you mentioned are there for compatibility reasons, not for multi-user environment. They are all connected to same place, that's why stuff gets deleted "everywhere" when you delete it from one directory. Users should have each ones own directory (/data/media/0, /data/media/1, /data/media/2, etc...)
 
  • Like
Reactions: TheEgonSpengler

Cotulla

Retired Senior Recognized Developer
Sep 8, 2007
881
5,448
And PS is it going to have tetris?
Tetris needs proper control. We have only 3 real harware button.
So it needs redesign...

Its basically a micro SD card reader that works off of USB OTG, and confirmed working for HTC One on stock ROM and kernel. I don't know that it would work in recovery or how we could achieve USB OTG in MAGLDR or if it would work in Windows Phone, but it might solve our storage woes, considering AT&T is the only carrier with a 64GB One. I too have a 64GB model, so if you need testing of any kind on another device, I will be here. Storage is not an issue for me.
Well it won't solve a problem :) I already can connect USB Stick 32Gb via USB Hub and etc. But this prevents me from debugging cuz it's also done by USB.
 

lolerpro8

Senior Member
Jan 14, 2013
546
187
Tetris needs proper control. We have only 3 real harware button.
So it needs redesign...
I got an idea:
Back button left
Home right
Vol - accelerate
Vol + exit (or maybe it will be better for power button for that)

And i got to ask you. What was the hidden feature in magldr. Reaching 111111 is pretty impossible...
 

MemoryController

Senior Member
Dec 21, 2011
1,024
219
Thessaloniki
Tetris needs proper control. We have only 3 real harware button.
So it needs redesign...


Well it won't solve a problem :) I already can connect USB Stick 32Gb via USB Hub and etc. But this prevents me from debugging cuz it's also done by USB.

How do you access serial uart output on your bootloader? Do you run code to put usb into serial or are you using special cable, eg with resistor on ID-GND? I had one like this for my Galaxy S2 but it doesn't work anymore on my Galaxy S4.

Sent from my GT-I9505G using Tapatalk
 

streetster

Senior Member
Apr 23, 2010
60
5
London
NTFS supports symbolic links - from wikipedia, I've used them in the past...

e.g.

mklink /D "c:\link-here\" "c:\to-somewhere-else\"

I don't know how much effort would be involved using NTFS as the partition format over ext4, NTFS (read) support existed in the Linux kernel since 2.2.x. The NTFS-3G project supports symbolic links and looks to be the way forward.

Here's a thread by shardul_seth about his experience / progress on the matter.
 

eXecuter.bin

Senior Member
May 10, 2011
188
45
NTFS supports symbolic links - from wikipedia, I've used them in the past...

e.g.

mklink /D "c:\link-here\" "c:\to-somewhere-else\"

I don't know how much effort would be involved using NTFS as the partition format over ext4, NTFS (read) support existed in the Linux kernel since 2.2.x. The NTFS-3G project supports symbolic links and looks to be the way forward.

Here's a thread by shardul_seth about his experience / progress on the matter.

NTFS symlink are not the same as linux symlink, they're not compatible with one another.

Programs such as NTFS-3G simply allows you to access NTFS partitions once the system starts up, but that's about it. It does not allow you to install linux on a NTFS partition for a lot of different reasons, simply because NTFS does not support a lot of features such as linux permissions and etc.
 
Last edited:

adwinp

Senior Member
Jun 22, 2008
2,055
330
urandom
Do you really want to go to all that trouble for repartitioning?
I have a simpler solution: simply use a static lvm binary & cryptsetup if you want encryption, but if you want an automated solution, you need to have your key file somewhere on the device (for example repack it into the initrd, but then again, this defeats the purpose of encryption - it's like keeping your credit card & pin in the same place)
;]

1: manually pvcreate on mmcblk0p35-37 (for the international HTC One)
either create symlinks for the functions to the lvm binary or invoke it from the tool (lvm pvcreate /dev/block/mmcblk0p3x)
2: create the vg, add the 3 pvs, create your lv(s) + mkfs

You also need to modify the init.device.rc in the initrd (either directly or exec a script) accordingly to vary on the vg on boot before mounting
If you really need it, you can also modify your recovery to do the same instead of manually doing it from adb
Partitioning support via menu options for LVM would require more work though.

I've been using this since my days on the Desire HD with no issue.
I'm also using cryptsetup on my 64Gb microsdxc (on my tablet).

NOTE: you need to either add sleep for a few seconds in your script or invoke lvm vgscan & vgchange -ay early enough in order to allow the dm mappings to be created & settle

NOTE2 (off topic): For a lightning fast rom, you can also repackage it (/system) into a loop-mounted image which needs to be copied to a tmpfs.
The only downside is that you need to wait for the image to be copied on image boot (anywhere from 15-45s depending on the size of the system partition) & you need to remember to edit the image also if you're pushing anything to /system, otherwise the changes will disappear on the next reboot. Then again, this is only for purists ;]
 
Last edited:

Cotulla

Retired Senior Recognized Developer
Sep 8, 2007
881
5,448
How do you access serial uart output on your bootloader? Do you run code to put usb into serial or are you using special cable, eg with resistor on ID-GND? I had one like this for my Galaxy S2 but it doesn't work anymore on my Galaxy S4.
I am not using UART, only USB Serial.


Do you really want to go to all that trouble for repartitioning?

I have a simpler solution: simply use a static lvm binary & cryptsetup if you want encryption, but if you want an automated solution, you need to have your key file somewhere on the device (for example repack it into the initrd, but then again, this defeats the purpose of encryption - it's like keeping your credit card & pin in the same place)
1: manually pvcreate on mmcblk0p35-37 (for the international HTC One)
No, I don't want encryption.
I need solution to cut space from "userdata" for another purposes, like Windows RT.
Actually it's fake repartitioning, I am not going to modify main GPT, I am going to tell Limux/Android that it has less space in userdata than it is and use the rest for another purposes.
It should work I hope.
 

munjeni

Senior Member
Jun 2, 2011
9,720
22,375
First off all thank you for everything you done for HTC HD Mini and HTC HD2, I am glad to see a legend aka Cotulla here.

But if someone want and can he/she can implement it in the recovery and share results with community.
Or maybe make android use NTFS instead of EXT4 and use shared partition.
Thinking to buy One for my spare time, and I will make recovery for these purpose, but first of all waiting a result of Magldr, than for sure One is my next phone.

NTFS... do you mean about runing file based partitions (trought loop device) in NTFS?
 

_kyo_

Senior Member
Aug 16, 2011
60
32
I am not using UART, only USB Serial.



No, I don't want encryption.
I need solution to cut space from "userdata" for another purposes, like Windows RT.
Actually it's fake repartitioning, I am not going to modify main GPT, I am going to tell Limux/Android that it has less space in userdata than it is and use the rest for another purposes.
It should work I hope.

I am not an expert but I know that in linux you can create a file and mount it as a partition.
Is it possible to create a file (with X size) in userdata , and then mount and use this file as a partition for your own purpose ?
 

MemoryController

Senior Member
Dec 21, 2011
1,024
219
Thessaloniki
I am not using UART, only USB Serial.



No, I don't want encryption.
I need solution to cut space from "userdata" for another purposes, like Windows RT.
Actually it's fake repartitioning, I am not going to modify main GPT, I am going to tell Limux/Android that it has less space in userdata than it is and use the rest for another purposes.
It should work I hope.

Could you explain please the way to get debugging output?

Sent from my GT-I9505 using Tapatalk
 

Cotulla

Retired Senior Recognized Developer
Sep 8, 2007
881
5,448
I will ask you something that crossed my mind. How are going to boot into recovery h-boot or magldr? I'm asking because we already need a recovery adapted to magldr since almost everything is changed.
+ will you have to increase the size of boot partition?
recovery loaded from HBOOT.
HBOOT loads only one: recovery.img or boot.img.
So if I replace boot.img with MAGLDR, recovery still will be booted directly after HBOOT without MAGLDR execution.
I am going to put a custom regions header at the start of "userdata", like "region name | region type | start sector | size in sectors"

Linux kernel should be hacked to handle this information. Inside GPT parser it should read the first sector of "userdata" and add additional partitions.
It's my current idea.


I see installation like that:
1)install MAGLDR via
Code:
fastboot flash boot MAGLDR.img
command

2)user boots to MAGLDR
now it's time to repartition userdata.
it can be done (on PC) by
*modified fastboot with additional commands / CUI interactions
*custom program based on fastboot protocol.
*custom program based on custom protocol.
I didn't decided my way, but using ADB driver from Google should be the best idea.

3)user can flash Android/Linux kernel in MAGLDR via
Code:
fastboot flash boot boot.img
command.

4)user can flash WRT in MAGLDR via
custom program, cuz fastboot is very limited protocol and not suitable for flashing big files.
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 291
    Hello, hihihi

    I am Cotulla, member of DFT team, probably some of you already know me by older projects related with famous HTC HD2 (Leo).
    Nowdays HTC Leo become too old :(, while hardware abilties are growing very fast nowdays
    (huh, already phones with 64 bit CPUs and 4 Gb RAM? Wtf my old PC from 2008 has 4 Gb ram too)

    So I decided to switch hobby phone, finally I got HTC One 64Gb (thank all contributors),
    so I am with you now :highfive:


    I am not sure about developement goals,
    I am doing it for fun, but probably it will be something like:
    1)Oldschool WM61/65 port :laugh:
    2)Windows RT and/or Windows Phone 8
    3)Own bootloader
    Ofcourse I no idea about port quality - things like ultrapixel camera can be impossible to bring up.
    But it's hobby, not attempt to do a work instead of a big company.

    I am already started to work on MAGLDR for HTC One.
    Then I am planning to bring UEFI up.

    Will keep community in sync about development status.
    Releases are going to be more often.


    About different models support: there are many different HTC One revisions around, I will try to support as much as possible of them.
    It seems S-OFF is mandatory requirement.


    As well as I have question to One Android developers and need some kind of support:

    I am going to divide the biggest "userdata" partition to grab a space for another OS.
    userdata it seems is EXT4 formatted.
    I don't want to modify primary GPT (at eMMC sector 0) to minimize ability to brick device.

    My current idea is a hack inside Linux GPT parser to replace userdata partition bounds.
    In such scheme Linux kernel must be modifed to use MAGLDR / another OS.

    But I don't know how Android will like unformatted userdata partition. Anyone knows?
    Or maybe someone can suggest better scheme?
    95
    I got small progress already.
    Initial MAGLDR is working, initial UEFI is working,
    bootarm.efi boots from USB stick with WRT installation files.
    USB stick is connected via USB host.

    But it halts in such state - more stuff must be done to continue with installation (like eMMC access, ACPI support and etc).

    For now it's double pixeled - works as 960x540 instead of 1920x1080.
    59
    it looks like USB MS is working now.
    Made USB RAM stick with 1.5Gb storage.
    52
    we will see. i know that microsoft had askt HTC to make WP edtion of the one. Does WP support Multi core soc above dual core?
    Well my current target is Windows RT.


    gigsaw is telling right things in the general :)

    (I know he tried and probably he will try)
    "nobody knows who i am maybe you would understand"?
    How do you know what I am doing? WTF :laugh: No, u don't.

    Of course the biggest part of the people define the closed-source development a pain in the a*s because it's hard or almost impossible, but it's definetly more interesting than android developping.
    Well, I can't call Android really open sourced system.
    You often just can't get enough from those open sourced kernel drivers and etc.


    Actually I wanna see running Windows PE (Setup) on HTC One and I am working in that direction at the current moment.
    32
    Do you already have something running?[/quote[
    Yes, MAGLDR and UEFI are already running from RAM. Not full functionality though.

    As far as I know, the m7's hboot runs a kernel from /boot partition (boot,img). If you want to put the kernel away to a different location, maybe hboot won't like it and reboot into the bootloader screen permanently.
    So it might be you have to struggle with the hboot bootloader (or even SBL) to boot up MAGLDR.
    Or, you could completely replace hboot by MAGLDR.
    Well MAGLDR will be in the right boot.img format, so HBOOT will boot it like kernel.
    Then MAGLDR will load Linux kernel in case of Android boot.
    I think It's not good idea to touch HBOOT at all. So MAGLDR should run after it.

    Do you already have an idea about the whole architecture ?
    1)Android: HBOOT -> MAGLDR -> Linux kernel
    2)Windows: HBOOT -> MAGLDR -> UEFI -> Windows kernel

    During start up MAGLDR will read stroage config from eMMC and put it into ram.
    So Android or UEFI will able to use it for detecting userdata partition bounds.