Related
Status: working!
The tar file has some binaries which work.
If you aren't a developer you probably don't care about this.
I'm working on getting FUSE working on my P500, and thought I'd share my experiences. FUSE is a mechanism to mount lots of filesystems (like fusecompress, sshfs, or unionfs) without needing to recompile the kernel or patch the kernel. My need is to have a writeable /system that can be 'cleaned' back to the original state with the push of a button.
The following details my initial attempt. I've had better success as detailed here:
http://forum.xda-developers.com/showpost.php?p=14619814&postcount=3
Steps:
1) get the kernel source and build it with the FUSE module enabled. this provides fuse.ko which should be usable on virtually all 2.6.32.xx kernels for the P500
2) get the fuse userspace libraries and compile. I had to use a very old version (2.4.2) because newer versions need support for statvfs which bionic doesn't have. I had to patch in apthread_rwlock which isn't in bionic for froyo, and a few other cleanups.
3) get a fuse filesystem to test. I'm using unionfs-fuse. I had to use a very old version (0.11) to go with my very old libfuse from (2)
4) Try it out:
* move the files from 1-fuse.ko, 2-fusercompress, and 3-unionfs to the p500
* become root
* make sure all files are executable and in the PATH
* load the kernel module: insmod fuse.ko
* try to use fuse: ./unionfs --roots=/sdcard /mnt/asec
The last step seems to work, but ps shows no unionfs process.
Next I try with debug enabled:
* ./unionfs --roots=/sdcard /mnt/asec -d
This gives a segfault
Lastly I try with strace to find the segfault:
* strace -ff -F ./unionfs --roots=/sdcard /mnt/asec -d
now the code no longer segfaults, and the mount works.
So my goal now is to figure out why it segfaults when not run via strace.
I found someone who got this working on the desire:
http://forum.xda-developers.com/showthread.php?t=763908
(I tried their binaries just for fun, but they're not compatible with the P500)
They did it by using scratchbox which imports glibc. I was trying to do a native bionic build, but it may be easier to try scratchbox, as it would let me have a modern libfuse. If I can't figure out this segfault, then I'll go there next. Has anyone tried building for the P500 using scratchbox?
Sweet idea man!
Ok, I have fuse fully working using the latest fuse version 2.8.5
In order to build, I got a copy of statvfs.c and statvfs.h from the shieldroid project. I had to modify the definition of f_fsid to be 'unsigned long' and adjust statvfs.c appropriately I also ended up disabling multi-threaded support in fuse as it made it made it easier to compile.
With a bunch of monkeying around, I got libfuse compiled with the apropriate utils. I verified the example filesystems worked, then went ahead and built unionfs-fuse (latest version).
Using the tar file in the 1st post you can now:
* copy all files to /data and make executable
* add the relevant directory to your path
* insmod fuse.ko
* ./unionfs /sdcard:/system/bin /data/local/tmp
* ls /data/local/tmp (should contain the contents of /system/bin and /sdcard in one merged dir)
When I get a chance, I'll build an installable zip that puts the files in the right place for easy use.
FYI, my goal is to create a utility that can temporarily enable root on a phone and then disable it when done. My idea is to move the 'su' command out of /system/bin onto /data, and then use unionfs to teporarily add it back onto /system/bin on command. When done, you'll be able to click to unmount it again, bringing the phone back to an unrooted state.
It'll work sort of like the 'temporary root' capability of z4root, but will be undoable without a reboot (it also won't inculde the code to actually break out of a stock ROM, the goal is to be able to toggle root on an already rooted phone).
I need this capability because I run some enterprise software that doesn't work on a rooted phone, and I don't want to be constantly booting to recovery for root tasks.
i dont understand most of wat u saying, but good going man.
im also computer science student but hate studying =(
In case someone would like to build an own image based on the stock firmware,
I wrote a script that performs the neccessary steps (which where mostly described at the xda-forums) automatically on a linux based system.
It is very raw, and is not well optimized. It also is using many sudo calls for creating and modifying the image. Maybe someone has another, better solution.
Usage:
Download and unpack the ExtractAOS archive:
Code:
tar xfj ExtractAOS.tar.bz2
At first you need to place a AOS update file (firmware_archos_it4.aos) into the "dl" folder.
Then copy a busybox.tar.bz2 file, which contains the statically linked binaries of busybox (no subdirectories) inside the archive:
Code:
ash
busybox
cat
chgrp
...
Also make sure that following tools are installed on your system:
unsquash
unzip
tar
Then start the main script:
Code:
./unpackAOS
You will see a menu like this:
Code:
---------- Unpack and Modify Archos image -----------
1 Cleanup: Umount all mounted devices and delete all created files.
2 Download needed packages
3 Setup build directory
4 Create new Ext4 loop image and mount it to MOUNT_DIR
5 Extract AOS image
6 Copy AOS image contens into /data/ExtractAOS/archos_update_folder
7 Modify image in /data/ExtractAOS/archos_update_folder
8 Finish image and unmount it
88 Perform step 3-8 automatically
99 Exit
Then download needed tools via menu item "2".
If the download are successfully done, then you can enter "88"
to build your own archos.ext4.update image file.
Notes:
I'm on a 64 bit system. Letama seems to provide binaries also for 32 bit sytems. In that case, you can modify and set the correct binary within the script file.
This script is intended to provide a base for developers which want their own customisations
Special thanks to:
letama
surdu_petru
Thanks i will try it next weekend
Gesendet von meinem HTC Desire mit Tapatalk 2
Quallenauge said:
Also make sure that following tools are installed on your system:
unsquash
unzip
tar
Click to expand...
Click to collapse
On which firmwares did you test this script?
There was an error in squashfs header in 4.0.5-4.0.6 FW (including test releases)- androidmerged.squashfs.secure could be mounted as loop but not extracted
Hi,
I builded my image based on the current 4.0.7 aos-update file.
I'm using archlinux 64 bit.
Which arch are you using? Can you please verify that the correct extractAOS binaries are downloaded within the script?
The script doesn't mount the androidmerged.squashfs.secure as loop device, but copies all the data from androidmerged.squashfs to a temporary folder named "output_folder".
Can you please provide a console output? Maybe there is some more information?...
Quallenauge said:
Hi,
I builded my image based on the current 4.0.7 aos-update file.
I'm using archlinux 64 bit.
Which arch are you using? Can you please verify that the correct extractAOS binaries are downloaded within the script?
The script doesn't mount the androidmerged.squashfs.secure as loop device, but copies all the data from androidmerged.squashfs to a temporary folder named "output_folder".
Can you please provide a console output? Maybe there is some more information?...
Click to expand...
Click to collapse
I didn't test the script (I stick to 3.2.80).
For modifying I use LeTamas' "manual" method- correct binaries are present (linux 32bit). Unpacking .aos file works fine but I had problems with unsquashfs (header error in =<4.0.6 fw) so the only option was mount -o loop.
If it works for 4.0.7= Archos corrected the error
Hi!
I've just downloaded the 4.0.6 version from archos servers.
Code:
h**p:// update.archos.com/9/gen9/gen9_4.0.6/firmware_archos_it4.aos
Unpacking of the squashfs still works here...
Maybe you missed the needed steps:
Code:
cd $BASEPATH/firmware_archos_it4/root/data
dd if=androidmerged.squashfs.secure of=androidmerged.squashfs bs=256 skip=1
if [ -d output_folder ]; then
rm -f output_folder
fi
unsquashfs -d output_folder androidmerged.squashfs
Maybe stupid question but why we need this busybox ( this archive actually is missing)? I think there is busybox already from the archive is that archive is rooted or give us something more?
Hi,
I saw that another customized roms contains an updated busybox, which can provide more features.
(Honestly, I don't know which feature is it worth to replace the builtin busybox... . :angel
If you want to build an image without this step, just comment out the busybox call.
The busybox archive is missing, because I don't know If I have the permission to include a compiled (from other people) busybox by default.
[Dev] CM9 Mod Extension
Help!
I can't wait to try out the final build from Anybody interested in testing a CM9 super-alpha build in a week or so?, so I decided to try out a modification of the stock rom with CM9 by myself. And yes, today zygote has startet and I got a screen =)
I would like to share with you, what I did and I hope that you can give some code extensions to build a better mod script.
So, let's go:
1) Compile cyanogen mod
Install prerequisites
(I used Ubuntu Precise 32bit in a chrooted environment)
Then perform like suggested a repo init/sync:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
Then perform a compile action:
Code:
. build/envsetup.sh
lunch full_panda-eng
mka
PS: I had to modify the cyanogen_root/external/webkit/Android.mk
because there where build errors:
Code:
# Build the performance command line tool.
#include $(WEBKIT_PATH)/android/benchmark/Android.mk
Get some coffee I full build will take about an hour (on my system).
2) Unpack Archos stock image
You can use my tool at #1 of this thread!
PS: I used 407 stock image...
3) Create a loop image and mount it into a folder
You can use my script for that.
4) Get my new archive and unpack it.
Go into that folder and modify the bash script Porting.sh to match the folder paths:
Code:
export CYANOGEN=/cynogen_mod/out/target/product/panda
export STOCK=/ExtractAOS/firmware_archos_it4/root/data/output_folder/
export OUT=/Android/Development/mount
Run the script as root!
Code:
sudo ./Porting.sh
You get a file system contents in $OUT. Unmount the loop directory and
load it into the media update path as usual:
Code:
adb push archos.ext4.update /data/media/ && adb reboot
That's it! You should get a CM9 desktop.
------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
That was the good news! The bad:
The current state is a proof of concept.
I'm really hope that you can contribute to the modding script: I'm not an android expert!
Dirty technical details:
I had to use the existing vendor libraries especially the graphics drivers (I tried to use the panda binaries, with no luck :-/ ).
I moved them into the /system/vendor/lib folder and symlinked the libraries to /system/lib. This way it seems to much cleaner.
I modify the init.rc script to mount the data directory into /data2 to not interfere with existing archos installation. Later we should be able to point to that directory again. (Hint: to update the development you must use a adapted adb update command:
Code:
adb push archos.ext4.update /data2/media/ && adb reboot
From the first test, I saw that I have no real touchscreen, it worked like a "mouse" controlled environment. Maybe because the panda board has an mouse as input device.
Thanks.
PS: I'm curious how JackpotCalvin has solved the CM9 integration, It sounds way better than my solution...
Nice one
Some thoughts:
-why do you copy $STOCK/usr/bin/[binary name] when later all $STOCK/usr dir is copied?
-there should be no need to place PowerVR in /system/vendor/lib/[...], /system/lib/[...] should work fine
-check prelinks for existing libs and adjust prelink map for [repo path]/device/ (this may not be necessary, last system I compiled was Froyo)
I'm stopping my efford because I'm at a point, where I learned that just replacing the files between both sources (Panda Board CM9 builded binaries and Archos Stock ROM) is not a 100% solution.
I resolved my input devices setup, by copying the corresponding icd (and other) foles to the output folder. Then I had unresolved issues by getting WLAN to work. I found out, that in libandroid.so and libandroid_legacy.so are coded the modules which are needed for WIFI. Panda board is compiled w/o WIFI, so there are no
wifi modules loaded. (After I load wl12xx_sdio.ko manually by using insmod, the wlan was functional!).
The solution IMHO must be, to compile an adapted CM9 with all hardware specific settings. Maybe the customized files can also moved inside the device configuration directory so that the merge script is obsolete (my hope).
So I decided to either to wait until JackpotClavin is posting his CM9 configuration files
Code:
http://forum.xda-developers.com/showpost.php?p=28439197&postcount=80
or to learn how to make a new device on CM which maches our Archos device. (Maybe someone else can give me some archos specific instructions).
Update: Great! JackpoClavin has provided sources =)
Optimus Toolkit 6 in 1 v-1.1.1 - Linux
After a few month programming here you have this 6 in 1, we say that it is the counterpart in Linux of the "All in one", though it seems.
In you program have included 6 applications essential for the day-to-day management of Optimus, partitions with the new LG-ICS configuration or the former LG-GB.
Backup/restore of the whole system, and also of the SDs, both internal and external, and stores them in ZIP format.
The program includes:
Uncompress KDZ
Unpacking AP
Backup
Restore
Flash ROM (NVflash)
Rooted
Three languages, Spanish, English and German, I hope that it will soon translate into French, Italian and Portuguese
Click to expand...
Click to collapse
An example of use:
You have a ROM format KDZ and does not the Windows program rather than failing, because well, you copy the kdz within the kdz_folder folder, run the Optimus_Toolkit 6 in 1 and choose option 1- UnPack KDZ.
After a few seconds you have the AP and CP files to Flash with Smartflash. Oh, that doesn't want to boot windows?, no problem, use option 2.- UnPack AP, and then option 4.-Flash ROM for flashing by NVflash ROM KDZ just unpack.
But before Flash want do a backup of the system, as with the 3.- Backup/Restore option, this is in Optitool 2, backup/restore DATA, SYSTEM, etc.
Click to expand...
Click to collapse
The operation is very intuitive, just follow the instructions on screen.
The program does many things, and others will in the future.
I hope that you go reporting if you detect a fault.
Changelog
V-1.1.1
- Support for German language, thanks to Cupacabra - in this version you can change language from the main menu
V-1.1.0
- Support for any language. I have included a language file that you can go adding translations to other languages - error correction. -Added you fixing of current route to run on MAC (by drag0njoe) - the only language menu exits the first runs, the language selected is memorised.
V-1.0.2 R
- UnPack KDZ - now is can copy more than one KDZ within kdz_folder/, the program will create a menu with the KDZ that is inside the folder. - Added limits so that an opcionque can not be pressed does not exist. - Automatically adapts to options with one or two figures.
- Flash ROM - remodelling of the Flash ROM menu and correction of minor errors
V-1.0.2
- Menu flasher - Two new options, [5] Flash RECOVERs and [9] Flash KERNELs. - Alternative kernels copied them to kernel folder / and the recoverys to the recovery folder. - The program will detect the kernels and recoverys withi
V-1.0.1
- Correction on menu flashing, by drag0njoe
- Added flashing Kernel, by drag0njoe
V-1.0 stable
- Fixed bug when unpacking AP
- Fixed bug when unpacking KDZ
- Fixed bug in detection of ROM
- English version, corrected spelling errors.
- Revamped graphic look.
Click to expand...
Click to collapse
CREDITS
• [email protected] introduced the 'LGExtract.exe'. the encrypyted/compressed kdz can be extracted/decrypted to AP.bin/CP.fls by LGExtract.exe
• AP.bin extractor (win32/linux)
• xonar_ made BIN/FLS extractor
and release source
• (original Java version by xonar_)
• (win32 C port by navossoc)
• [TOOL] LGExtract 0.2.1 by navossoc
Click to expand...
Click to collapse
DOWNLOAD
Optimus_Toolkit_6-in-1_V-1.1.1.tar.gz - 25.64 MB
Nice bro,
It's good to have another alternative toolkit for linux users.
New version corrected, improved and stable
Thanks for your work and collection, as a regular linux user it's very useful for me.
I have some recommendations which are might be improve the linux users experience.
I suggest you to use some kind of compression which is takes care about the extended *nix attributes, like the executable bit. For example, the 7zip and the tar.gz will be perfect.
But if you feel better, that's no problem using the proprietary rar format, in this case I have to execute these commands:
Code:
chmod +x scripts/*.sh
chmod +x tools/7za
chmod +x tools/adb_linux
chmod +x tools/adb_mac
chmod +x tools/cabextract
chmod +x tools/extract
chmod +x tools/nvflash
Or, if you think you can implement such a thing like these into your menu.
Not a big problem, just an idea how to make your work more user friendly.
The other, which is also just a minor thing, in the tools/flash_en.sh I found that in the Opti nvflash command line there is a tools/fastboot.bin, which is not corrected to the fastbootICS.bin file, so the nvflash of course does not work with.
Lastly, please consider about integrate the recovery from pengus (CWM non-touch) and tonyp (CWM touch and TWRP soon), and to implement the kernel flashing only (ex. for the kernel testers). I attached my version of your flash_en.sh with Flash ROM option 8 (because I am successfully stucked on boot with a new kernel ).
Thank you for your work!
excellent useful tool!
drag0njoe said:
Thanks for your work and collection, as a regular linux user it's very useful for me.
I have some recommendations which are might be improve the linux users experience.
I suggest you to use some kind of compression which is takes care about the extended *nix attributes, like the executable bit. For example, the 7zip and the tar.gz will be perfect.
But if you feel better, that's no problem using the proprietary rar format, in this case I have to execute these commands:
Code:
chmod +x scripts/*.sh
chmod +x tools/7za
chmod +x tools/adb_linux
chmod +x tools/adb_mac
chmod +x tools/cabextract
chmod +x tools/extract
chmod +x tools/nvflash
Or, if you think you can implement such a thing like these into your menu.
Not a big problem, just an idea how to make your work more user friendly.
The other, which is also just a minor thing, in the tools/flash_en.sh I found that in the Opti nvflash command line there is a tools/fastboot.bin, which is not corrected to the fastbootICS.bin file, so the nvflash of course does not work with.
Lastly, please consider about integrate the recovery from pengus (CWM non-touch) and tonyp (CWM touch and TWRP soon), and to implement the kernel flashing only (ex. for the kernel testers). I attached my version of your flash_en.sh with Flash ROM option 8 (because I am successfully stucked on boot with a new kernel ).
Thank you for your work!
Click to expand...
Click to collapse
I will take into account the compression, I will use the native tar.gz.
On line 101 of your flash_en.sh it refers to tools/recovery_ics-20121230.img
That recovery is that?
I'm hoping to TWRP, is a recovery which I like very much, I tried to adapt it to ICS based on modifications made by Stefan in the CWM, but I only got a tremendous brick ), is that something different from CWM works
If you think of any suggestions, they will be well received.
Stefan Gündhör said:
excellent useful tool!
Click to expand...
Click to collapse
Blessed are the eyes that you read
Homero2 said:
I will take into account the compression, I will use the native tar.gz.
Click to expand...
Click to collapse
Thank you! Maybe the newer Linux users also like it.
Homero2 said:
On line 101 of your flash_en.sh it refers to tools/recovery_ics-20121230.img
That recovery is that?
Click to expand...
Click to collapse
Yes, this is the latest recovery from pengus77, I am using his ROM, so I think this one is better for me.
Homero2 said:
I'm hoping to TWRP, is a recovery which I like very much, I tried to adapt it to ICS based on modifications made by Stefan in the CWM, but I only got a tremendous brick ), is that something different from CWM works
If you think of any suggestions, they will be well received.
Click to expand...
Click to collapse
I tried it too, the result was useless, so I really understand you
Maybe sooner or later somebody has some time to make it for the ICS layout too.
Thank you again for your excellent work, it is really useful for me!
NEW V-1.0.2
- Menu flasher - Two new options, [5] Flash RECOVERs and [9] Flash KERNELs. - Alternative kernels copied them to kernel folder / and the recoverys to the recovery folder. - The program will detect the kernels and recoverys withi
Can't get it working.
Tried running it on a mac but it ends with an End of process after selecting a language:
Escoja una opción/Type an option: [1-2,X]2/Users/ruslanmirsalihov/Desktop/Toolkit_ICS-Root_Stock-v-1.0_by_Homero/root: line 18: tools/en.sh: No such file or directory
logout
On ubuntu it says it was unable to determine my phone.
Any help?
If the "unable to determine my phone" means that when you start the flashing process you get "Nvflash started" "USB device not found" in Ubuntu, I think the problem is that you using wrong cable, or you not plug the phone into the USB while both of the volume keys pressed. Please provide exact error message and the exact menu option you used in order to get your problem solved.
About the mac you need to start Terminal from Utilities and start the script from here.
Or, alternatively, I attached a fixed menu which is working with double-click, just download and replace it your menu file with the attached one (there is a new function which doing the same thing, cd'ing into the script directory, so I just made nearly nothing, but working in linux and mac, and should working in cygwin too.)
But note that, in mac you cannot use the flashing options because of AFAIK there is no nvflash for mac. But you can use the others, such as the rooting and the back up with ADB is working.
This function (fixpath). Should we put it in the script, or just on the menu?
New version 1.1.0, with support for multiple languages, the languages are included in a separate script file.
The program memorizes the selected language, and the language menu will not appear any more
New version, with new options and I think and hope that all errors are corrected.
THanks
At last playing with my android P990 without boot Windows thanks !!!
Does this work with the P880 (Optimus 4X) as well, or is it specific to the P990?
nevermind.......
Phew, search how to nvflash!!!
Sent from my LG-E610 using xda premium
SuperSkill said:
Phew, search how to nvflash!!!
Sent from my LG-E610 using xda premium
Click to expand...
Click to collapse
Newbie here trying to flash my o2x however I am not able to enter APX mode I guess. I've removed the battery and I hold down the volume up/down and plug into USB but nothing appears.. it just says no USB devices were found? Anyone else have this issue, not sure what I am missing here but pretty hard to do anything if device is not recognized. thanks.
archish said:
Newbie here trying to flash my o2x however I am not able to enter APX mode I guess. I've removed the battery and I hold down the volume up/down and plug into USB but nothing appears.. it just says no USB devices were found? Anyone else have this issue, not sure what I am missing here but pretty hard to do anything if device is not recognized. thanks.
Click to expand...
Click to collapse
Try the all in one tool kit by spyrosk
It has the menu for installing the drivers which you need
Install the apx drivers
Sent from my LG-P990 using xda premium
This guide is intend to help you with "installing" Ubuntu 14.04 (12.04 also works) on the Amazon Fire TV 2 after @rbox recovery has been setup. Only headless mode is possible, similar to Ubuntu Server, but it still makes a nice little ARMv8 development box. Starting X.org or running systemd based Linux distributions will likely never be possible due to features missing from the Amazon kernel. Creative use of the framebuffer is possible if desired, maybe eventually a terminal emulator could be started. As long as you don't mount and modify mmcblk0pX there should be no possible way to mess up Android or brick the device. It's 100% reversible by just removing the SD card. You accept all responsibility for what you do with this work should something go wrong and the device becomes inoperable. With disclaimers and precursor knowledge out of the way let's get started.
To follow this guide you will need:
A micro SD card (2 GB+ recommended)
A Linux system
To login into Ubuntu you will need either:
A 1.8 V TTY USB serial device connected to the UART
A pair of USB serial devices and a null modem cable
I actually used a pair of Xbee's for testing the ttyUSB0 stuff, so hence a pair of FTDI chips would also work.
Preparing the SD Card
To get started you need to first partition the micro SD card:
Type = MBR
Part 1 = 100 MB, Fat32 (vfat)
Part 2 = Remainder, Ext4
Extract the attached zip file to the root of the first partition (extracted filename must be "ramdisk-recovery.cpio.lzma"). This is an alternative initramfs that simply uses busybox to clean up from the partial Android boot and prepare the filesystem for regular Linux. Extract an Ubuntu core root filesystem archive, ubuntu-core-14.04.4-core-arm64.tar.gz, to the root of the second partition as the root user (to preserve ownership/permissions). Make sure you sync or eject the device when done with this work so the data gets flushed to the SD card.
Now we need to make a few changes to the root filesystem to avoid usability issues and allow logins.
Replace /etc/fstab with the following contents to correct some mount options. This "disables" SELinux which fixes dpkg errors and some other login annoyances.
Code:
/dev/mmcblk1p2 / ext4 defaults,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs ro,relatime 0 0
Replace /etc/init/console.conf with the following contents to allow logins from the UART. Once the root password has been set (root is disabled by default) you can remove "-a root" if desired.
Code:
# console - getty
#
# This service maintains a getty on console from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -s -a root console
Create /etc/init/ttyUSB0.conf with the following contents to allow logins from an attached USB serial device. This should help people who don't want to take apart their device to solder wires onto the UART test points. SSH would of course be an alternative but it's not installed by default in Ubuntu core and this guide is about the building blocks not providing pre-made images (yet). Since udev doesn't work due to devtmpfs not being enabled in the kernel you will need to attach the USB serial device before booting for this to work. As before you can remove "-a root" later if desired once the root password is set. Also you should change the baud rate if needed.
Code:
start on (tty-device-added ttyUSB0)
stop on (runlevel [!2345] or tty-device-removed ttyUSB0)
respawn
exec /sbin/getty -L -a root 115200 ttyUSB0 vt102
Preparing the Fire TV
Until the search order for the initramfs file is changed by @rbox you will need to rename the initramfs on the system partition so it will continue to search for one on the SD card or USB stick. You need to connect to the device using adb either over USB or the network to execute the following commands.
Code:
adb$ su
adb# mount -o remount,rw /system
adb# mv /system/recovery/ramdisk-recovery.cpio.lzma /system/recovery/ramdisk-recovery.cpio.lzma.bak
adb# mount -o remount,ro /system
Right now this prevents "su" from working, which should be fixed by @rbox in due time. To get "su" working again you should extract the original recovery initramfs file to a USB stick and boot the device with that USB stick inserted instead of the previously created SD card. Then to restore "su" you can repeat the above steps just swapping the order of the files in the "mv" command.
Booting Ubuntu
After connecting your serial device of choice simply insert the SD card and power on the device. It's that easy! With luck you should get a shell prompt that is already logged in as root. It's a good idea to set the root password before going much further. The device isn't too useful without networking, so you can install more packages. To solve that connect an ethernet cable (since it's simpler) and type "dhclient eth0" to get online. At this point you can install openssh-server using apt-get or do anything else you'd normally do on an Ubuntu VM or headless Ubuntu system. I'm interested in hearing what people plan to do with a more-or-less high-end ARM development system.
Tips and Tricks
NOTE: These changes, unless otherwise noted, are performed while logged into the target Ubuntu system.
Setting the Hostname
You can change the hostname using the following command:
Code:
echo sloane > /etc/hostname
You should also create a simple /etc/hosts file that matches the chosen hostname.
Code:
127.0.0.1 localhost
127.0.1.1 sloane
Enable Ethernet at Boot
Create the file /etc/network/interfaces.d/eth0 with the following contents:
Code:
auto eth0
iface eth0 inet dhcp
Allow Users Network Access
Since we are stuck running an Android kernel you need to create the following group and add users who need network access (such as ping) to this special group.
Code:
groupadd -g 3003 aid_inet
usermod -G aid_inet -a root
usermod -G aid_inet -a <username>
Removing Failed Services
There are a few services that fail to start due to hardware limitations. We should just prevent them from starting in the first place. We have no VT support enabled in the kernel (boo) so we can just remove the ttyX login prompt services. Also the console setup doesn't work since our console is a serial device not a virtual terminal or other "graphical" type terminal emulator.
Code:
rm /etc/init/tty?.conf
echo manual > /etc/init/console-font.override
echo manual > /etc/init/console-setup.override
Fix /dev Hotplug
As stated before udev doesn't work due to missing kernel features. The busybox applet mdev is a simple replacement for most users. After installing the "busybox-static" package run the following command:
Code:
ln -s /bin/busybox /sbin/mdev
Now add the following line to /etc/rc.local before "exit 0".
Code:
echo /sbin/mdev > /proc/sys/kernel/hotplug
Pre-installing SSH
See: http://forum.xda-developers.com/showpost.php?p=65595013&postcount=13 (thanks @segfault1978)
Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!
segfault1978 said:
Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!
Click to expand...
Click to collapse
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.
There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.
zeroepoch said:
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.
Click to expand...
Click to collapse
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
---------- Post added at 09:09 PM ---------- Previous post was at 09:03 PM ----------
zeroepoch said:
There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.
Click to expand...
Click to collapse
Thank you for the hint, I'll have a look for the availability of this board in germany.
I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?
segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Click to expand...
Click to collapse
That is pretty crazy, but since you knew the changes required it worked Not everyone I expected to have such experience. I figured someone might even try to do a qemu chroot or debbootstrap to preinstall openssh. Multiple ways to solve the same problem I guess.
segfault1978 said:
I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?
Click to expand...
Click to collapse
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.
zeroepoch said:
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.
Click to expand...
Click to collapse
Unfortunately, I'm not compiling with parallel processes (I'm compilig Icinga2 for arm64), I'm running
Code:
dpkg-buildpackage -us -uc
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?
segfault1978 said:
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?
Click to expand...
Click to collapse
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.
segfault1978 said:
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
Click to expand...
Click to collapse
I see you are not using -pipe which is good, but a quick search suggested something that might not be simple since this package has it's own build system but changing from -O2 to -O1 might help.
I noticed that Debian has the package available for the same version and already built for arm64.
https://packages.debian.org/sid/icinga2
Maybe you already tried that. You could try going back to jessie which is probably an older version but I think most jessie packages work with Ubuntu 14.04.
zeroepoch said:
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.
Click to expand...
Click to collapse
This is the list of packages I manually downloaded for ARM64 (unfortunately I used Debian packages which worked first, but leads to a hell situation afterwards when dealing with other dependencies; be sure to use Ubuntu packages in order to avoid problems afterwards):
Code:
busybox_1.22.0
libedit2_3.1
libgssapi-krb5
libk5crypto3
libkeyutils1
libkrb5
libkrb5support0
libwrap0
openssh-client
openssh-server
openssh-sftp-server
This is the piece of calls in /etc/rc.local, right before the exit:
Code:
dpkg --force-all -i /*.deb > /install.log 2>/install.err
echo $? >> /install.log
echo "installation finished" >> /install.log
It took about 1-2 minutes before SSH started to work automatically, you can mount the SD card afterwards in another system in order to check the written logfiles.
Here are some notes for getting wireless working. In addition to the normal OS steps (installing wpasupplicant or wireless-tools and editing /etc/network/interfaces or using wicd) you will need some firmware files from /system (/dev/mmcblk0p13).
Code:
mount -o ro /dev/mmcblk0p13 /mnt
cp -r /mnt/etc/firmware/ /lib/
cp -r /mnt/etc/Wireless /etc/
umount /mnt
segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Thank you for the the fire tv guide.
Click to expand...
Click to collapse
So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Sent from my Mi A1 using Tapatalk
mrchrister said:
So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Click to expand...
Click to collapse
If it has arm64 packages and headless you can give it a try. If you don't like it you can just revert the ramdisk and go back to Android.
Ok sweet, thanks for the reply
Sent from my Mi A1 using Tapatalk
Just curious if anyone's tried running Plex server on this?
I've been looking for a better solution without shelling out $500+ for a dedicated NAS. AFTV is tiny so I could hardwire it and hide it away.
Thanks
I got the same idea. Right now the firetv is still being used as a media streamer but I'm thinking of doing this soon
Hey!
I found this thread with fully compile-able code for android on most hardware platforms, I see it uses system level modifications to do its business, and would love to see it rolled into a magisk module. I regularly use external hard drives on my Pixel 2 XL for a plethora of reasons and really need legit exFat and NTFS support as I use flash kernel and I cant merge the code myself (my only machine couldn't handle the compiling). Anyway, If possible, making a ZIP that is universal and has the binaries for arm, arm64, and all x86 variants would be pretty great!
GitHub: https://github.com/Lurker00/Android-fs
XDA: https://forum.xda-developers.com/android/development/exfat-ntfs-fuse-drivers-easy-build-t3126413
I am not magisk-ninja so anyone who can help make this happen OR educate me in the process of doing so (and who can compile the above Git files for arm64 and send them to me) would be very much appreciated! I am willing to learn to help the community!
Over and out
thomasamas said:
Hey!
I found this thread with fully compile-able code for android on most hardware platforms, I see it uses system level modifications to do its business, and would love to see it rolled into a magisk module. I regularly use external hard drives on my Pixel 2 XL for a plethora of reasons and really need legit exFat and NTFS support as I use flash kernel and I cant merge the code myself (my only machine couldn't handle the compiling). Anyway, If possible, making a ZIP that is universal and has the binaries for arm, arm64, and all x86 variants would be pretty great!
GitHub: https://github.com/Lurker00/Android-fs
XDA: https://forum.xda-developers.com/android/development/exfat-ntfs-fuse-drivers-easy-build-t3126413
I am not magisk-ninja so anyone who can help make this happen OR educate me in the process of doing so (and who can compile the above Git files for arm64 and send them to me) would be very much appreciated! I am willing to learn to help the community!
Over and out
Click to expand...
Click to collapse
Hi. I just started working on this yesterday.
It seems like the perfect method to install additional filesystem support.
I am currently able to manually mount exfat or ntfs sdcard images on my phone (LG Aristo 2, Android 7).
However, a great deal has changed in how filesystem support is added to an existing kernel. Lurker00's code is for Android 4.4.2.
If you want to work together on it, I would be more than happy to do so. I will try to get together what I have so far in a post later today.
FYI, this is a TWRP installable .zip that has Lurker00's compiled binaries for arm64-v8a, armeabi-v7a, x86 and x86_64.
It also installs init.d scripts that supposedly support auto mounting of exFat and NTFS partitions. That part is not working for me, as I think it is setup for Android 5 and before. However the mount binaries work for manually mounting exFat or NTFS partitions.
Just install the .zip from TWRP.
https://forum.xda-developers.com/attachment.php?attachmentid=4600419&stc=1&d=1537390717
Hey! I just saw this, I can try my best but I was assuming it wouldn't be an android thing but rather a Linux/android kernel thing. Is there a way we can Abstract the mounting from android, solely into the kernel, basically leaving Android unaware that the introduced file system is not "officially supported"? I'm assuming FUSE can do this.
Edit: spelling.
tecknight said:
Hi. I just started working on this yesterday.
It seems like the perfect method to install additional filesystem support.
I am currently able to manually mount exfat or ntfs sdcard images on my phone (LG Aristo 2, Android 7).
However, a great deal has changed in how filesystem support is added to an existing kernel. Lurker00's code is for Android 4.4.2.
If you want to work together on it, I would be more than happy to do so. I will try to get together what I have so far in a post later today.
FYI, this is a TWRP installable .zip that has Lurker00's compiled binaries for arm64-v8a, armeabi-v7a, x86 and x86_64.
It also installs init.d scripts that supposedly support auto mounting of exFat and NTFS partitions. That part is not working for me, as I think it is setup for Android 5 and before. However the mount binaries work for manually mounting exFat or NTFS partitions.
Just install the .zip from TWRP.
https://forum.xda-developers.com/attachment.php?attachmentid=4600419&stc=1&d=1537390717
Click to expand...
Click to collapse
How exactly do you manually mount them? (your method)
Edit: also! I was thinking maybe this could become a kernel patch that I could alert kernel devs to? (see my above comment)
And... Thanks for all the hard work to get this going. Tell me how I can help!
thomasamas said:
How exactly do you manually mount them? (your method)
Edit: also! I was thinking maybe this could become a kernel patch that I could alert kernel devs to? (see my above comment)
And... Thanks for all the hard work to get this going. Tell me how I can help!
Click to expand...
Click to collapse
I installed the .zip file that I posted earlier using TWRP.
This installs these binaries to /system/xbin:
mount.exfat
mkfs.exfat
fsck.exfat
dumpexfat
exfatfsck
exfatlabel
mkexfatfs
mount.exfat-fuse
ntfs-3g
ntfsfix
probe
I then inserted an exFat formatted SDCard into my phone and Android told me the device was corrupt.
That is due to the fact that Android no longer uses probe to determine the filesystem of a device, it now uses a program called blkid.
I would like to figure out how to add a new supported filesystem type to blkid
In any event, I mounted my exFat sdcard by launching a shell from adb, running su to get root and then I created a folder named exfatsd in the /mnt folder. I then ran this command:
mount.exfat /dev/block/mmcblk1 /mnt/exfatsd
The mount succeeded and I was able to browse the sdcard from /mnt/exfatsd
When I typed mount to enumerate the mounts, this is the entry I saw for my sdcard:
/dev/block/mmcblk1 on /mnt/exfatsd type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
By the way, even as i was browsing the exfat sdcard, Android still had a notification up telling me that my sdcard was corrupt
Is there any legit documentation on blkid?
I haven't found any, but I haven't given up on this project either. I have been busy on a couple of other things lately, but I still would like to see this work.
Making progress on this on my LG cv1 ROMs
I just wanted to let you know that I now have exFAT and NTFS support working on my phone, even though the kernel does not have support for either filesystem..
I am mounting the Micro SD using a script that runs under Magisk from the:
post.fs.data.d folder
This folder contains scripts that are to run immediately after the /data filesystem is mounted.
My script is checking the Micro SD device using the blkid command.
The blkid command will indicate the type of filesystem residing on the device, even if the kernel won't mount it.
So I use the results from the blkid command to issue mount commands myself using the binaries created by lurker00.
Here is the script I am using, it is really quite short:
Code:
#!/system/bin/sh
#
# mount NTFS / exFAT
# 06/07/2019 by TecKnight
# This script checks the inserted Micro SD--
# If Micro SD is formatted exFAT or NTFS, it mounts it
sdcard_device=`blkid /dev/block/mmcblk1`
sdcard_part1=`blkid /dev/block/mmcblk1p1`
# Uncomment next 2 lines to troubleshoot
# echo $sdcard_device > /cache/sdcard_device.txt
# echo $sdcard_part1 > /cache/sdcard_part1.txt
# output from blkid command looks like this:
# /dev/block/mmcblk1p1: LABEL="e" UUID="CEDC-3F3A" TYPE="exfat"
# create mount point
mkdir /mnt/media_rw/extsd
# mount approriate filesystem if it resides on device directly
case "$sdcard_device" in
*exfat*) mount.exfat /dev/block/mmcblk1 /mnt/media_rw/extsd ;;
*ntfs*) ntfs-3g /dev/block/mmcblk1 /mnt/media_rw/extsd ;;
esac
# mount approriate filesystem if it resides on first partition of device
case "$sdcard_part1" in
*exfat*) mount.exfat /dev/block/mmcblk1p1 /mnt/media_rw/extsd ;;
*ntfs*) ntfs-3g /dev/block/mmcblk1p1 /mnt/media_rw/extsd ;;
esac
FYI: The reason I am checking /dev/block/mmcblk1 (the actual SD card itself) and dev/block/mmcblk1p1 (the first partition on the sdcard) is that depending on where the sdcard is formatted exFAT or NTFS, it could be on the disk itself or within a parrition. This way, I will catch it either way and mount it correctly.
I was thinking of creating a subroutine to cycle through the block devices to determine the sdcard device.
This would make it compatible with practically every device.
Then I could turn the whole thing into a Magisk module.
There are still 2 minor issues that I am having:
1. The phone still displays a notification about the sdcard being corrupt. You just have to clear the notification and it never reappears.
2. The mounted card is not identified as an external SD by android.
However, the exFAT or NTFS filesystem is mounted at /mnt/media_rw/extsd and is browseable and the filesystem is readable and writable.
Tell me what you think.
TWRP installable .zip to install NTFS/exFAT suport
OK, this is a installable .ZIP that will copy the binaries to /system/xbin and copy the mounting script to:
/data/adb/post-fs-data.d.
This should enable NTFS/exFAT support to most phones.
Requirements:
1. You must have Magisk installed
2. Your Micro SD''s device address must be:
/dev/block/mmcblk1. This is the case on most devices running Android 6 or higher.
If your Micro SD's device address is different, you can fix it by modifying:
/data/adb/post-fs-data.d/mount_ntfs_exfat.sh
replacing /dev/block/mmcblk1 with the device address of your external Micro SD.
Download the installer here:
https://forum.xda-developers.com/attachment.php?attachmentid=4773292&stc=1&d=1559992139
tecknight said:
OK, this is a installable .ZIP that will copy the binaries to /system/xbin and copy the mounting script to:
/data/adb/post-fs-data.d.
This should enable NTFS/exFAT support to most phones.
Requirements:
1. You must have Magisk installed
2. Your Micro SD''s device address must be:
/dev/block/mmcblk1. This is the case on most devices running Android 6 or higher.
If your Micro SD's device address is different, you can fix it by modifying:
/data/adb/post-fs-data.d/mount_ntfs_exfat.sh
replacing /dev/block/mmcblk1 with the device address of your external Micro SD.
Download the installer here:
https://forum.xda-developers.com/attachment.php?attachmentid=4773292&stc=1&d=1559992139
Click to expand...
Click to collapse
Hi,
I know this post isn't new, but I tried installing this zip file and it tells me that my bootloader in't unlocked even though I'm pretty sure it's unlocked,
any way around this?
rachelld said:
Hi,
I know this post isn't new, but I tried installing this zip file and it tells me that my bootloader in't unlocked even though I'm pretty sure it's unlocked,
any way around this?
Click to expand...
Click to collapse
Same here. Maybe the template is to old? Also could use this module.
aCIDsLAM said:
Same here. Maybe the template is to old? Also could use this module.
Click to expand...
Click to collapse
Try this one:
https://www.androidfilehost.com/?fid=4349826312261782012I removed the check for
ro.boot.bl_unlock_complete = true
---------- Post added at 11:08 PM ---------- Previous post was at 11:06 PM ----------
rachelld said:
Hi,
I know this post isn't new, but I tried installing this zip file and it tells me that my bootloader in't unlocked even though I'm pretty sure it's unlocked,
any way around this?
Click to expand...
Click to collapse
Try this one:
https://www.androidfilehost.com/?fid...26312261782012
I removed the check for
ro.boot.bl_unlock_complete = true
I could flash it, using TWRP. In Magisk itself, it told me me, its no magisk module. Anyway. Thanks!
@thomasamas
@tecknight
Is this thread dead ?
Has these drivers been tested on Android 11 ?
I have a custom ROM and would like to use my SDCard with NTFS/exFAT but the ROM only supports FAT32.
KineSight said:
@thomasamas
@tecknight
Is this thread dead ?
Has these drivers been tested on Android 11 ?
I have a custom ROM and would like to use my SDCard with NTFS/exFAT but the ROM only supports FAT32.
Click to expand...
Click to collapse
+1
tecknight said:
TWRP installable .zip to install NTFS/exFAT suport
OK, this is a installable .ZIP that will copy the binaries to /system/xbin and copy the mounting script to:
/data/adb/post-fs-data.d.
This should enable NTFS/exFAT support to most phones.
Requirements:
1. You must have Magisk installed
2. Your Micro SD''s device address must be:
/dev/block/mmcblk1. This is the case on most devices running Android 6 or higher.
If your Micro SD's device address is different, you can fix it by modifying:
/data/adb/post-fs-data.d/mount_ntfs_exfat.sh
replacing /dev/block/mmcblk1 with the device address of your external Micro SD.
Download the installer here:
https://forum.xda-developers.com/attachment.php?attachmentid=4773292&stc=1&d=1559992139
Click to expand...
Click to collapse
Actually, this still works! Have tested this on A11 OctaviOS GSI. You still need to have Magisk installed, but you don't necessarily have to install this as a Magisk module.
Don't flash the .zip file from TWRP, it doesn't do anything (at least not for me). Just unzip everything in the .zip file into a folder. Then, take the files inside the xbin folder and put it into /system/xbin (as per instructions). Make sure those files have execute permissions. I just set the xbin folder with full execute permissions and apply to all child files in the folder, by using Root Explorer.
Next, do the same thing by taking the script and chuck that into /data/adb/post-fs-data.d. Again, give this script full execute permissions.
Reboot phone and voila, it should work! You should also see that the script is loaded and running in Magisk logs.
Oh and the reason why Magisk is required is because Magisk creates that "post-fs-data.d" folder after it is installed. If you put scripts into /data/adb/service.d or /data/adb/post-fs-data.d, they will automatically get executed by Magisk and run with superuser rights.
chaoscreater said:
Actually, this still works! Have tested this on A11 OctaviOS GSI. You still need to have Magisk installed, but you don't necessarily have to install this as a Magisk module.
Don't flash the .zip file from TWRP, it doesn't do anything (at least not for me). Just unzip everything in the .zip file into a folder. Then, take the files inside the xbin folder and put it into /system/xbin (as per instructions). Make sure those files have execute permissions. I just set the xbin folder with full execute permissions and apply to all child files in the folder, by using Root Explorer.
Next, do the same thing by taking the script and chuck that into /data/adb/post-fs-data.d. Again, give this script full execute permissions.
Reboot phone and voila, it should work! You should also see that the script is loaded and running in Magisk logs.
Oh and the reason why Magisk is required is because Magisk creates that "post-fs-data.d" folder after it is installed. If you put scripts into /data/adb/service.d or /data/adb/post-fs-data.d, they will automatically get executed by Magisk and run with superuser rights.
Click to expand...
Click to collapse
Hello, I did everything as you said and it worked normally, but now SELinux is turned off. This is normal?
i have same issue. But i cant find xbin folder
my device is Samsung M51 on custom os
I converted this twrp zip into a magisk module https://github.com/phhusson/treble_experimentations/files/8948418/ntfs-exfat-support.zip
Hi.
I'm using Ancient OS A13 and I can't access my SD Card.It asks for format and after formatting it still asks for format.
it still works on my pc and twrp recovery. Unfortunately, this fix isn't working. Also, there is not any xbin folder in system.
What should I Do?