[Magisk][Module] Amazon FireTV4k NTFS/F2FS/EXT4/exFAT OTG support - Fire TV Android Development

Warning !!! Use this module on your own risk !!! I can't be held responsible for any kind of damage or data loss !!!
Version 1.3 and higher requires my custom kernel 6.2.7.1_v3 or higher + Selinux magisk module from the kernel thread
Magisk 20.3 recommended
This module will add NTFS/F2FS/EXT4/exFAT read/write support to USB OTG.This means that the usb storage (usb stricks,external hard-drives,etc) will be mounted automatically
if one of the supported filesystem is detected.
**Note: F2FS support require a custom kernel,with F2FS support enabled** --> custom kernel thread
The module will also set external write permission for Kodi (this was required because Kodi doesn't support such permission or the request for it)
It also enables sys_fs read permission for Kodi, so it can read the CPU temperature without root permission.
Note 2: This was tested with Magisk v20,so i highly recommend you to use that version or higher !
Note 3: Some EXT4 drives may fail to mount,most likely this is because e2fsck it's failing to check for errors. In the next version i will try to add a newer version of e2fsck.However, formatting to EXT4 directly on the device will fix the issue.
Installation :
Install the module with Magisk Manager or TWRP
Reboot and insert the usb drive
Changelog
v1.0 - Initial release
v1.1 - Possible fix for the mount/unmount loop
v1.2 - Added custom kernel detection (with exFAT support) and updated some of the exFAT binaries
v1.3 - This version requires my custom kernel 6.2.7.1_v3 or higher + Selinux magisk module from the kernel thread
v1.4 - Major rework of the module ,now it workes with all Magisk 20.3 + version (tested up to 21.0 and canary builds)
v1.4.1 - Fixed binaries execute permission
VOLD sources - > Github

Thanks, much appreciated & I will try this soon. Maybe flashing with TWRP is a better idea as flashing modules through Magisk is known to cause problems.

So after following the steps in the topic to unlock and root, install Magisk first an then you package?
I tried to install you package with TWRP but it failed with an error.
---------- Post added at 01:22 AM ---------- Previous post was at 12:51 AM ----------
It installed after adding Magisk but when playing video from the harddrive it has an unexpected error and the drive seems to unmount and then remount.

Installed fine in magisk, just not supposed to update magisk itself in magisk, that you do in twrp. Magisk models themselves should be ok

DarkH2O said:
So after following the steps in the topic to unlock and root, install Magisk first an then you package?
I tried to install you package with TWRP but it failed with an error.
---------- Post added at 01:22 AM ---------- Previous post was at 12:51 AM ----------
It installed after adding Magisk but when playing video from the harddrive it has an unexpected error and the drive seems to unmount and then remount.
Click to expand...
Click to collapse
What kind of hard-drive you are using, it has external power? And what filesystem?

Pretoriano80 said:
What kind of hard-drive you are using, it has external power? And what filesystem?
Click to expand...
Click to collapse
NTFS, Its a WD Easystore and it does not have external power.

DarkH2O said:
NTFS, Its a WD Easystore and it does not have external power.
Click to expand...
Click to collapse
Probably that's the issue, i don't think the power supplied thru the FireTV charger is enough.
I only tested on a hard-drive with external power.

Pretoriano80 said:
Probably that's the issue, i don't think the power supplied thru the FireTV charger is enough.
I only tested on a hard-drive with external power.
Click to expand...
Click to collapse
Do you think a powered usb hub could help with that?

DarkH2O said:
Do you think a powered usb hub could help with that?
Click to expand...
Click to collapse
It might, but never tested personally. I'm planning to buy such a hub too.

Will there be a way to transfer/move or install apks to the external storage?

Not sure if it is working and mounting 100%. Might need some work, was able to link apps to usb but seems like some errors can cause the usb to amount at times. Good start for sure, hopefully you can get this working 100% when moving apps to the usb.

Leonidas87 said:
Not sure if it is working and mounting 100%. Might need some work, was able to link apps to usb but seems like some errors can cause the usb to amount at times. Good start for sure, hopefully you can get this working 100% when moving apps to the usb.
Click to expand...
Click to collapse
What do you mean with "link apps to usb"? That won't work and it's not recommended to use an OTG device as adoptable storage storage.
What kind of device you are using as OTG storage and the filesystem?!
Amazon modified the Android framework heavily, so adoptable storage it's a no go for now, to much hassle to spend time on that,a custom rom would a better solution.
However, without logs, it's hard to understand the reason why the drive disconnects/unmounts, it could be a power failure, corrupted fs or simply the unstable exfat/ntfs driver.

I managed to reproduce the unmounting/mounting issue with an EXT4 USB stick.
The are I/O Buffer issues, so i will have to investigate if this issue is caused by vold or something else.
Edit: OP udated with a new version,please test it and report back!

I'm not using it as adoptable storage, just able to move apk data to the usb drive and still load the apk. Seems like the usb drive would keep connecting and reconnecting.
Seems like you are aware of the connect/disconnect loop. If I'm not mistaken I am running exfat most likely.

Look your recent update is working better. Keep up the great work, all apk data is on the usb drive right now and loaded correctly on your latest

Once in a wile it messes up a bit, seems like heavy use can cause the usb to unmount

Leonidas87 said:
I'm not using it as adoptable storage, just able to move apk data to the usb drive and still load the apk. Seems like the usb drive would keep connecting and reconnecting.
Seems like you are aware of the connect/disconnect loop. If I'm not mistaken I am running exfat most likely.
Click to expand...
Click to collapse
That's why i pushed the new version, to fix that particular issue.
Leonidas87 said:
Once in a wile it messes up a bit, seems like heavy use can cause the usb to unmount
Click to expand...
Click to collapse
I've tested the new version with an USB Stick (ext4) and 2 external hard-drives (with external power supply) which have multiple EXT4 and NTFS partitions.I've tested them roughly, let them play two full movies and none of them failed (even if there was simultaneous read-write on them).
exFAT it's unstable and it was unstable with my initial testing too, probably less when i'm using my custom kernel with exfat (non-fuse) support.
There's a reason why it's still "staging" in linux kernel, i guess.

DarkH2O said:
NTFS, Its a WD Easystore and it does not have external power.
Click to expand...
Click to collapse
Have you tried the new version? If you do, please let me know if that hard disk works now!

Tried on tank : It stuck on FireTV logo how to remove (or zip to remove) ?

enestu said:
Tried on tank : It stuck on FireTV logo how to remove (or zip to remove) ?
Click to expand...
Click to collapse
It's for AFTV 4k (mantis) only, not for tank!
Reboot to TWRP and from Advanced -Terminal use this command :
rm - r /data/adb/modules/aftvotg
Then reboot to FireOS.

Related

[Recovery] TWRP Official Builds

Team Win Recovery Project 2.6, or twrp2 for short, is a custom recovery built with ease of use and customization in mind. TeamWin started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added a lot of additional features. It’s a fully touch driven user interface – no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
HTC Droid Incredible 4G LTE product page on TeamW.in
Older versions can be found here if needed.
Download
Download TWRP 2.6.3.0 Official (Change Log)
MD5: 22c58a87402b4049f8bafa1b07b1a765
Download TWRP 2.6.3.0a Unofficial
MD5: fd9f7b520bec55c980d0ea39616aa271
Includes these commits on top of 2.6.3.0: Never generate empty backup name, Remove unneeded images, check for space after = too, Improvements to Update_Log_File, Fix checking for file_contexts in updater
GooManager Installation:
Automated installation through GooManager will only work if you have the su binary (root access) on your ROM. If you have just performed unlock or S-OFF, you must use the manual installation method for the first recovery installation.
Install the GooManager application from Google Play
Open GooManager, pull up the menu, and select Install OpenRecoveryScript
Confirm the first prompt, then verify the filename in the second prompt (openrecovery-twrp-2.6.3.0-fireball.img) and confirm again
After the recovery has been installed, pull up the menu and choose Reboot Recovery
Manual Installation:
Requirements: you must have fastboot set up: Windows Guide, Mac Guide, Ubuntu Guide
1) Reboot your phone to the bootloader:
Method 1: Disable fast boot under Settings > Power > Fast boot. Shut down the phone. Hold Volume-Down and Power simultaneously until the phone vibrates. Continue holding volume down, but release the power button. When you reach the bootloader, choose the FASTBOOT menu option using the volume keys to move up/down and the power key to select.
Method 2: If you have adb installed, then with your phone fully booted up, type: adb reboot-bootloader
2) Flash the recovery image using fastboot. Open a terminal and navigate to the directory with the downloaded image. Type:
Code:
fastboot flash recovery openrecovery-twrp-2.6.3.0-fireball.img
When the image has finished flashing (usually less than 10 seconds), issue the command
Code:
fastboot reboot-bootloader
3) Use the volume keys to navigate to BOOTLOADER and then select it with the power key. After the phone finishes scanning for PJ____.zip images, choose RECOVERY from the menu. This will start TWRP recovery.
Themes:
TWRP supports themes! Create a folder called theme within the TWRP folder on your internal storage and copy ui.zip into it. You can either search for themes compatible with the 540x960 resolution (check out the EVO 3D forum for instance) or build your own. Known themes listed below:
Holo TWRP Theme by prairiedogn
HTC TWRP Theme by prairiedogn
Blue Dalek Theme by agentc13
Sports Recovery Themes by lnando84
Gray Theme by lnando84
Themes written for earlier versions of TWRP may not have themed elements for new features. Be sure to compare the user interface before and after applying a theme to make sure everything shows up. You can check the log for errors as well (the middle button on the bottom of the TWRP interface), it will say something like: "unable to load button image" if resources are missing.
Additional Information:
The boot image comes from RUU 2.17.605.2
This build includes HTC Dumlock in case it is needed. S-OFF users can safely ignore it. HTCDev Unlock users (who are still S-ON) can try it out if experiencing trouble writing to the /boot partition. It can be found under Advanced in the recovery.
Credits:
Dees_Troy for adding the Inc 4G to TeamWin's officially supported devices for TWRP
con247 for putting in the original effort to build TWRP on the Inc 4G
utkanos and KemoNine for building assistance
TeamWin for TWRP and their great building guide
CyanogenMod for way too many reasons
Release History:
Official 2.6 - In addition to TWRP's official changes, this version also introduces support for AOSP data encryption. Additionally, Aroma installers should not fail anymore.
Official 2.4 - Builds are now maintained by TeamWin: Change Log
Official 2.3.3.0 - Identical to Build 1.2
Build 1.2 - Mount internal and external SD to computer via USB
Beta 1.1 - HTC Dumlock included
Beta 1.0 - Initial Release
Known issues / Workarounds / To Do
The charging status LED currently does not turn on when the phone is charging. This is really a non-issue since there is a charge level and charging indicator within the recovery.
If the phone is powered off while plugged into USB, it will temporarily reboot into recovery then shut down 20-30sec later.
Source
The device tree is at github.com/cyanogenmod/android_device_htc_fireball.
great, glad to see this coming
Do you think this could get goo manager support? Thanks for all that you do.
Sent from my DROID RAZR using Tapatalk 2
Awesome! Thanks updating now
jamminjon82 said:
Do you think this could get goo manager support? Thanks for all that you do.
Click to expand...
Click to collapse
I need successful user reports for all the features. Once I get confirmation that everything works as expected, I'll submit my device tree to TWRP and ask for official builds. Goo manager support would follow from there.
I updated the build to version 1.1. For those who are S-OFF, there's no difference from 1.0. For those who are S-ON and using HTCDev Unlock (from team fireballas), there's now HTC Dumlock included. I'm still not sure if it is even needed...
im running a backup now. i'll try wiping and restoring too
---------- Post added at 02:18 PM ---------- Previous post was at 01:37 PM ----------
Backup, wipe, and restore all work as well as backup compression and backup rename. Under wipe I didn't know about internal and android secure are those required for a full wipe?
Linch89 said:
im running a backup now. i'll try wiping and restoring too
---------- Post added at 02:18 PM ---------- Previous post was at 01:37 PM ----------
Backup, wipe, and restore all work as well as backup compression and backup rename. Under wipe I didn't know about internal and android secure are those required for a full wipe?
Click to expand...
Click to collapse
Relevant posts about androidsecure:
http://forum.xda-developers.com/showthread.php?t=1934739
http://forum.xda-developers.com/showpost.php?p=27172605&postcount=218
Internal wipe clears out your internal sdcard's media partition (pictures, music)... probably don't want to do that.
Good look glad I didn't. Well as far as I can tell this is recovery is a win pun intended
im trying to mount my phone to my computer while in recovery and its not working v2.3.3.0 idk if its my computers usb its certainly not my phones micro usb the thing is brand new
The ability to mount the phone's sdcards on the computer while in TWRP was unknown to me. I'm working on the issue. The attached recovery is a first stab at a fix, let me know if it works (my faith is low though since the devices didn't mount in ubuntu for me).
MD5: 6fa24210afa860c38fef3f2a7d4360d1
Edit: the attached recovery did not fix the issue. I'll try to look into this sometime this week (research presentations and job interviews over the next few weeks so time is very scarce right now).
Linch89 said:
im trying to mount my phone to my computer while in recovery and its not working v2.3.3.0 idk if its my computers usb its certainly not my phones micro usb the thing is brand new
Click to expand...
Click to collapse
Mine isn't mounting either, internal nor external card, but I can get it to work through ADB, (work around for the time being)
Interesting side note though, (and this may be expected by some, it was new to me) while in TWRP recovery and running shell though ADB it was listing my actual external SD card as "sdcard" and actual internal SD as "internal_sdcard". I have used CWM on another device and I don't remember it changing the file structure while in recovery. Also I had shell root upon issuing the adb shell command. This is my first device using TWRP, it was just different.
Edit: Never Mind, I am running TWRP v2.2.0, this may not have any validity with the OP's version, sorry.
Edit my Edit: OK I just flashed v2.3.3.0 and same goes, I can get in through ADB and I have shell root once in shell. However, the file system looks like it should with "sdcard" and internal and "external-sd" as external. All else seems normal.
DavDoc said:
Mine isn't mounting either, internal nor external card, but I can get it to work through ADB, (work around for the time being)
Click to expand...
Click to collapse
I worked on the sd card mounting issue last night, but still have not figured it out. I will try to get some assistance from the TWRP folks if I find time tonight. Just to make sure, the feature worked when you used TWRP 2.2 by con247?
In fact, I may be misinterpreting how the feature works. Is the computer supposed to auto-mount your SD card when plugged in via USB, or do you have to activate the feature from within TWRP somewhere?
DavDoc said:
Interesting side note though, (and this may be expected by some, it was new to me) while in TWRP recovery and running shell though ADB it was listing my actual external SD card as "sdcard" and actual internal SD as "internal_sdcard". I have used CWM on another device and I don't remember it changing the file structure while in recovery. Also I had shell root upon issuing the adb shell command. This is my first device using TWRP, it was just different.
Click to expand...
Click to collapse
I just tested and this is what I see:
Code:
drwxrwxrwx 11 root root 16384 Jan 1 1970 external_sd
drwxrwxrwx 11 root root 32768 Jan 1 1970 sdcard
EDIT: Both in TWRP and in 'adb shell' the locations are correct.
It doesn't auto mount upon connecting usb, I didn't try mounting it though, through TWRP settings. From what I can tell, both versions work the same, they just have different names for the file structure, and only for the external and internal sdcards - didn't really investigate any other files.
Edit: To answer your first question, no it didn't work in either version. Don't know who's v2.2.0 it is, but it is the recovery that was added into the supercid.auto script.
mdmower said:
I worked on the sd card mounting issue last night, but still have not figured it out. I will try to get some assistance from the TWRP folks if I find time tonight. Just to make sure, the feature worked when you used TWRP 2.2 by con247?
In fact, I may be misinterpreting how the feature works. Is the computer supposed to auto-mount your SD card when plugged in via USB, or do you have to activate the feature from within TWRP somewhere?
I just tested and this is what I see:
Code:
drwxrwxrwx 11 root root 16384 Jan 1 1970 external_sd
drwxrwxrwx 11 root root 32768 Jan 1 1970 sdcard
EDIT: Both in TWRP and in 'adb shell' the locations are correct.
Click to expand...
Click to collapse
i think they mean usb mounting is gone it is suposed to be under mount option
jose51197 said:
i think they mean usb mounting is gone it is suposed to be under mount option
Click to expand...
Click to collapse
Right, so if I just understood this a couple of days ago I could have had a fix pretty quick. I naively thought the phone was supposed to auto-mount to the computer, which would make no sense because the drives would then be inaccessible to TWRP's routines. Anyways, build 1.2 enables the feature and both internal and external SD cards can be accessed.
mdmower said:
Right, so if I just understood this a couple of days ago I could have had a fix pretty quick. I naively thought the phone was supposed to auto-mount to the computer, which would make no sense because the drives would then be inaccessible to TWRP's routines. Anyways, build 1.2 enables the feature and both internal and external SD cards can be accessed.
Click to expand...
Click to collapse
Its back thanks I wish I can thank you twice and don't want to complain but only thing missing is the backup android.secure option under backup
Sent from my ADR6410LVW using xda app-developers app
jose51197 said:
Its back thanks I wish I can thank you twice and don't want to complain but only thing missing is the backup android.secure option under backup
Sent from my ADR6410LVW using xda app-developers app
Click to expand...
Click to collapse
Does your .android_secure folder actually have anything in it? Mine is empty on Viper 2.1.1. I just moved an app to SD and the folder is still empty. The reason I ask is because the and-sec folder is correctly mounted and linked to /sdcard/.android_secure when in TWRP.
I've never seen anything in android secure ever on any phone
Linch89 said:
I've never seen anything in android secure ever on any phone
Click to expand...
Click to collapse
On my OG DInc running AOSP that folder would indeed store sdcard apps... strange its different now....
I moved all apps my apps to sd card and I checked android_secure under sdcard and sdcard2 in root explorer and nothings in there. I can't delete the folder though so it must be of some importance

[USB OTG] [11DEC13] [PATCH] Externally Powered USB OTG

Externally Powered USB OTG - Nexus 4
This is an all-in-one patch to enable externally powered OTG (technically usb host mode) support. It's built off either the stock kernel or Franco's kernel sources, and should work with any ROM (that these kernels otherwise support). Refer to the second post for details on modifications and additions.
Again, power MUST be supplied externally, as there is no way for the phone to provide it.
Requirements:
Power MUST be supplied to both the USB device and phone. The easiest way would be by using an OTG Y-cable:
If using a traditional OTG cable, a USB Y-cable can be used:
Some powered USB hubs also send power up to the host and can be used directly with a regular OTG cable.
I am not endorsing any specific product or seller. Links are provided solely as examples, and are by no means definitive. As long as the phone and device both get 5V (charger, computer, etc.), and the data pins are connected, host mode will work (provided enough current can be supplied).
Installation:
Simply install the zip in recovery. Script will automatically install/patch necessary files. Must reinstall any time ROM is updated.
To uninstall, simply reflash your ROM. Data wipe is not necessary. If for some reason that's not an option, use the flashable unmod script to remove ROM-side modifications. Flash your kernel of choice afterwards (must flash "reset" kernel first if flashing an "anykernel").
Recovery:
(Optional)
For support in recovery, I've created a sort of "any-any" script. It replaces the recovery's kernel with the boot one. Therefore, by flashing this after the main patch, OTG will effectively be enabled in recovery (after a reboot). However, it is on the actual recovery itself to provide support for usb drives-- TWRP does. Otherwise, you'll have to manually mount any drives via linux console commands.
For your own safety/sanity, ensure the main patch works before flashing this. If recovery fails to boot after flashing, it can easily be replaced by using GooManager or similar. Worst case scenario, a new recovery can always be flashed via fastboot.
Downloads:
(Changelog at end of second post)
MAKE SURE TO DOWNLOAD THE RIGHT VERSION FOR YOUR ROM.
I don't keep track of all the different ROMs so it's on you guys to figure out which one is appropriate. The -CM builds have the two "CAF" commits that are now required for CM and its derivatives (unless they have specifically reverted the associated commits).
Franco-CM builds make use of a ramdisk mod script, which may have unpredictable results. Be ready in case it doesn't boot.
Current:
4.4.x: 2013.12.11 1604ET: [fk r199] [fk r199-CM]
4.4.x: 2013.12.06 1445ET: [aosp r7]
4.4: 2013.12.03 1522ET: [fk r197] [fk r197-CM]
4.4: 2013.12.01 1855ET: [aosp r6]
recoverymod.zip
Old:
4.3: 2013.10.27 1518ET Franco r193: [JWR] [JSS/JLS] [JWR-CM] [JSS/JLS-CM]
4.3: 2013.10.17 1957ET STOCK: [JWR] Stock kernel with OTG -- Only for stock rom
4.2: 2013.07.29 1101ET Franco r165: [JDQ]
ziddey-otg-unmod-20131002.zip
Bugs / Notes:
An OTG cable has the ID pin grounded out, which is used to trigger usb host mode. However, ID pin detection is broken in the Nexus 4 (although working for Slimport detection). Instead, we rely on detection of a "proprietary" charger (voltage on the data pins) in order to determine when to enable host mode.
Self-powered devices (e.g. digital cameras) don't send power to the phone. This will cause the device to not be detectable. Therefore, external power is still required.
Slimport cannot work concurrently with usb data due to hardware limitations (Slimport takes over the usb data pins).
USB drive will automatically mount at /storage/usbdisk0 (also accessible at /usbdisk and /mnt/usbdisk). Media scanning should occur automatically. Make sure to unmount before removal to avoid data loss.
Stock Android only supports FAT for storage. NTFS/exFAT/ext4 partitions may require the use of a third party app like StickMount (CM now supports these partitions natively!).
There appears to be a minor bug in the AOSP code that prevents available space from being reported in Settings->Storage->USB Storage. The screenshot is of CM10.1, which has this fixed
Current builds do not allow for host mode without charging. Use this as a workaround:
RussianBear said:
For those that want to stop usb charging, create a script modifying this to either 1 (disabled) or 0 (enabled). Works for me Not responsible for your phone(s) exploding.
echo 1 > /sys/module/pm8921_charger/parameters/disabled
echo 0 > /sys/module/pm8921_charger/parameters/disabled
Click to expand...
Click to collapse
Standard Disclaimer-- Flashing this patch is at your own risk, and carries no warranty or liability on my part. The assumption is that you will perform due diligence before flashing and make any necessary backups if required.
Screenshots:
Credits:
CaptainMuon, for proving that host mode is possible on the Nexus 4.
Franco, for his kernel, which this patch is based off.
garyd9, for his command to patch platform.xml.
Chainfire, for his usb host wisdom, and article on secondary storage write permissions.
arpruss, for his compiled zip-for-android
All you guys for testing!
Patch Overview:
Kernel with modified msm_otg.c -- This will REPLACE whatever kernel you currently have installed. If you flash a different kernel on top, you will obviously lose OTG capability. This contains the necessary workaround to enable usb host mode ("OTG").
Modified init.mako.rc/init.mako.usbdisk.rc -- Required for creating usb drive directories.
Precompiled modified storage_list.xml -- Allows unmounting usb drive in Settings->Storage. Hex offsets for storageDescription patched during flash.
Addition to build.prop -- Enables downloading apps from play store that require usb host mode support.
Addition to platform.xml -- Workaround to allow apps write access to usb drives
Addition to handheld_core_hardware.xml -- Activate android.hardware.usb.host.xml
android.hardware.usb.host.xml -- Enables Android API support for usb host mode.
fstab.mako (4.3) / vold.fstab (4.2) -- Required for automounting usb drive
Modules cifs.ko, ff-memless.ko, hid-dr.ko, hid-logitech.ko, and xpad.ko (/system/lib/modules). Manually insmod as needed or create an appropriate init.d script to load on boot. These are only required for certain gamepads. Refer here for more information.
Patch Details:
There seems to be an issue with detecting the state of the ID pin on the OTG cable, so we need to come up with an alternate way of determining when to switch to host mode. drivers/usb/otg/msm_otg.c (kernel) is responsible for detecting the charger type and setting host mode, among other tasks. I noticed that when connected to a powered OTG cable, the charge type becomes USB_PROPRIETARY_CHARGER (vs USB_DCP_CHARGER when connected to the wall, and USB_SDP_CHARGER to a computer). This will be the condition that we use to trigger host mode.
Standard OTG cables will have the ID pin shorted to ground. There are also usb accessory charger adapters (ACA) that provide different resistances between these pins to signal functionality (see http://en.wikipedia.org/wiki/USB_On-The-Go#OTG_Micro_Plugs). Support for accessory charger detection isn't enabled in the kernel originally, and doesn't seem to work properly anyway. However, one of the modes is essentially what we're trying to achieve (ID_A): "A charger and a B-device are attached. The OTG device is allowed to charge and enter host mode." So I've added code when USB_PROPRIETARY_CHARGER is detected to simulate the case of ID_A being detected. Following through the code for host mode, certain events are handled differently when ACA support is enabled (specifically, suspension of host mode). In these instances, we need to simulate ACA support since ID_A is technically dependent on it (run into issues with the usb controller getting stuck in a suspended state otherwise). Now we have host mode with charging working properly.
Finally, we need a method of detecting when the OTG cable is unplugged so the device can switch out of host mode. Fortunately, since power (vbus) detection does work, we can use that. Normally, changes in vbus state are ignored while in host mode, so we need to address that. From there, we simulate ACA detection for the case of no ID_A, which is just clearing the ID_A bit and charger. Afterwards, it'll automatically reset the usb state, ready to start all over again.
The dirty hacks to msm_otg.c are complete, and externally-powered OTG is functional.
Refer here for actual changes: https://github.com/ziddey/mako/commits/nightlies-4.3-JSS
No changes are needed to the kernel's .config. Do not enable Drivers->USB->OTG support (we get our support through "OTG support for Qualcomm on-chip USB controller" which is already enabled) or Support for ACA (does not work and most users don't have the proper adapter anyway).
Now we run into a problem with usb storage. Since there is no /system/etc/vold.fstab, usb drives get automatically mounted to /mnt/shell/emulated/0 (at least in CM10.1), which overloads the emulated sdcard, and causes major problems. So we create /system/etc/vold.fstab:
Code:
dev_mount usbdisk /storage/usbdisk0 auto /devices/platform/msm_hsusb_host/usb2
Update:
In 4.3, Google did away with vold.fstab, instead unifying mounting with fstab.mako (on the ramdisk). The replacement line would be:
Code:
/devices/platform/msm_hsusb_host/usb2 /storage/usbdisk0 auto defaults voldmanaged=usbdisk0:auto
Click to expand...
Click to collapse
Update:
In 4.4, mountpoint is set to auto instead of /storage/usbdisk0, and will be taken care of by vold / fuse daemon.
Click to expand...
Click to collapse
But /storage/usbdisk0 does not exist, so it will fail to mount. We will be using /init.mako.rc to create this directory and symlink associated legacy ones. This file resides in a ramdisk (which combines with the kernel to form boot.img), so we need to modify that instead of /init.mako.rc on the device itself (since it wouldn't be able to persist through a reboot). As well, we define the environmental variable SECONDARY_STORAGE. Below the analogous /storage/sdcard0 lines, add:
Code:
export SECONDARY_STORAGE /storage/usbdisk0
mkdir /storage/usbdisk0 0666 system system
symlink /storage/usbdisk0 /usbdisk
symlink /storage/usbdisk0 /mnt/usbdisk
Update:
In 4.4, usb disks must be further FUSE mounted. Rather than insert the script into init.mako.rc, it will now reside in init.mako.usbdisk.rc and be imported to init.mako.rc (strictly for ease/neatness and not standard convention):
Code:
# USB Storage -ziddey
on init
mkdir /mnt/media_rw/usbdisk0 0700 media_rw media_rw
mkdir /storage/usbdisk0 0700 root root
export SECONDARY_STORAGE /storage/usbdisk0
# Support legacy paths
symlink /storage/usbdisk0 /usbdisk
symlink /storage/usbdisk0 /mnt/usbdisk
service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbdisk0 /storage/usbdisk0
class late_start
disabled
Click to expand...
Click to collapse
In order to enable Settings->Storage->USB Storage, res/xml/storage_list.xml in /system/framework/framework-res.apk needs to be modified. We should be able to simply inject an encoded version of our modified storage_list.xml. I'm not sure if it's possible to simply encode a single file, so I decompiled framework-res.apk in order to make the following addition to res/xml/storage_list.xml (inside StorageList):
Code:
<storage android:mountPoint="/storage/usbdisk0"
android:storageDescription="@string/storage_usb"
android:primary="false"
android:removable="true" />
After recompiling, we should now be able to extract our newly encoded storage_list.xml for use with any ROM's framework-res.apk.
To allow downloading apps from the market that require usb host support, we need to add the following to /system/build.prop:
Code:
ro.usb.host=1
To enable android api support for usb host, we need to create /system/etc/permissions/android.hardware.usb.host.xml with the following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<permissions>
<feature name="android.hardware.usb.host" />
</permissions>
Now to "activate" this file, we add to /system/etc/permissions/handheld_core_hardware.xml:
Code:
<feature name="android.hardware.usb.host" />
Google assigned a different permission group for secondary storage devices (e.g. usb drives), media_rw, for which user apps cannot have write access (Chainfire has a good article on the issue here). We need to modify /system/etc/permissions/platform.xml to allow write access. Add the line in red ("officially" used by Samsung):
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
[color=red]<group gid="media_rw" />[/color]
<group gid="sdcard_rw" />
</permission>
That's it! Externally powered usb host mode should be fully functional.
For full disclosure, these are the changes to the kernel config vs stock (really just NTFS and modules):
Code:
echo "CONFIG_INPUT_JOYSTICK=y" >> .config
echo "CONFIG_JOYSTICK_XPAD=m" >> .config
echo "CONFIG_JOYSTICK_XPAD_FF=y" >> .config
echo "CONFIG_JOYSTICK_XPAD_LEDS=y" >> .config
echo "CONFIG_INPUT_FF_MEMLESS=m" >> .config
echo "CONFIG_HID_LOGITECH=m" >> .config
echo "CONFIG_LOGITECH_FF=y" >> .config
echo "CONFIG_LOGIRUMBLEPAD2_FF=y" >> .config
echo "CONFIG_LOGIG940_FF=y" >> .config
echo "CONFIG_LOGIWHEELS_FF=y" >> .config
echo "CONFIG_HID_DRAGONRISE=m" >> .config
echo "CONFIG_DRAGONRISE_FF=y" >> .config
echo "CONFIG_CIFS=m" >> .config
echo "CONFIG_NTFS_FS=y" >> .config
# echo "CONFIG_USB_DEBUG=y" >> .config
sed 's/\(CONFIG_USB_STORAGE_DEBUG\)=y/# \1 is not set/' -i .config
Changelog:
4.4: 2013.12.01 0349ET: [fk r196] [fk r196-CM] [aosp r5] aosp includes gamepad kernel modules.
4.4: 2013.11.29 0219ET: [fk r195] [fk r195-CM] CM build attempts to patch Franco ramdisk mods on the fly, so be prepared if things go south.
4.4: 2013.11.21 1922ET: [fk r194] [aosp r2] Update to 4.4 configuration for mounting usbdisk.
4.3: 2013.10.22 2201ET r191: [JWR] [JSS/JLS] Allow potentially faster charging in host mode, re-add manual host mode
4.3: 2013.10.22 2204ET r191-CM: [JWR] [JSS/JLS] ^ + 2 "CAF" commits for CM compatibility
4.3: 2013.10.09 2148ET r190: [JWR] [JSS/JLS] Re-enable USB debug messages
4.3: 2013.10.01 1954ET r188: [JWR] [JSS/JLS] Zipalign framework-res.apk
ziddey-otg-r183-09141713.zip ziddey-otg-r183-JSS-09141713.zip Add SECONDARY_STORAGE env., do ramdisk patching during flash, include CIFS module -- rebase to r183.
ziddey-otg-r182-09041823.zip ziddey-otg-r182-JSS-09041823.zip Remove module unloading support, patch handheld_core_hardware.xml -- rebase to Franco r182.
ziddey-otg-r178-08240234.zip ziddey-otg-r178-JSS-08240238.zipDisable modversions, enable kernel wakelock stats-- rebase to Franco r178.
JSS15J 4.3.0 2013.08.13 1533ET: ziddey-otg-r174-08131533.zip First release for JSS15J. Updated to 4.3's new unified fstab (native mounting support). Using an "anyramdisk" method for compatibility with different ROMs (specifically, different su implementations). Based off Franco r174.
2013.07.29 1101ET: ziddey-otg-r165-07291101.zip Maintenance build-- rebase to Franco r165.
2013.07.14 2015ET: ziddey-otg-r163-07142015.zip Allow automatic host mode without charging-- rebase to Franco r163.
2013.07.08 1420ET: ziddey-otg-r162-07081420.zip Update storage_list.xml for compatibility with new CM nightlies-- rebase to Franco r162.
2013.06.28 1551ET: ziddey-otg-M3-06281551.zip Maintenance build-- rebase to Franco M3.
2013.06.27 0427ET: ziddey-otg-r156-06270427.zip Re-enable read-only NTFS support in kernel.
2013.06.06 1736ET: ziddey-otg-r151-06061736.zip Releases will now include modules ff-memless.ko, hid-dr.ko, hid-logitech.ko, and xpad.ko (/system/lib/modules). Manually insmod as needed or create an appropriate init.d script to load on boot. Rebase to Franco r151.
2013.05.25 0749ET: ziddey-otg-05250749.zip Fix compatibility issue with CWM (MTP crashes).
2013.05.23 2119ET: ziddey-otg-05232119.zip Start charging immediately when entering host mode. This resolves issues with proprietary chargers.
2013.05.22 2305ET: ziddey-otg-05222305.zip Rebase to Franco's r140. Revert checks for actual proprietary chargers in favor of manually disabling automatic host mode (temporary). Issue "# echo disable > /sys/kernel/debug/msm_otg/aca" to disable automatic host mode (enable to re-enable).
2013.05.17 0107ET: ziddey-otg-05170107.zip Added check for other proprietary charger case. Rebase to Franco's r137.
2013.05.15 0124ET: ziddey-otg-05150124.zip Attempt to detect actual proprietary chargers (Apple-compatible) and charge properly. Rebase to Franco's r136.
2013.05.09 1729ET: ziddey-otg-05091729.zip Should now patch precompiled storage_list.xml to address incorrect strings (Internal Storage/USB Storage). Re-enabled verbose usb debugging messages (dmesg).
2013.05.06 1846ET: ziddey-otg-05061846.zip Maintenance build. Based off Franco's current nightlies branch (r134?). Updated storage_list.xml to match current CM nightlites. Removed freshen flag to hopefully address issues with framework-res.apk not being patched (thanks sga999). Verbose usb debugging messages not enabled (unaltered r134 config)
2013.04.07 0355ET: ziddey-otg-04070355.zip Now modifies /system/etc/permissions/platform.xml to allow app write access to usb storage (thanks garyd9 for script code). Kernel build number reverted to 105 to match Franco's M1 build number.
2013.03.27.2338ET: ziddey-otg-03272334.zip Allow host mode when slimport connected (must manually enable for now. not sure if it actually works, so please report results.) Prevent forced host mode from entering suspended state so it won't get stuck (perhaps worth reinvestigating if we ever get internal power working). Allow forcing mode via /sys/kernel/debug/msm_otg/mode regardless of current state (original code had conditions that were unreasonable. it is designed to be used for debugging after all..). Forgot to reset the build number; should be 105. Would only potentially matter if using Franco's app.
2013.03.23 2000ET: ziddey-otg-03231951.zip All-in-one update now enables android api for usb host mode. Should automatically rescan media library when usb storage is connected. Kernel updated to Franco M1 (milestone), and will probably stay here for a while.
2013.03.17 1548ET: otg-aio-20130317.zip All-in-one flashable zip that includes modified kernel/ramdisk, vold.fstab, and precompiled storage_list.xml for framework-res.apk (thanks arpruss for precompiled zip-for-android). Kernel unchanged from last release (Franco r102 base), but removed unrelated line previously added to default.prop in ramdisk
2013.03.14 1648ET: otg-franco-boot-03141621.img Should have fixed all issues involving unpopulated hubs, unplugged devices, host mode timeout, and charging. Changed main mount point to /storage/usbdisk0 since that seems to be the new standard (manually update vold.fstab accordingly). Based on Franco's git as of 3/12 (after r102)
2013.03.11 2244ET: otg_boot_r3.img Interim build to address wall charging issues (do not attach/detach devices while otg cable connected to phone)
2013.03.09 0739ET: otg_boot_r2.img Should charge (faster) in host mode
2013.03.08 1128ET: otg_franco.zip Initial release in this thread.
2013.03.07 1350ET: franco-otg-201303071328.img "Pre-alpha" build posted in CaptainMuon's thread. Forces disabling of host mode on device unplug.
2013.03.07 1102ET: franco-otg-201303071032.img "Pre-alpha" build posted in CaptainMuon's thread. Forces host mode on detection of "proprietary" type charger (vs usb = sdp, wall = dcp).
References:
Typical Configuration Examples | Android Developers: http://source.android.com/devices/tech/storage/config-example.html
External Storage Technical Information | Android Open Source: http://source.android.com/tech/storage/
chainfire[dev~blog] - Is Google blocking apps writing to SD cards?: http://www.chainfire.eu/articles/113/Is_Google_blocking_apps_writing_to_SD_cards_/
Re: [OTG] [08MAR13] [DIRTY HACKS] OTG Kernel / Ramdisk / Framework (Seeking Devs)
Just for clarification this still requires external power via a y cable right?
Sent from my Nexus 4 using XDA Premium HD app
Yes, still requires external power. Currently, the hack triggers host mode when detecting "USB_PROPRIETARY" charger.
ziddey, is it possible for you to make a framework file for the stock rom? Also, you've given us .img files before. I'm assuming we can flash these .zip files during recovery (e.g. twrp)?
EDIT: I just tried this without the framework file since I'm on stock rom. I flashed the kernel through twrp, but the otg_vold zip would not flash (just said "failed"). Maybe it's not supposed to?. I manually put it in /system/etc. Let me know if I should have been able to flash it.
It works as you described, with usbdisk, no stickmount required. However, the phone is no longer charging like it did with your prior kernels. Maybe that should have been expected, but I certainly liked the fact that I had that "feature" before (with my cable from post #40...it did NOT charge with other OTG or Y-cables).
Strange, but a flash drive works, but a microsd card reader does not. It was working with your prior kernels. EDIT: It seems to be finicky, but I can get that microsd card reader to work also.
Thanks so much for your efforts!
Re: [OTG] [08MAR13] [DIRTY HACKS] OTG Kernel / Ramdisk / Framework (Seeking Devs)
Nice work man.. Will give a try
Sent from my Nexus 4 using xda app-developers app
Made some updates. Should now charge (faster) in host mode.
otg_boot_r2.img: http://d-h.st/Oky Modified kernel/ramdisk based on 3/1 git clone of Franco's kernel
an idea
what happens if you make a manual switch for usb host mode? like when we need to plug usb, we change the state?
sga999 said:
ziddey, is it possible for you to make a framework file for the stock rom? Also, you've given us .img files before. I'm assuming we can flash these .zip files during recovery (e.g. twrp)?
Click to expand...
Click to collapse
Gone back to image files again. One less step to do this way.
EDIT: I just tried this without the framework file since I'm on stock rom. I flashed the kernel through twrp, but the otg_vold zip would not flash (just said "failed"). Maybe it's not supposed to?. I manually put it in /system/etc. Let me know if I should have been able to flash it.
Click to expand...
Click to collapse
You're right; I hadn't tested it, and assumed I'd be able to just hack up a different zip for use. Pulled it for now.
It works as you described, with usbdisk, no stickmount required. However, the phone is no longer charging like it did with your prior kernels. Maybe that should have been expected, but I certainly liked the fact that I had that "feature" before (with my cable from post #40...it did NOT charge with other OTG or Y-cables).
Click to expand...
Click to collapse
I'm surprised you didn't have issues with the prior builds. I don't think I ever changed anything. That said, it should be fixed now. Let me know how it works.
Strange, but a flash drive works, but a microsd card reader does not. It was working with your prior kernels. EDIT: It seems to be finicky, but I can get that microsd card reader to work also.
Click to expand...
Click to collapse
Likely an issue on your end since I don't think anything was changed that would cause this. Are you trying to use both the flash drive and microsd at the same time? I'm not sure how that'd be handled-- upon insertion of the second drive, either nothing happens, or it overloads the first drive. As it is, I'm guessing my implementation of usbdisk isn't properly done.
Thanks so much for your efforts!
Click to expand...
Click to collapse
No problem! More of a personal challenge/desire. Really hoping that a real dev takes notice.
ereghro said:
what happens if you make a manual switch for usb host mode? like when we need to plug usb, we change the state?
Click to expand...
Click to collapse
You mean like CaptainMuon's build, where you change /sys/kernel/debug/msm_otg/mode?
Originally, there were issues with that method after unplugging the OTG cable, but that may have been fixed with the hacks to the OTG_STATE_A_IDLE case. It's possible that the other modifications will now cause problems with with the debug mode, but I'm imagining it just makes it unnecessary (except for debugging purposes) since it's not actually triggering a_host based on the ID pin, but rather by the detected charger.
Is there a particular reason you want to use a manual switch? I can re-enable it in the next build.
ziddey said:
Gone back to image files again. One less step to do this way.
You're right; I hadn't tested it, and assumed I'd be able to just hack up a different zip for use. Pulled it for now.
I'm surprised you didn't have issues with the prior builds. I don't think I ever changed anything. That said, it should be fixed now. Let me know how it works.
Likely an issue on your end since I don't think anything was changed that would cause this. Are you trying to use both the flash drive and microsd at the same time? I'm not sure how that'd be handled-- upon insertion of the second drive, either nothing happens, or it overloads the first drive. As it is, I'm guessing my implementation of usbdisk isn't properly done.
No problem! More of a personal challenge/desire. Really hoping that a real dev takes notice.
Click to expand...
Click to collapse
ziddey, I don't think you answered about me wanting a stock version of framework-res. I tried to create it with the Framework Flasher that you suggested, and it seemed to complete successfully. But when I flash it, it stops at the Nexus 'X' logo...it does a little vibration every minute or so, but never comes out of that. I even used that same tool to decompile, recompile WITHOUT any changes, sign it, etc., but the result is the same. So....either the tool isn't really working or I'm doing something else wrong. Any special instructions on how to flash the update.zip...or what it must be flashed with? I tried flashing it alone, then tried with your kernel (2 separate steps in twrp).
I haven't had enough time yet to get in much testing, but YES! Charging has returned!
No, I'm not trying both devices at the same time, so I don't know what is going on with the microsd. I'll keep trying to figure it out.
I'd like to know how to see logs of what's going on, like when you say there is "overload" (or other problems). Can you tell me what you're looking at to see errors, status, etc.?
I understand how you feel about the personal challenge. I'm that way too....I love to see things work and won't quit! But unfortunately, I don't have the expertise to help you here. But I'll certainly test it! I can't understand why dev's aren't joining you. And I may be the only one downloading your files (based on counts on dev-host). Very strange.
Did you update the apktool components? The components in wesf90's Framework Flasher (http://forum.xda-developers.com/showthread.php?t=1432152) are old and don't support JB4.2.
Down the new apktool and dependencies from http://code.google.com/p/android-apktool/downloads/list and replace the ones in wesf90's kit. That's all I did, and it seemed to work fine for me.
ziddey said:
Did you update the apktool components? The components in wesf90's Framework Flasher (http://forum.xda-developers.com/showthread.php?t=1432152) are old and don't support JB4.2.
Down the new apktool and dependencies from http://code.google.com/p/android-apktool/downloads/list and replace the ones in wesf90's kit. That's all I did, and it seemed to work fine for me.
Click to expand...
Click to collapse
I updated apktool and aapt. And everything ran perfectly. Most people who had not updated yet said it failed somehow, then after updating, it worked. But I updated the tools first, never got errors, so I think it's creating the update.zip properly. So I'll ask this one more time, and if you don't want to or can't do this, please let me know. Can you create the framework-res.apk zip file for the stock rom for me? Maybe I would then be able to compare my update.zip to yours and see what went wrong.
If I already have your kernel installed, can I just bring up twrp recovery and flash the single update.zip for the framework? Or is it more complicated than that? I'm thinking I must be missing something about how to flash the update.zip.
Can you tell me how to see logs that show the overload and other issues? Again, please just let me know, and if you don't want to answer this, I'll stop asking.
I appreciate all that you've done, and I certainly don't want to ask you too much. I just need to know if you're missing the questions or don't want to answer...which is fine.
sga999 said:
I updated apktool and aapt. And everything ran perfectly. Most people who had not uproperlyyet said it failed somehow, then after updating, it worked. But I updated the tools first, never got errors, so I think it's creating the update.zip properly. So I'll ask this one more time, and if you don't want to or can't do this, please let me know. Can you create the framework-res.apk zip file for the stock rom for me? Maybe I would then be able to compare my update.zip to yours and see what went wrong.
If I already have your kernel installed, can I just bring up twrp recovery and flash the single update.zip for the framework? Or is it more complicated than that? I'm thinking I must be missing something about how to flash the update.zip.
Can you tell me how to see logs that show the overload and other issues? Again, please just let me know, and if you don't want to answer this, I'll stop asking.
I appreciate all that you've done, and I certainly don't want to ask you too much. I just need to know if you're missing the questions or don't want to answer...which is fine.
Click to expand...
Click to collapse
Sounds like the update script is fine, the problem is with your framework. Either it's not being recompiled properly or the changes you're making are causing problems. What versions of the tools are you using?
So if this requires external power, would an external hdd with external power source work, in theory? Or does the USB itself need to carry a current to make it work?
MWBehr said:
Sounds like the update script is fine, the problem is with your framework. Either it's not being recompiled properly or the changes you're making are causing problems. What versions of the tools are you using?
Click to expand...
Click to collapse
I've tried it with no changes at all, i.e. decompile and recompile with no changes (my post #11 describes this in more detail). So as you said, the recompile must not be working.
My versions are:
aapt.exe v0.2
apktool.jar 1.5.2 but unfortunalely, frameworkflasher's runme.bat always does "echo version 1.4.3" (this threw me off for a while!)
I only replaced aapt.exe and apktool.jar. Are there other .exe or .dll files that need to be replaced also? Maybe I'm just doing an incomplete job of updating the files.
Thanks for your help.
sga999 said:
Can you create the framework-res.apk zip file for the stock rom for me?
Can you tell me how to see logs that show the overload and other issues?
Click to expand...
Click to collapse
Upload your framework-res.apk and I'll try to mod it. Not sure why it's not working for you though.
I haven't combed through the logs to look for when it's mounted, but since you created vold.fstab, it shouldn't be an issue. Maybe it didn't affect the stock rom anyway. If it did mount at /mnt/shell/emulated/0, internal storage would no longer be accessible. I had issues even opening Android settings, nevermind storage. Of course, you could simply check your mounts with the mount command, or use df to see mounts / disk space.
hp420 said:
So if this requires external power, would an external hdd with external power source work, in theory? Or does the USB itself need to carry a current to make it work?
Click to expand...
Click to collapse
In theory, yes. However, I'm imagining that a powered external hdd isn't going to be sending power out the usb port, and since the charger type is currently used to force host mode, it won't switch automatically. This could be a potential reason for the debug /sys/kernel/debug/msm_otg/mode, so I'll enable it in the next build. Unfortunately, I'm imagining that it still won't work though, seeing how it'd get stuck in a_idle. However, it does give me some ideas for trying to trace the root issue, or at least figuring out another workaround.
ziddey said:
Upload your framework-res.apk and I'll try to mod it. Not sure why it's not working for you though.
Click to expand...
Click to collapse
ziddey, here are links to my framework-res.apk and the update.zip. They are unmodified stock, i.e. I let framework flasher decompile, recompile without any changes, sign, etc. You may have no interest in the update.zip, but if what you create "matches" mine (not sure if a byte by byte compare will work), I don't think it will help for you to give yours to me. But again, just ignore that .zip if you want to.
I'm not very familiar with uploading, so if I'm not supposed to put direct links here, let me know.
http://www.mediafire.com/?wxcnozb2e5u8wps
http://www.mediafire.com/?visp1jzai8aqisp
What I mean about the log is that I don't know what log you look at. I know there's logcat, dmesg, maybe others, but I've never looked at them. So I wanted to learn a little more by looking at the same thing you look at when you notice various errors.
Thanks for your help.
edit: DO NOT DOWNLOAD. Tested by sga999 and does not work.
http://d-h.st/Z2s md5sum: 2b07609be9c462a0f4ba54c141dc2e88
your update.zip db087c101a8c07aa3606102128c96051
mine 19642b12da5a6fd372280c3e33fa8247
Report if that works. May be of interest to others. Is that stock 4.2.2 JDQ39?
ziddey said:
http://d-h.st/Z2s md5sum: 2b07609be9c462a0f4ba54c141dc2e88
your update.zip db087c101a8c07aa3606102128c96051
mine 19642b12da5a6fd372280c3e33fa8247
Report if that works. May be of interest to others. Is that stock 4.2.2 JDQ39?
Click to expand...
Click to collapse
Yours fails also! I have given it about 6 minutes, and it's stuck on the 'X'. I've waited longer than that before, maybe 10 minutes, but I don't ever think it should take more than a couple of minutes, right? UPDATE: I've now waited 11 minutes.
Yes, I gave you /system/framework/framework-res.apk from stock 4.2.2 JDQ39. That's what I'm running.
I have the unsigned and signed apk's saved from the various steps of Framework Flasher. It would be interesting to know where it goes wrong. I'm pretty sure the signed apk has the same problem, but I can't be sure I installed it properly (I read various posts about putting it in /system, fixing properties, cut/paste into /system/framework). It reboots immediately after I do the paste.
I would guess that the recompile is somehow not working. I suppose I could try to go through the individual steps on my own...but I sure had hoped to use this tool, just like you did!
Thanks for creating it for me...at least it's not something I was doing wrong with the tool!

[KERNEL][V510GPE]SleekAI Updated-JAN-22-2015

SleekAI kernel for the LG G Pad 8.3 V510 (GPE)
Updated 1-22-2015 CURRENT Sleekai8.1
Both kernels updated to Fsync off (again) and a couple of small changes to code. Also changed the versions to match numerically.
Also added a new 88sleektweaks file for init.d that has preset values for voltage control undervolting, See second post for instructions and zip file. Use Trickstermod if you want fsync on.
Both Lollipop And Kitkat Versions
(Lollipop version also works with CyanogenMod12)
Features:
Flash Through Recovery!
Interactive Governer as default
Row IO Scheduler as default
Wheatley Governer added as option (Lollipop only)
Knock_on enabled by default (Lollipop) or with
My app in the third post down (KitKat)
Sweep2Sleep enabled as an option
LCD screen control using Trickster Mod
Compiled using Linaro Toolchain cortex a15-4.9.3
o3 Compile optimizations
init.d support (zip align, etc...)
Faux Sound Control added
USB Fast Charge added
Frandom replacing Urandom
Fsync On/Off using Trickstermod
Tethering for bluetooth and usb
Exfat support for sdcards
User Space Voltage Control TricksterMod to change
Five new IO schedulers for Lollipop! Trickstermod to change
And more!
The kernel source and Commits that show the changes used for sleekai can be found here: Github
Prerequisites
Unlocked bootloader
Root
Install Busybox for init.d support
TricksterMod is recommended for changing settings
How does this work?
Start by making a backup of your boot in recovery, then:
Flash the latest version in Recovery . Proceed to the downloads below, download to your tablet, reboot into recovery and install the zip --That simple!
if you want to build your own kernel start to finish with complete instructions, you can follow my guide for rolling your own kernel HERE
Please hit "Thanks" to show your support!
DOWNLOAD HERE:
ATTACHED FILES
TO USE INIT.D SUPPORT ON YOUR DEVICE
Busybox must be installed for the init.d support file to work! (in the playstore)
You will need to add a folder named init.d to /system/etc/ in order to use this support
One example is to have your apps zip aligned on boot.
Another is to use my 88sleektweaks script to save battery
This includes undervolting values that you can adjust as neccesary, and a few WiFi tweaks.
Unzip the file to reveal the zip-align script. Then:
Copy the script to your /system/etc/init.d folder, change the permissions if needed, and reboot. Thats it!
You can tell you have it right by looking in /data for the zip align db files after you reboot.
You should change your permissions on any file in init.d to rwx r-x r-x (755)
Sleektoggle - For Knock_on and Sweep2Sleep
I made a small application using tasker that will enable Knock-on and Sweep2Sleep on devices using the kitkat kernel.
Knock-on is enabled by default in my Lollipop kernel - no app required.
The application works as a toggle, and will need to be "enabled" after every boot to use these features.
This is for your protection, as knock-on will freeze your device if enabled before or during boot.
This keeps you from having to enable these manually by adjusting the files yourself.
The knock-on feature should work on ANY 510 device, as it is native to the device.
To use:
Download and install the apk.
Put the icon from your apps somewhere on your home screen
after boot/reboot, press the icon, allow root privilages, and you are done!
You should only need to enable root the first time.
To use the features:
Simply knock twice in the center of the screen to wake up your device from standby
To put it to sleep, swipe from right to left on the lower portion of your screen.
Pressing the icon a second time does not disable the features. Restarting your device does!
Glad to see some dev on this device finally. Will flash it tonight and report if i have any issues.
edru said:
Glad to see some dev on this device finally. Will flash it tonight and report if i have any issues.
Click to expand...
Click to collapse
Excellent! You can expect the first reboot to be slow, as well as the first opening of some apk's as the kernel repopulates the files. Let me know!
A lone V510 dev emerges!!! Thank you!
Sent from my LG-V510 using Tapatalk
-Updated kernel for ability to pull the .config from the device, and shorter idle time before sleep.(battery saver). With this comes an updated name change to sleekai2.
--Update--
Kernel recompiled using the latest Linaro toolchain 4.9.3
Gamma corrected on the tablet with no further optimization needed
And the latest Antutu benchmark for the 510 with the latest Lollipop kernel: 31,526 See attachments.
going to give this a go right now.
---------- Post added at 01:57 PM ---------- Previous post was at 01:49 PM ----------
Gamma looks GREAT!
nice job sir. Thank you.
Just flashed on my V510. Thank you so much for your hard work!
Anyway to mod the gamma fix onto other roms (v500) via adb or something?
this is awesome! It feels like a brand new device!
Hi Sleekmason,
I tried your kernel by booting it but not doing the permanent flash to the tablet and something that I noticed is that when I am booted using your kernel I can't see or use my sdcard1 (external sd). When I boot off the normal stock kernel the sdcard1 is available again. I tried 2x and same result each time. Am I having bad luck and others can see their external sd card? The extra 64GB of storage is critical for me so even though I would like to try more your kernel and the improvements you have made I can't without the external SD card working. Please let me know if you know a solution. I don't know if this makes any difference but I have done the platform.xml change to be able to write on the external SD, that is the only change to the stock GPE Rom besides rooting. Thank you
schalmers said:
Hi Sleekmason,
I tried your kernel by booting it but not doing the permanent flash to the tablet and something that I noticed is that when I am booted using your kernel I can't see or use my sdcard1 (external sd). When I boot off the normal stock kernel the sdcard1 is available again. I tried 2x and same result each time. Am I having bad luck and others can see their external sd card? The extra 64GB of storage is critical for me so even though I would like to try more your kernel and the improvements you have made I can't without the external SD card working. Please let me know if you know a solution. I don't know if this makes any difference but I have done the platform.xml change to be able to write on the external SD, that is the only change to the stock GPE Rom besides rooting. Thank you
Click to expand...
Click to collapse
huh, I don't have this problem myself using es file explorer, or in my settings tab under storage.
There should be nothing in the configuration to cause the problem you report.
I have however, heard that there were issues with some of the 64 gig cards. Have you tried removing the card and reinserting? I suppose it would be possible that it needs a new initial read after changing kernels. Please let me know.
Also what file system is the card?
What are you trying to read it from?
kdog350 said:
this is awesome! It feels like a brand new device!
Click to expand...
Click to collapse
Excellent! Glad to hear it!
general_z said:
Anyway to mod the gamma fix onto other roms (v500) via adb or something?
Click to expand...
Click to collapse
Check out "How to roll your own kernel" in my signature. There is somebody who is going to try to make a kernel for the 500. Unfortunately, without the device I cannot take the chance of making a mistake and ruining someone's day. Hopefully they will succeed!
-Update-
Kernel Added
Changelog 22 Feb 14
general setup-perf-changed to sleekai3
compiled with -o2 for optimization of code/better battery life, maybe.
general setup-kernel log buffer size changed to 14
Note* sleekai3 is pretty much the same thing as sleekai2 except the specific use of the optimize flag for the gcc compiler. Does it really change anything? Don't know yet. Wouldn't worry about changing unless you just can't resist. If I see noticable battery savings I'll let ya know. Of course, changing is easy too . . ..
sleekmason said:
Check out "How to roll your own kernel" in my signature. There is somebody who is going to try to make a kernel for the 500. Unfortunately, without the device I cannot take the chance of making a mistake and ruining someone's day. Hopefully they will succeed!
Click to expand...
Click to collapse
How thoughtful of you. In what file(s) is the gamma fix or where is the changelog that shows it?
I'm thinking that It may be quite easy to just to mod another kernel for the v500 and put it in (like dyn.Kernel v3).
sleekmason said:
huh, I don't have this problem myself using es file explorer, or in my settings tab under storage.
There should be nothing in the configuration to cause the problem you report.
I have however, heard that there were issues with some of the 64 gig cards. Have you tried removing the card and reinserting? I suppose it would be possible that it needs a new initial read after changing kernels. Please let me know.
Also what file system is the card?
What are you trying to read it from?
Click to expand...
Click to collapse
Hi Sleekmason, thank you for responding.
I tried again this time with your new v3 kernel and I get the same results. The card is a Sandisk 64GB formated as exfat. I can read it no problem when booted on stock kernel and in W7. From the tablet I check the sd card from ES FileExplorer and from the settings Storage. When I removed and re-inserted the SD card while booted on your kernel I get the option to "Mount SD" but it does not seem that it can complete the mounting.
Have you modified your platform.xml file (under system/etc/permissions) to allow writing to the SD card?
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
add line : <group gid="media_rw" />
Without that change I could not write to the SD card but only read from it on the stock kernel / rom.
Are you able to read and write to your SD card with your kernel?
schalmers said:
Hi Sleekmason, thank you for responding.
I tried again this time with your new v3 kernel and I get the same results. The card is a Sandisk 64GB formated as exfat. I can read it no problem when booted on stock kernel and in W7. From the tablet I check the sd card from ES FileExplorer and from the settings Storage. When I removed and re-inserted the SD card while booted on your kernel I get the option to "Mount SD" but it does not seem that it can complete the mounting.
Have you modified your platform.xml file (under system/etc/permissions) to allow writing to the SD card?
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
add line : <group gid="media_rw" />
Without that change I could not write to the SD card but only read from it on the stock kernel / rom.
Are you able to read and write to your SD card with your kernel?
Click to expand...
Click to collapse
Yes, I did the fix as well. The sleekai3 is only the optimized sleekai2 (using flag -o2), so there really is not much difference.
SO, here we go, I looked up problems with the 64 bit card as I remembered reading something about them in a samsung forum. What I found this time I searched was here: http://forum.archosfans.com/viewtopic.php?f=84&t=66346 and here in our own forum: http://forum.xda-developers.com/showthread.php?t=2575043
Basically what "they" say is that the Sandisk 64 bit cards have issues with exfat. The solution is to format in fat32. you lose a gig or two with the different format, but it works. The above link also suggests ext4 as an option, but it will not work on our device, neither will ext2. At least not mine!
Long story short is to copy your files to your computer, reformat to fat32 and put them back!
The longer story is of more interest to me. As sleekai3 is based off the original kernel source for the 510, and because I have made no changes to areas that should/could effect the reading of your card, WHY does the stock kernel you have allow it? (yes, I switched it and am assuming it is unreadable by every kernel for the sake of argument.)
This is entirely a permissions issue as far as I know. frustrating. One thing I cannot do with my card is download a file, say a zip file, to my external sd card. I can copy it after it's downloaded, I can use link2sd with no problem, everything shows up well. This indicates the need for root access by Dolphin Browser.
I had thought to edit the fstab file and simply add "users" to the options but that doesn't work. I also tried many variations of the fix in the /permissions/platform.xml as well.
I'm going to have to study permissions for the device and see what I can do to fix it for everybody if I can. I'm afraid that adding the card to root could allow for an exploit. maybe.
Anyway, reformat to fat32 and let me know how it goes! regards, sleekmason

[RECOVERY][EXYNOS] TWRP 3.1.1 (SM-G850F) - UPDATE: 2017-11-30

This is the thread for the TWRP 3.0 recovery for Samsung Galaxy Alpha (SM-G850F). The recovery uses a kernel built from the Samsung sources with root prevention disabled. It is fully working but still be careful and make backups!
DOWNLOAD
XDA:DevDB Information
recovery_twrp_slte, Tool/Utility for the Samsung Galaxy Alpha
Contributors
modpunk
Source Code: http://git.cryptomilk.org/projects/android/android_device_samsung_slte.git/
Version Information
Status: Stable
Current Stable Version: 3.1.1-2
Stable Release Date: 2017-11-30
Created 2014-11-06
Last Updated 2017-11-30
CHANGELOG
2017-01-26
Some bug fixes
Supports sltexx, slte and slteskt
2016-02-13
Update to version 3.0.0-0
Cleaned up device tree
Nicer fonts
2015-09-02
Set SELinux to permissive mode on boot
2015-09-01
MTP and ADB Support
Improved UI with better fonts
2014-11-10
USB OTG support (backup to external usb drive)
2014-11-06
Initial release
Thanks for your work. Glad to you in our device forum.
1 question, does your recovery include support for usb otg? In other words is it possible to backup/restore from usb flash drive?
neofral said:
Thanks for your work. Glad to you in our device forum.
1 question, does your recovery include support for usb otg? In other words is it possible to backup/restore from usb flash drive?
Click to expand...
Click to collapse
I haven't tested it. Does TWRP support this by default? If yes then we should get it working ...
P.S.: I've ordered a USB OTG cable now ...
modpunk said:
I haven't tested it. Does TWRP support this by default? If yes then we should get it working ...
P.S.: I've ordered a USB OTG cable now ...
Click to expand...
Click to collapse
officially yes. check it out here http://teamw.in/project/twrp2
neofral said:
officially yes. check it out here http://teamw.in/project/twrp2
Click to expand...
Click to collapse
OK. It doesn't work cause USB_OTG is not compiled in the kernel. The question is if the SoC has a USB OTG controller...
modpunk said:
Please try it. I will investigate once I got the USB OTG cable.
Click to expand...
Click to collapse
i just tried. the drive is listed as sd card. it has 0MB available even though my usb drive is an empty 32 gb drive formatted with fat32. when i select it for the backup, the selection goes dimm for couple of seconds and comes back back without it being selected and no error message.
by the way, is it possible to do a screenshot with TWRP?
neofral said:
i just tried. the drive is listed as sd card. it has 0MB available even though my usb drive is an empty 32 gb drive formatted with fat32. when i select it for the backup, the selection goes dimm for couple of seconds and comes back back without it being selected and no error message.
by the way, is it possible to do a screenshot with TWRP?
Click to expand...
Click to collapse
The /sdcard folder is normally pointing to /data/media/0.
modpunk said:
The /sdcard folder is normally pointing to /data/media/0.
Click to expand...
Click to collapse
can you change it to point to mnt/UsbDriveA?
this is the path where i see the usb drive via root explorer
EIDT: i have Xperia V device with latest TWRP, i did a backup and restore without any glitches
neofral said:
can you change it to point to mnt/UsbDriveA?
this is the path where i see the usb drive via root explorer
EIDT: i have Xperia V device with latest TWRP, i did a backup and restore without any glitches
Click to expand...
Click to collapse
Looking at the ROM it should be /storage/UsbDriveA maybe we need to create that folder first ...
Maybe you can test this. Boot into recovery, connect to it with 'adb shell' or use twrp terminal and create the directory "/storage/UsbDriveA". Then attach the usb drive.
modpunk said:
Looking at the ROM it should be /storage/UsbDriveA maybe we need to create that folder first ...
Maybe you can test this. Boot into recovery, connect to it with 'adb shell' or use twrp terminal and create the directory "/storage/UsbDriveA". Then attach the usb drive.
Click to expand...
Click to collapse
didn't work. couldn't connect with adb shell when on recovery (maybe not correct drivers insatlled). when creating /storage/UsbDriveA, attached usb drive and it's empty and doesn't list the drive in the storage options.
however, when browsing with root explorer a folder like that already exists
Will it work exynos varient of Galaxy alpha thats available in India with Model No. 850Y?
shranav said:
Will it work exynos varient of Galaxy alpha thats available in India with Model No. 850Y?
Click to expand...
Click to collapse
Try it and find out! I will probably not get a phone from India ....
Recovery with USB OTG support has been updated!
modpunk said:
Recovery with USB OTG support has been updated!
Click to expand...
Click to collapse
is it different from the one i tested couple of days ago (on 7th)? if it's the same, no need to flash for me. i'm happy to have USB OTG support and being able to backup/restore on usb. i have to admit, the internal storage is full already. that's why i needed this support. thank you for enabling this :good:
Is it the G-850FQ?
savasdok said:
Is it the G-850FQ?
Click to expand...
Click to collapse
this thread on the title it says it's for SM-G850F. it's also tested to run well on 850F.
if you want ot test on FQ, you're welcome. if you test, please post back and confirm if it works :good:
anybody have problems with download ,I rich 99% of file & downloading stop
I dont know is this happend to me only or is site problem!!
---------- Post added at 18:00 ---------- Previous post was at 17:55 ----------
Sorry,problem was on my download manager
neofral said:
this thread on the title it says it's for SM-G850F. it's also tested to run well on 850F.
if you want ot test on FQ, you're welcome. if you test, please post back and confirm if it works :good:
Click to expand...
Click to collapse
Got it, thanks.
Will this work with the 850A? Thanks

How can I disable external hard disk partition (auto-) mount

RemixOS_Jason said:
Release notes
Remix OS for PC version: 3.0.102
Release date: August 2, 2016
Fixed more Wi-Fi issues related to Broadcom wireless chipsets
[*]Support hard disk partition mount allows you to access other files and folders
Support for future updates via OTA
Added feature where recent apps will be shown on the top line of apps in the App Drawer
Added “App Store” to Remix OS
Click to expand...
Click to collapse
I updated my Remix OS hdd installation today and recognized that all external (read: non Remix OS) partitions got automounted. I now lots of people asked for easy access to their windows partitions from within Remix OS, but I would prefer to keep things seperated.
Is it possible to disable the "access to other files and folders" in general or at least to stop automounting those partitions?
Thanks in advance
Martin
auto-mount is even tried for non-ntfs partitions
I am running Remix OS 3.0.102 in a dual boot system together with Ubuntu. While signing on the auto-mount function says already that there are two "corrupted" ext4 partitions beside one NTFS drive. After signing on the NTFS drive has been mounted automatically, while the Remix-OS partition "Android-x86" and the Ubuntu partition are called "corrupted" - probably because they are formatted with ext4.
I think, showing partitions which can't be opened in Remix OS doesn't make sense, especially if they are shown together with a dangerous offer "Touch to fix". There should be a way telling Remix OS which partitions are interesting and which should be mounted automatically.
https://postimage.org/
filius.martis said:
I updated my Remix OS hdd installation today and recognized that all external (read: non Remix OS) partitions got automounted. I now lots of people asked for easy access to their windows partitions from within Remix OS, but I would prefer to keep things seperated.
Is it possible to disable the "access to other files and folders" in general or at least to stop automounting those partitions?
Thanks in advance
Martin
Click to expand...
Click to collapse
@filius.martis @remixtester - Got it. I'll flag this question with our PM and I'll let you guys know. Thanks!
I have same problem, my drive got corrupted, dev should fix this asap.
arts821 said:
I have same problem, my drive got corrupted, dev should fix this asap.
Click to expand...
Click to collapse
Did you mean using latest remix version, the windows and another partition get error or corrupt omg
FYI so everyone in this thread is updated, we have developed the option to turn off the mount partition feature. It is being tested right now and it will be rolled into a future update, likely with a week or two.
Thanks!
RemixOS_Jason said:
FYI so everyone in this thread is updated, we have developed the option to turn off the mount partition feature. It is being tested right now and it will be rolled into a future update, likely with a week or two.
Thanks!
Click to expand...
Click to collapse
Will a test version be available for testers?
Sent from my on Z00A using XDA Labs
@RemixOS_Jason
...is the Gaming ToolKit being looked into to attempt improvemtnts for future releases?
<<<New World Order (NWO)>>>
Selection of the partitions possible which should be mounted?
RemixOS_Jason said:
FYI so everyone in this thread is updated, we have developed the option to turn off the mount partition feature. It is being tested right now and it will be rolled into a future update, likely with a week or two.
Thanks!
Click to expand...
Click to collapse
You are writing of "option to turn off the mount partition feature". What I would prefer is an option to select the partitions which you want to mount (and which not). Another option should be: manual mount / automatic mount of the partitions which you want to mount.
remixtester said:
You are writing of "option to turn off the mount partition feature". What I would prefer is an option to select the partitions which you want to mount (and which not). Another option should be: manual mount / automatic mount of the partitions which you want to mount.
Click to expand...
Click to collapse
That's what we have at the moment; Yes they are auto-mounted but they can be ejected via that Storage & USB screen. Maybe add a lock button on that screen so it isn't remounted on reboot.
If the corrupted message is due to the system trying to treat all partitions as fat/ntfs/exfat then that should be fixed [I'd run e2fsck on those partitions just to make sure they aren't actually corrupt].
And to answer the OP [this question has been asked and answered before]; you disable the service MediaScannerService from the Media Storage system app.
[email protected] said:
@RemixOS_Jason
...is the Gaming ToolKit being looked into to attempt improvemtnts for future releases?
<<<New World Order (NWO)>>>
Click to expand...
Click to collapse
@[email protected] - Yes, in fact there's an improvement program for the Gaming Toolkit going on now. After using it in your preferred games, we'd love to get your feedback through this form: https://goo.gl/forms/IaRM5aedoznFAr2C3
Thanks!
RemixOS_Jason said:
@[email protected] - Yes, in fact there's an improvement program for the Gaming Toolkit going on now. After using it in your preferred games, we'd love to get your feedback through this form: https://goo.gl/forms/IaRM5aedoznFAr2C3
Thanks!
Click to expand...
Click to collapse
good day....i have just updated to v3.0.201, and i have few requests concerning changelogs posted on your site: http://support.jide.com/hc/en-us/categories/202520967-Remix-OS-for-PC
1)...is it possible that if there are any changes/modificatios are made to the Gaming Tool Kit can be included in the changelos together with the system changes that are well detailed as you do?
2)...i assume this is a stable release as i see it on your site, and thank you for using the latest Android-x86 RC2, the system has significantly improved, more stable, fluid , but the ads on the start menu still cripples system RAM(this is for funding purposes, the advertisements, so no need/wont complain any further)
3)....for futur releases, can u please or is there a way that Proxy SET-UP can be done for Ethernet connections?...include this somehow if within your future plans!
4)I tried the GameKITtool, IMO its still same as in the previous v3.0.104, nothing "seems' to have being changed, also nothing bas broken, still works marvellously, but lacks the previously made requests for 100% game controll compatibility!
5)overall system perfomance and stability is greatest,and thank you for including previously requested features into the sytem/update!
6..........for linux users that installed RemixOS, and thus obviously never installed using the Jide Installer, either wont be able to get OTA?
based on this? "OTA support disabled if software was NOT installed by official Jide installer"
<<<New World Order (NWO)>>>

Categories

Resources