[APP] DriveDroid - Galaxy Note II Themes and Apps

https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid&hl=en
Has anyone managed to make it work? I've been trying using Easy UMS but no luck. Has anyone had any success and if yes please shed some light

Jonous said:
Has anyone managed to make it work? I've been trying using Easy UMS but no luck. Has anyone had any success and if yes please shed some light
Click to expand...
Click to collapse
Hi I'm the developer of DriveDroid.
I've been mailing some people who also have trouble with the Galaxy Note 2 and booting their PC with DriveDroid. Some background: the option 'USB Mass Storage' in DriveDroid sets the USB-mode to "mass_storage" (which is needed for your PC to be able to boot from your phone). The default USB-mode for Galaxy Note 2 devices is "mtp". This is no problem on most devices I've tried. Those devices also have a default setting of "mtp", but DriveDroid can change that and it'll work for most of them. Even after reconnecting the USB cable the settings will stay like it is.
However on the Galaxy Note 2, when the cable is reconnected (or the PC is rebooting) the setting will be forcefully set by the Galaxy Note 2 rom: it overrides the setting that is set by DriveDroid. You can check this by going to the preferences of DriveDroid -> check USB Mass Storage -> leave the preferences screen -> unplug and replug your usb cable -> go back to the preferences: you'll see that the option is now unchecked. Usually that option should be remembered across disconnects of USB.
This is quite annoying when you want to boot from your phone, since it'll reset the setting right after your PC has rebooted (which is when your bios needs the USB device to boot from).
I'm working with someone else on a hacky way to work around this problem, but we'll have to see whether it is actually solvable.

FrozenCow said:
Hi I'm the developer of DriveDroid.
I've been mailing some people who also have trouble with the Galaxy Note 2 and booting their PC with DriveDroid. Some background: the option 'USB Mass Storage' in DriveDroid sets the USB-mode to "mass_storage" (which is needed for your PC to be able to boot from your phone). The default USB-mode for Galaxy Note 2 devices is "mtp". This is no problem on most devices I've tried. Those devices also have a default setting of "mtp", but DriveDroid can change that and it'll work for most of them. Even after reconnecting the USB cable the settings will stay like it is.
However on the Galaxy Note 2, when the cable is reconnected (or the PC is rebooting) the setting will be forcefully set by the Galaxy Note 2 rom: it overrides the setting that is set by DriveDroid. You can check this by going to the preferences of DriveDroid -> check USB Mass Storage -> leave the preferences screen -> unplug and replug your usb cable -> go back to the preferences: you'll see that the option is now unchecked. Usually that option should be remembered across disconnects of USB.
This is quite annoying when you want to boot from your phone, since it'll reset the setting right after your PC has rebooted (which is when your bios needs the USB device to boot from).
I'm working with someone else on a hacky way to work around this problem, but we'll have to see whether it is actually solvable.
Click to expand...
Click to collapse
Many thanks for your very informative reply. I hope you can find a workaround. I guess we have to thank Samsung for all this trouble they have caused both users and devs by doing away with the mass storage option. Anyway good luck and i'll surely buy you a beer once you're there .

FrozenCow said:
Hi I'm the developer of DriveDroid.
Click to expand...
Click to collapse
Hey, FrozenCow, thanks for the realisation of the awesome idea! As a sys. admin, I find this feature really usefull. Shame it's not working on my Samsun S3. I have OTA JB update, rooted.
The problem as you said is dropping UMS when PC reboots, it's not like it's droping back to MTP, but it's just disconnecting from PC when PC reboot, and BIOS wont see my UMS drives, I managed few times to see them in BIOS setup, so I even managed to configured them, but any time I do reboot, it's lost. Some how there is should be a workaround to make this UMS persistant as a normal flash card.
Or probably it's me doing something wrong.
Looking forward to see this awesome piece of software got an update. Just can't say how cool it would be to just hold collection of bootable flash cards in my pocket which is always with me.

hmepas said:
Hey, FrozenCow, thanks for the realisation of the awesome idea! As a sys. admin, I find this feature really usefull. Shame it's not working on my Samsun S3. I have OTA JB update, rooted.
The problem as you said is dropping UMS when PC reboots, it's not like it's droping back to MTP, but it's just disconnecting from PC when PC reboot, and BIOS wont see my UMS drives, I managed few times to see them in BIOS setup, so I even managed to configured them, but any time I do reboot, it's lost. Some how there is should be a workaround to make this UMS persistant as a normal flash card.
Or probably it's me doing something wrong.
Looking forward to see this awesome piece of software got an update. Just can't say how cool it would be to just hold collection of bootable flash cards in my pocket which is always with me.
Click to expand...
Click to collapse
You could try to enable UMS from DriveDroid and reboot the phone. I've heard on Reddit that that seemed to have worked for them. However I do not know whether this could also be ROM related, but it is worth a try.
Here is the thread about the SGS3: reddit.com/r/Android/comments/1865c5/drivedroid_boot_a_pc_using_isoimg_files_on_your/c8c4pa6
(I'm not allowed to post urls)

FrozenCow said:
You could try to enable UMS from DriveDroid and reboot the phone. I've heard on Reddit that that seemed to have worked for them. However I do not know whether this could also be ROM related, but it is worth a try.
Here is the thread about the SGS3: reddit.com/r/Android/comments/1865c5/drivedroid_boot_a_pc_using_isoimg_files_on_your/c8c4pa6
(I'm not allowed to post urls)
Click to expand...
Click to collapse
Well somehow it's worked (did UMS in DriveDroid settings, then Rebooted). Not any time it's works, sometime my PC just hangs while trying to initialize USB Storage, not on every PC it's works at all, but yeah, even if it's works sometime its good to have that feature in the pocket incase i'll be caught offguard in need to fix something.
Thanks for the tip and for software.

I will try this tonight. Will report back asap.
Regards
Axelman
Sent from my GT-N7100 using xda app-developers app

Hmm, so it's still not stable. It's an annoying problem. What rom are you (all) using? It might be good to know whether you're running stock or something like CyanogenMod. I suspect the stock rom of doing extra stuff (like resetting USB settings) when USB is connected , but I need some confirmations on that .

FrozenCow said:
Hmm, so it's still not stable. It's an annoying problem. What rom are you (all) using? It might be good to know whether you're running stock or something like CyanogenMod. I suspect the stock rom of doing extra stuff (like resetting USB settings) when USB is connected , but I need some confirmations on that .
Click to expand...
Click to collapse
Model number: GT-I9300
Android 4.1.1
Baseband version: I9300XXELJ2
Kernel
3.0.31-500022
[email protected]#
SMP PREEMPT Thu Nov 29 11:12:09 KST
Build number
JRO03C.I9300ZSDLK4
I think i upgraded it once over the air, then i rooted it by CF Auto Root so auto update not works atm says phone is modefied. So its yeah, stock rom with root.
Most of the time I am pretty happy with it. You suggest me go on the loose and flash some custom roms in which DroidDrive should works better?

This app looks incredily interesting and usefull. I have so many bootable usb flash drives for different purposes that I can't quite keep track of them all I hope it can eventually be made fully functional with the Note II/S3, until then - d'oh @ Samsung!
-Mac
Sent from my GT-N7100 using Tapatalk 2

Great app ! Many thanks for your job.
Bad luck for I9300 users. I also have one. I will try asap your app. Maybe when using EasyUMS it could be able to boot a PC from phone.
I'll give you feedback soon.
Before I had this thing:
http://www.amazon.fr/gp/product/B00...SIN=B0069UVAHW&linkCode=as2&tag=amazon0d16-21
with Acronis true image, UBCD, DSL, Ubuntu, and WinPE. Working great.
But if my S3 can do the same think, it could be wonderful.
PS 1: @FrozenCrow: If you need french translation, I'm your man !
PS 2: Your app NEED to be on XDA Portal

DriveDroid should do somewhat the same what EasyUMS does with the UMS-checkbox in DriveDroids preferences. The problem I think is timing/resetting state that some devices seem to be doing. It resets and does it too slow, so the bios is already loading before it is done resetting. (Completely made up, I haven't tested such a device myself)
I've considered translations before, but didn't go through with it, since I was afraid releases would get stalled by incomplete translations (not sure how it works exactly though). Anyway, I want DriveDroid to be somewhat more stable/feature-complete for people before doing translations.
Good idea about XDA portal. I'm going to release a new version soon. I'll tip xda-developers after that version has proven to be stable.

FrozenCow said:
DriveDroid should do somewhat the same what EasyUMS does with the UMS-checkbox in DriveDroids preferences. The problem I think is timing/resetting state that some devices seem to be doing. It resets and does it too slow, so the bios is already loading before it is done resetting. (Completely made up, I haven't tested such a device myself)
I've considered translations before, but didn't go through with it, since I was afraid releases would get stalled by incomplete translations (not sure how it works exactly though). Anyway, I want DriveDroid to be somewhat more stable/feature-complete for people before doing translations.
Good idea about XDA portal. I'm going to release a new version soon. I'll tip xda-developers after that version has proven to be stable.
Click to expand...
Click to collapse
Dude, firstly thanks for the JEWEL program!
I wonder if you can create NTFS partitions to install Windows 8 or any other alternative?
I think if I do that, will win MANY thousands of followers.
Thanks again

Well, NTFS is a closed and complex filesystem. There are tools/modules that support NTFS, but those will be hard to use from DriveDroid since they are native (depending on arm/x86). Implementing it myself in Java is quite an undertaking.
You can just format a blank disk through Windows with any filesystem you want. This is what I've done to get a Windows install disk running from DriveDroid: http://softwarebakery.com/windows-install-on-drivedroid
What I'm working on atm is support for true CDROM emulation. It should allow you to use all ISOs as-is, since the bios/OS sees the device as a normal CDROM drive. This way you don't have to convert the ISO to a format that is compatible with USB (so formatting with NTFS will not be needed). The problem is that this requires a kernel patch to allow DriveDroid to enable CDROM emulation and another patch to fix a incompatibility that caused BIOSes to not recognize the CDROM drive correctly. This patch was just accepted 4 days ago for CyanogenMods kernel for the i9000.
When I've added support for this in DriveDroids menus, I can try to apply the patches to kernels of other devices, let some people test the kernel and submit the patches to CyanogenMod. Hopefully the more popular devices can get support for true CDROM emulation that way. It *should* be better than letting DriveDroid format images if it all works as planned.

FrozenCow said:
Well, NTFS is a closed and complex filesystem. There are tools/modules that support NTFS, but those will be hard to use from DriveDroid since they are native (depending on arm/x86). Implementing it myself in Java is quite an undertaking.
You can just format a blank disk through Windows with any filesystem you want. This is what I've done to get a Windows install disk running from DriveDroid: http://softwarebakery.com/windows-install-on-drivedroid
What I'm working on atm is support for true CDROM emulation. It should allow you to use all ISOs as-is, since the bios/OS sees the device as a normal CDROM drive. This way you don't have to convert the ISO to a format that is compatible with USB (so formatting with NTFS will not be needed). The problem is that this requires a kernel patch to allow DriveDroid to enable CDROM emulation and another patch to fix a incompatibility that caused BIOSes to not recognize the CDROM drive correctly. This patch was just accepted 4 days ago for CyanogenMods kernel for the i9000.
When I've added support for this in DriveDroids menus, I can try to apply the patches to kernels of other devices, let some people test the kernel and submit the patches to CyanogenMod. Hopefully the more popular devices can get support for true CDROM emulation that way. It *should* be better than letting DriveDroid format images if it all works as planned.
Click to expand...
Click to collapse
Phenomenal idea, my friend ... Very good indeed!
I asked about NTFS disk size for Windows 8 is greater than 4 GB, making it impossible to use in DriveDroid since he only accepts partitioning Fat (3999MB).
One suggestion, why not create an official thread on XDA here the program to provide support or get help with other people?
Your program is VERY helpful and make sure the buy!
Thank you immensely!

Yes, FAT32 isn't great. I've formatted my external SDcard with ext4, so I can put Windows 8 on it (installed my PC with DriveDroid+UEFI recently). Problem with this approach (on CyanogenMod at least) is that it doesn't automatically mount the SDcard anymore, so I have to go to the terminal to mount the filesystem agian after every boot of the phone. Not ideal, but could be a workaround for you too.
Well, I'm not familiar with posting on xda, what subforum do you suggest to post in?

FrozenCow said:
Yes, FAT32 isn't great. I've formatted my external SDcard with ext4, so I can put Windows 8 on it (installed my PC with DriveDroid+UEFI recently). Problem with this approach (on CyanogenMod at least) is that it doesn't automatically mount the SDcard anymore, so I have to go to the terminal to mount the filesystem agian after every boot of the phone. Not ideal, but could be a workaround for you too.
Well, I'm not familiar with posting on xda, what subforum do you suggest to post in?
Click to expand...
Click to collapse
Well, I recommend that you create a new topic in this link> http://forum.xda-developers.com/forumdisplay.php?f=530 explaining about the program and inviting staff to test it and help in its development. There's plenty of people here who will be able to help you in major problems and suggest possible solutions.
Any questions, see some other topic to understand more or less how it works, but it is easy, do not worry!
When you create, post the link here for me to put on the favorite and follow!
Good luck friend

Hi im using drivedroid since today (Samsung GT-I9000B) and its great but it doesnt work with ISOs i donwloaded (xmbcubuntu and geexbox from the download option) when i selected the iso it doenst mark it as mounted and i cant see it on the pc .
Althougt on the background it does seems to work, here a logcat :
drivedroid: > (echo "" > "/sys/devices/platform/s3c-usbgadget/gadget/lun1/file"); ERROR=$?; echo; echo "###$ERROR"
drivedroid: <
drivedroid: < ###0
drivedroid: > (cat "/sys/devices/platform/s3c-usbgadget/gadget/lun1/file"); ERROR=$?; echo; echo "###$ERROR"
drivedroid: <
drivedroid: < ###0
drivedroid: > exit
drivedroid: > (echo 0 > "/sys/devices/platform/s3c-usbgadget/gadget/lun1/ro"); ERROR=$?; echo; echo "###$ERROR"
drivedroid: <
drivedroid: < ###0
drivedroid: > exit
drivedroid: > (echo "/emmc/images/geexbox-3.0-i386.iso" > "/sys/devices/platform/s3c-usbgadget/gadget/lun1/file"); ERROR=$?; echo; echo "###$ERROR"
drivedroid: <
drivedroid: < ###0
drivedroid: > (cat "/sys/devices/platform/s3c-usbgadget/gadget/lun1/file"); ERROR=$?; echo; echo "###$ERROR"
drivedroid: < /storage/sdcard1/images/geexbox-3.0-i386.iso
drivedroid: <
drivedroid: < ###0
drivedroid: > exit
drivedroid: > (getprop sys.usb.config); ERROR=$?; echo; echo "###$ERROR"
drivedroid: < mass_storage,adb
drivedroid: <
drivedroid: < ###0
drivedroid: > exit
So for what i understand should have worked but the usb icon doesnt change and on the Pc i cant see it
But not all is lost , i add the 'images' of /sdcard and /emmc ( pionting to /dev/block/vold/179:X ) and that worked ok so now i can mount and unmount sdcard and emmc at will ,usb icon on app show ok for this
¿what can i be doing wrong? i suppose that the iso i downloaded (from the app itself) are on the right format or not? i will be doing some check on the ISOs later (im at work right now)
Thanks for your work!
FrozenCow said:
What I'm working on atm is support for true CDROM emulation. It should allow you to use all ISOs as-is, since the bios/OS sees the device as a normal CDROM drive. This way you don't have to convert the ISO to a format that is compatible with USB (so formatting with NTFS will not be needed). The problem is that this requires a kernel patch to allow DriveDroid to enable CDROM emulation and another patch to fix a incompatibility that caused BIOSes to not recognize the CDROM drive correctly. This patch was just accepted 4 days ago for CyanogenMods kernel for the i9000.
When I've added support for this in DriveDroids menus, I can try to apply the patches to kernels of other devices, let some people test the kernel and submit the patches to CyanogenMod. Hopefully the more popular devices can get support for true CDROM emulation that way. It *should* be better than letting DriveDroid format images if it all works as planned.
Click to expand...
Click to collapse

Verizon Galaxy Note II
Hello,
I'm trying to use this with the stock, deodexed, rooted ROM for my Verizon Galaxy Note II. I tried disabling/reenabling UMS, rebooting the device, the SGS3 Easy UMS app to no avail.
I have a BIOS password set on my laptop, that actually may/may not be helping as it pauses there for a bit while I type the password. This should allow me to do whatever steps necessary on the phone to make this work.
Any suggestions?
PS - I just downloaded the latest CM10.1 nightly to check to see if this helps at all.

Author?????

Related

[APP][02/26] Nook Color USB Mass Storage utility - Mount any partition to your PC

I've compiled a simple app to be able to easily mount to your PC any given partition.
Feel free to donate if this app is of any use to you. Much appreciated.
Please note that changes to the drive will not be saved if you do not properly unmount/eject the drive from PC (in Ubuntu: right click, unmount. In Windows, eject.).
For those using stock browser, apk files often fail to download.. You can install Astro explorer and activate downloads in settings (last option). Then you should be able to download this file.
Dolphin should work without issues..
This is a Beta release.
This requires a working root (su). By that I mean your nook must be rooted. Regarding HC, see j4mm3r's thread.
This can be used, for example, to open your SD or internal data on your PC..
You can mount pretty much any partition to your computer with this app:
- SD
- Media (internal drive for your media and documents...)
- SD Partitions (up to 4)
- Internal storage - BE VERY CAREFUL WITH THIS!!
There are two "mount points" on the nook (lun0 and lun1)
So you can simultanously mount two partitons.
As an example, you can mount SD on 1st and MEDIA on the 2nd.
Each mount point has it's own tab.
Please try it out and post feedback.
Thank you.
EDIT (13.02.2011):
This has been tested on HoneyComb and Froyo (not in Eclair 1.0>1.1).
In Froyo: USB Mass Storage (Notification bar) should be turned off.
Compatibility mode will need to be disabled in Spare parts (reboot required).
If this doesn't work for you, try entering manually in ADB while NC plugged in to your PC:
Code:
adb shell
echo /dev/block/mmcblk0p8 > /sys/devices/platform/usb_mass_storage/lun0/file
And post result here.
Sam
----------------
UPDATES:
13-02-2011: 0.2b => minor bugs and made app scrollable for Froyo Landscape
26-02-2011: 0.3b:
- Changed 'settings' label (mistake) to system.
- Added a "Make sure you properly unmount/eject drive from PC when finished" message when mounting.
- Added dual boot system and data (p9 and p10).
- Changed 'Confirm mounting' to 'Confirm', as poster suggested. Thanks.
--------------
Hmm can't quite seen to get it to work right. The app does nothing for me when I select a partition to mount. I can get the SD card mounted via android's USB connected notification. I've tried the app with it turned on and off. It's got super user, so that's not it. By the way, I'm running Froyo 6.7 off the eMMC. Let me know what to try.
EDIT: Got it to work after running the ADB command in 1st post. Awesome app, thanks.
Sam,
Thank You, you program made my day. It works great, I have been messing with vold.fstab for days and I could only mount the boot of my sdcard. So, I went with manually pushing file to /sys/devices/platform/usb_mass_storage/luno/file which worked but your app make the process much better.
Again Thank you for everything you have done.
Biz
Could this work as a Xbox media storage? I want to get a new demo, and I got no Hard Drive
Works great!
this is great! i was thinking (since your help in the other thread) about trying to cobble something like this together myself in android app creator suite but didnt know if i could manage or not. Now i dont need to even try! thank!
EDIT: 2 things, one, is it possible to have this setting survive a reboot? and secondly, is the display supposed to be tiny? it only fills like a third of the screen and is centered at the top. this is on emmc froyo 0.6.7 the screen is scrollable as you said so just have to scroll down for the confirmed button
Does it unmount them on the nook when they are attached to the PC? I was playing with the echo command and it seems that the nook is unable to see any changes to the filesystem. I wrote a script that unmount them then runs the echo statement. Then another script that remount them once they are disconnected.
Good question. As I said, this is beta. I'm open to any suggestion. From what I tested, changes did actually occur even when mounted on android..
Unchecked compatibility mode in spare parts and reboot for fullscreen..
Sent from my HTC Desire using XDA App
samuelhalff said:
Good question. As I said, this is beta. I'm open to any suggestion. From what I tested, changes did actually occur even when mounted on android..
Unchecked compatibility mode in spare parts and reboot for fullscreen..
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
you did say that huh... sorry
This provided an easier way to fix root (SU binary) to make SuperUser work again on HC.
Glad it helped.
Over 100 downloads and very few feedbacks...
Sam
Sent from my HTC Desire using XDA App
samuelhalff said:
Over 100 downloads and very few feedbacks...
Click to expand...
Click to collapse
Interesting. I did see that if you try to download / install directly from the HC browser it doesn't work. Perhaps people do this instead of trying with their computer and assume it doesn't work? Downloads don't equal successful installs.
For Windows users, it (currently) provides the only way to mount the 4th partition of my HC SD card. Am I mistaken? Perhaps others don't realize what this is or are put off by the UI?
Keep it up. This is a much needed utility ATM.
The UI isn't THAT awful, is it?
Anyway, this can help a lot of people, especially the ones not too familiar with ADB..
Sam
Sent from my HTC Desire using XDA App
samuelhalff said:
The UI isn't THAT awful, is it?
Anyway, this can help a lot of people, especially the ones not too familiar with ADB.
Click to expand...
Click to collapse
To a person familar with partitions and the android file system it's fine. To those expecting a more fruity / friendly UI, it's far from it. However, you can't please everyone and it might be a waste of your energy to try. It's practical / functional and that's all I need it to be.
Indeed it can, much preferred over ADB even though I can use it just fine. You might want to make it more clear in the OP that users that have problems may need to type "adb shell" before the echo command. Not everyone will know this.
You app works well Sam! I can finally access my media partition via USB. I am looking forward to updates. Perhaps retaining setting after a reboot? Great work man!
Works great! I downloaded it with dolphin browser (running froyo on emmc) Then used root explorer to navigate to downloads and just clicked to install. Doesn't get any easier than that!
Would it be possible to have it mount media partitions? Like if I have dual boot setup would it be possible to mount the extra partitions to edit them?
Which media partitions?
Right, forgot about dual booters.. I'll implement that in 0.3..
Thanks.
Sent from my HTC Desire using XDA App
I want to thank you so much for this samuelhalff. I mean it. Something like this that may seem trivial to someone who can just do it means a WORLD to someone like me and i truly truly appreciate it. The devs/peeps here have made my little wanna be ereader ((hehe)) a great honeycomb tablet. I think its great for someone that cant afford the next great thing **xoom** to be able to join in the tech fun. You all have made me very happy with my little tablet.
Jamie.
Love the app!!!! but i got a issue now... There is no way for me to browse the media partition on the device... so I can not access my pictures that I placed on the internal storage...any insight?
Working great for me, HC on eMMC. Appreciate it!

[DEV] Ubuntu 11.10 for A43/A101 [RELEASE 1]

Last summer I got Ubuntu 11.04 working on my A43 but didn't post anything about it. With the progress made on kexec and the new kboot bootloader, it is now possible to have multiple kernels for multiple OS'es. This means it just got a whole lot easier to boot Ubuntu without losing the ability to run OpenAOS or UrukDroid Android OS'es.
As far as I'm aware, Ubuntu doesn't work on the 2.6.29-omap1 kernel that Archos uses and is the base for most other development on gen8. However, for A43 and A101 users, OpenAOS member Nicktime made some headway in porting the 2.6.37+ kernel to gen8, but appears to have abandoned the project. I've cloned his repository and have been working to add features that he did not finish implementing. However, his kernel did have the ability to boot an Ubuntu rootfs and it works very well for desktop Linux distributions (this also works on Debian and I would assume other ARM distros as well).
As I have been unable to build an Ubuntu 11.10 rootfs using the rootstock method that Ubuntu describes here, I've started working with the HP TouchPadBuntu rootfs from this thread. This rootfs boots well on my TouchPad and I've removed the TP-specific items from it and added the gen8 items as necessary. The display is working and the touchscreen works as well (calibrated correctly as I copied my calibration from my 11.04 install). It boots into Unity 2D which is the default. I'm having issues getting the wl1271 wireless module up, I have had it running once but NetworkManager said device was not ready despite being able to iwlist scan and see a list of AP's and then connect to them manually.
RELEASE 1
You will need the rootfs and the modifications.
To install, mount your destination partition (should be at least 4GB and ext3 formatted) to a location, then run the following:
Code:
cd /media/UbuntuPartition (change this to wherever your Ubuntu partition is mounted)
tar xzf /path/to/TouchPadBuntuRootfs.tgz ./
tar xzf /path/to/Gen8Modifications.tar.gz ./
If you do not have a microSD card in the slot, you need to edit the file etc/fstab and change anything mmcblk1 to mmcblk0, this is because the SD card will identify as mmcblk0 if it exists, but if it does not exist then the internal storage gets identified as mmcblk0 instead. This is a kernel issue I have yet to find a solution to.
Kernels for Release 1
These boot from partition 3 of internal memory (/dev/mmcblk2p3)
Normal and Rotated 90 Degrees
This boots from partition 1 of external sdcard (/dev/mmcblk0p1)
Normal
These files do not need an initramfs, but to flash to device or to use with kboot you need one anyways. Simply create an empty (0 byte) file named 'initramfs.cpio.gz' and use it for this purpose.
INFO ON KERNEL MMC/SD INITIALIZATION
mmc0 (mmcblk0pX) - Micro SD card
mmc1 (mmcblk1pX, mmcblk2pX) - System and Data blocks of internal memory
mmc2 - wl1271 SDIO interface
I installed the rootfs to an 8GB microSD and boot it using root=/dev/mmcblk0p1 on the kernel command line.
USEFUL LINKS
http://dev.openaos.org/wiki/Gen8Linux2.6.37
https://github.com/CalcProgrammer1/archos-gen8-kernel-2.6.37
http://forum.xda-developers.com/showthread.php?t=1304475
http://www.omappedia.org/wiki/OMAP_WiLink_Connectivity_Home
http://www.omappedia.org/wiki/MAC802.11_based_Wilink
TIPS AND TRICKS
Disk Usage Power LED:
It is possible to make the Power LED function as a disk usage LED. This will let you know when the system is reading or writing to the memory and can be incredibly helpful in determining whether your system has locked up or is just being slow.
Simply write "mmc0" or "mmc1" (depending on what interface you wish to monitor) to:
/sys/class/leds/power/trigger (maybe power_led can't remember)
This can be changed in the kernel source in the file "archos-leds.c" as well if you want it to apply during boot time.
Charging the battery on A43:
(as root)
echo 1 > /sys/devices/platform/battery/usb_online
echo 3 > /sys/devices/platform/battery/charge_level
Enabling WiFi:
The wl1271 driver from linux-wireless requires firmware files to be placed in /lib/firmware. These files can be downloaded from here. The MAC address on the wl1271 is not stored on the actual wireless chip and instead resides in a configuration file on the system data directory in a file called system/persist.archos.WIFI_mac. This file is in the form:
Code:
Wifi MAC XX:XX:XX:XX:XX:XX
To extract just the MAC address, use
Code:
cut -f3 -d" " /media/data/system/persist.archos.WIFI_mac
Then, to set the MAC of the actual device you can do
Code:
ifconfig wlan0 hw ether `cut -f3 -d" " /media/data/system/persist.archos.WIFI_mac
ifconfig wlan0 up
I'm doing this in /etc/rc.local which is run on boot. This means the WiFi card is prepared when the system boots. However, NetworkManager still sees the card as "not ready" and you must Disable Networking and then Enable Networking before it will start showing AP's. After doing this, the WiFi works properly.
Screen Rotation:
The A43's display is 480x854 ("tall screen" orientation). For Ubuntu it is likely more useful to have a widescreen 854x480 orientation. Fortunately, this is not hard. It involves adding two parameters to your kernel's command line (either via kboot or by adding them to .config and recompiling your kernel). THIS DOES NOT ROTATE THE TOUCHSCREEN INPUT, so make sure you have an alternate input device when using rotation (BT keyboard/mouse, USB keyboard/mouse).
Code:
omapfb.vrfb=y omapfb.rotate=1
Enabling Audio:
This is pretty easy. Audio is installed and ready to go, the only issue is that the default settings in the mixer for this chip happen to disable the output entirely. To fix this, open ALSA Mixer (alsamixer) and turn on either speakers or headphones, then turn on Left Mixer and Right Mixer (hit 'M' to unmute/mute a channel). Finally, turn up the 'PCM' volume and start playing music. I recommend getting rid of Pulse Audio, but I'm still trying to figure out the best way to do so as it uses a lot of resources and provides little benefit.
PowerVR SGX 530 GPU:
The OMAP 3630 CPU has an on-board PowerVR SGX 530 graphics processor. TI provides an SDK that contains the userspace driver libraries as well as the open-source kernel drivers. There are three modules that must be built (pvrsrvkm.ko, omaplfb.ko, bufferclass_ti.ko) and loaded into the system. Then the userspace stuff must be installed. There is information here that should help. So far I've got the drivers to compile, but they aren't properly loading yet. More work to be done on getting the modules to work.
RC.LOCAL START-UP SCRIPT
This script should enable everything at boot time and should make Ubuntu easier to use on gen8 tablets. It starts WiFi and Bluetooth as well as enables USB charging.
Code:
#!/bin/sh -e
#
# rc.local
#
#MAC_ADDRESS='00:22:33:44:55:66'
MAC_ADDRESS=`cut -f3 -d" " /media/data/system/persist.archos.WIFI_mac`
ifconfig wlan0 hw ether $MAC_ADDRESS
ifconfig wlan0 up
modprobe btwilink
sleep 10
hciattach /dev/ttyS0 texas 3000000
/etc/init.d/network-manager restart
echo 1 > /sys/devices/platform/battery/usb_online
echo 3 > /sys/devices/platform/battery/charge_level
exit 0
You must have /media/data mounted in your /etc/fstab file, the entry should look like this:
Code:
/dev/mmcblk1p4 /media/data ext3 defaults 0 0
If this entry isn't in /etc/fstab, the /media/data partition will not be available at the time rc.local is run, and it will fail trying to read the MAC address. Alternatively, you can uncomment the hard-coded MAC address and use that but it's not as clean.
First off, Thanks for the effort you've put in, I just cant wait to get this up and running on my 101. Hopefully I'll have some time this weekend to sort it out but I've questions, How well does it perform? Is unity actually working? & have you tried any other distros? The reason i ask is because i was gonna buy a linux tab running plasma active but if i could eventually run it reasonably well on my 101 i'd hold out and save a couple.
Cheers again and nice work.
It runs fairly well. Unity works (2D only at the moment, not 3D), but whether that's a good thing or not I'll leave up to you (personally I don't like the Unity interface at all, and I find it slow when in 2D mode). I have GNOME 3.0 Fallback installed which runs pretty smooth and fast as it is fairly lightweight. You can use any non-3D-accelerated interface at the moment (Xfce, fluxbox, LXDE, MATE/GNOME2, etc). I've heard of people running plasma active on other non-accelerated systems (including the HP TouchPad, which is where I got my starting image). I haven't bothered as I prefer a traditional desktop-style interface.
That said, if you're willing to test I'd love feedback on how this performs on A101. I don't have an A101 and I am not sure of the status of A101 support. I'm taking Nicktime's word for it that the kernel supports A101. The actual Ubuntu image should be pretty independent of the device but the kernel needs to specifically support each individual board.
To start I'd just download the TouchPadBuntu rootfs I posted (which despite its name doesn't have anything TouchPad related in it and should at very least boot to login screen on the Archos 2.6.37 kernel without modifications). I'll hopefully get a package of modifications up soon including drivers for WiFi, Bluetooth, and a script to get everything running properly at boot.
As for 3D acceleration, I think it should be possible. There are apparently user-space drivers for OMAP3 that will work under Ubuntu. The bigger issue is getting a version of Compiz/Unity3D/Gnome Shell/whatever accelerated desktop you prefer that is compile for OpenGL ES.
Hey dude, could you give me some instructions as to how you installed the roofs.tgz to the memory card? I've got the new boot loader installed and I'm mad to get this going this weekend. Cheers in advance.
P.s. if there is a link to a tut for it that'd be excellent because I don't mind searching for myself just couldn't find any info on it. Thanks.
EDIT:
First post updated, see it for full installation details and feel free to post any questions or problems you have during or after installation. I really want to know how well this plays on A101 devices, as I don't have one to test with. Also, anyone with kernel experience that wants to take on adding additional devices, go for it! It would be great to get A70 support at least, as that is a popular device that has seen Debian/Angstrom activity in the past.
I tar'd the files to the sdcard, created a folder inside OS called ubuntu and placed the zimage & intramfs inside but it wont boot? I probably missed something so feel free to tear me one .
Wasn't even thinking...Duh...the kernels provided assume the root device is /dev/mmcblk2p3 (my Ubuntu partition on internal SD card). You probably want /dev/mmcblk0p1 (first partition on external SD card). I'll build a new kernel and post it soon, or you can take a shot at compiling your own kernel (my GitHub sources need work, for now I'd go with Nicktime's sources at Gitorious as I realized I broke some things).
Kboot should have a cmdline option where you can specify a kernel command line (and thus a root device) but I couldn't get it to work. To clarify, you ARE seeing the kernel boot messages right? If you aren't then kboot probably isn't set up correctly. Try booting another kernel (such as OpenAOS boot menu) from kboot and see if that works.
EDIT: here
CalcProgrammer1 said:
As for 3D acceleration, I think it should be possible. There are apparently user-space drivers for OMAP3 that will work under Ubuntu. The bigger issue is getting a version of Compiz/Unity3D/Gnome Shell/whatever accelerated desktop you prefer that is compile for OpenGL ES.
Click to expand...
Click to collapse
I know they
http://www.linaro.org/
are working on the Open GL ES port of Unity 3D.
Maybe u can find some sources there
And KDE should also have a builf of KDE Plasma wiht OpenGL ES.
Maybe you could add it? would be awesome.
Archos 70
Does/Will this work on the Archos 70? I'm trying to get it working but all I'm getting is static on my screen when Kboot tries to boot Ubuntu. This could be my fault and I could have just messed up the installation but I don't think so.
Thoughts?
shrewdlove said:
Does/Will this work on the Archos 70? I'm trying to get it working but all I'm getting is static on my screen when Kboot tries to boot Ubuntu. This could be my fault and I could have just messed up the installation but I don't think so.
Thoughts?
Click to expand...
Click to collapse
If you read the first post, you will see that this currently only works with A43 and A101. This is due to the kernel I'm using, which was ported by an OpenAOS user who hasn't been active in 6 months. Chances of him resuming his project are slim, so I've forked his kernel progress but don't have an A70 to work with. I could attempt to add A70 support to the kernel but I would be blind to the progress and would need testers. There aren't a ton of changes necessary, mainly just need to add the right LCD driver to make the screen work and then update the board file with the changes that have been made to the A43/A101 boards.
Unfortunately, I don't have much time as of late, I've got a senior design project and school work to deal with, plus I've been working on getting CM9 ICS to compile for gen8, and I've also been working on the HP TouchPad Ubuntu port. Adding A70 support to the kernel is low priority for me, but if any A70 owners want to take a stab at the kernel go right ahead, I'll gladly accept changes to the kernel. As far as Gen8 Ubuntu is concerned, my current focus is getting the SGX GPU up and running with TI's Graphics SDK. If successful, this GPU should be able to run hardware-accelerated Unity 3D and Compiz for a fast, fancy desktop experience.
shrewdlove said:
Does/Will this work on the Archos 70? I'm trying to get it working but all I'm getting is static on my screen when Kboot tries to boot Ubuntu. This could be my fault and I could have just messed up the installation but I don't think so.
Thoughts?
Click to expand...
Click to collapse
I've the exact same problem with my 101, at first I thought it was an issue with kboot but its able to boot uruk and bull. Every time I choose to run ubuntu it stalls with a static on the screen and I have to force a re-boot. I'm using a 2GB sd with only one partition if thats any help and the zimage in question is the one for boot from sd.
Any input?
Oh! Just looked at my kernel configuration again and I forgot to enable A101 support in the configuration file. I'll build a new kernel later today with A101 support enabled! Sorry about that. Should fix A101 but A70 still needs some real work before it will be supported.
EDIT:
Here it is
http://www.box.com/s/18d0e43877b5877ce79f
CalcProgrammer1 said:
Oh! Just looked at my kernel configuration again and I forgot to enable A101 support in the configuration file. I'll build a new kernel later today with A101 support enabled! Sorry about that. Should fix A101 but A70 still needs some real work before it will be supported.
Click to expand...
Click to collapse
Dude, don't apologize. I, and this community, appreciate what your doing. I'd love to have the knowledge to compile my own kernel and have a fully functional distro on this device, but I don't yet have that ability. You do, so any time you give up your time and effort to provide us with something new and cool is fricking brilliant. Keep working and let us know how you get on, but don't cause yourself too much hassle.
Thanks.
I've updated my previous post with an image with A101 support included. I have no way to test it. If any A101 users could take a short video or picture of the device booting Ubuntu I would like to see how it works on that device. I've also looked a bit into A70 support and it looks like the necessary modifications would be relatively straightforward, seeing as all the gen8's have essentially the same core hardware (OMAP3, Wolfson Audio, WL1271 WiFi/BT, MicroSD, POWER/VOL+/-, Power LED, etc). The primary difference (and probably most significant code change required) is the LCD panel, but seeing how the A43 got the short end of the stick on this one, the A70 should be easier to port (A43 has a DSI-interfaced serial LCD while the other gen8's have a DPI parallel LCD, DSI support is flaky at best in this kernel release).
Managed to get it to boot to ubuntu login screen but my usb keyboard doesnt get picked up, I dont know if the touch screen should register at this point but for me it doesnt. I've no bt keyboard but I can't see the device when I scan for bt from my phone either. If you want, I can take a vid of it booting to this point and send it to you. Just in case I get it to work, what are the login details (password) ?
The login is ubuntu/ubuntu (user/pass). I haven't tested the USB yet, and I'm not sure how the A101's host port is set up (the A43 supports USB OTG host but has no dedicated host port). It is a kernel issue for sure. As for the touchscreen, the A101 I think uses a USB touchscreen, so again with the USB issue. You can try forcing automatic login by modifying one of the files on the rootfs (would have to look up which one, can't remember, but should be possible). The fact that it boots is great and the fact that the panel works is also great. I'll look into USB host some more when I get a chance.
Cheers for getting back to me. Is there anyway we can pull something from either the bodhi image or android itself? or would it have to be changed at the kernel?
Pretty sure this is kernel level, the USB driver is being compiled differently than on the stock kernel (musb_hdrc should be a module, but this kernel it is built in, preventing you from loading in different modes). I booted up my A43 with a USB mouse attached, the kernel detected the mouse but then disconnected it before it could be used.

[Kernel][Patch] Virtual CD support

This is a patch to the stock 4.2.2 kernel that allows the phone to become a virtual CD drive.
Often, due to being the resident 'expert' around here I carry around an iOdd so I can install things like Windows from CD without having a bag full of windows CDs around. I thought it would be great if my phone could do this.. this is the result.
This functionality already exists in part the in kernel, but wasn't enabled and a bit buggy.
This patch only affects a single file (that doesn't look like it's changed for years) so should apply to just about any kernel, in theory.
1. Bring the cdrom flag into userspace via sysfs.
2. Implement the raw READ CD command
3. Implement raw READ TOC commands & respond to the old sff8020i request format.
I've built a boot.img from the stock 4.2.2 - there are no other changes to the kernel (I'm not really planning on maintaining another kernel - there's better people than me doing that already).
Also I've provided a GUI app to handle the mount/unmount. That will also support hard drive images (those work on unpatched kernels, so an image of a USB thumb drive should work).
Known bugs:
1. Sometimes Windows loses track of MTP after you unmount the disk (I disable it during emulation as the Win drivers really hate them being enabled at the same time). Toggling between PTP/MTP again resets it.
2. The currently mounted image doesn't always show in the app. This appears to be a kernel bug (it loses the name randomly) but is harmless.
boot-cdrom-4.2.2.img -- Compiled boot.img
cdrom.diff -- Diff file
VirtualDrive.apk -- GUI app
thank you gonna try
This looks like a really cool feature to have.
Thanks man! Now if the N4 only came with larger storage..
Is this the same thing as drive droid on the play store essentially? I've been using that to boot from my phone flawlessly so far.
Sent from my Nexus 4 using xda app-developers app
Can I just switch out the file and reboot and keep my current kernel... I see no reason why not but wanted to make sure
Sent from my Nexus 4 using xda premium
I'm the developer of DriveDroid and I was also working on something similar for a i9000 based on CyanogenMods kernel:
* cdrom option for each lun: http s://github.com/FrozenCow/android_kernel_samsung_aries/commit/a66d37b4ce5c8e1dd9231f478575a22a6c3294a4
* 2048 blocksize for cdrom luns (based on a patched from mailinglist in 2009): http s://github.com/FrozenCow/android_kernel_samsung_aries/commit/7f43f35bc6fd2b7eeee9e4051c1acf3f25462379
I see you have solved the problem a fair bit more sophisticated and likely more correct than what I did. I don't have much experience with kernel development, so could you explain your solution in a bit more detail?
I'd really like this (or similar) patch to be in the kernels of the most popular devices, so everyone can have cdrom support on their phone and DriveDroid can make use of that. Best would be to try to apply it to CyanogenMod kernels or even the official Android kernel.
(I may not post external links :-/, sorry for that)
Very useful patch, indeed!
I even ported an ancient mkisofs for that matter, to make iso images from /sdcard subdirs on the fly. Here's the trivial app I use, complete with the sources if somebody would care to write a non-hellowordish one (mkisofs itself is in libs/armeabi/libmkisofs.so to make everything simple).
Wonder why the kernel mainline is lacking such code for years?

[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!

Boot Bios - how to [Android]

hi folks, thanks to @joesnose we can now enter the yoga book's bios/uefi. you might say 'thank you' to him for this!!!
more about his tries can be found here: https://forum.xda-developers.com/thi...ncept-t3565366
to do so just follow the following steps:
1. start adb shell
2. type the following commands
(alternatively you can also enter the commands in TWRP's terminal)
Code:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
Code:
printf "\x07\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00" > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
Code:
reboot
!!!as always, be very careful what you do in the bios - the chance for creating a stylish and expensive chopping board is quite high!!!
unfortunately, it seems like you always have to type those commands to enter the bios.
danjac said:
hi folks, thanks to @joesnose we can now enter the yoga book's bios/uefi. you might say 'thank you' to him for this!!!
more about his tries can be found here: https://forum.xda-developers.com/thi...ncept-t3565366
to do so just follow the following steps:
1. boot twrp
2. go to advanced and open the terminal
3. type the following commands
Code:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
Code:
printf "\x07\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\ x00" > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
Code:
reboot
!!!as always, be very careful what you do in the bios - the chance for creating a stylish and expensive chopping board is quite high!!!
unfortunately, it seems like you always have to type those commands to enter the bios.
Click to expand...
Click to collapse
About entering the bios. On my YT3P after entering this command just once I am then able to boot bios from twrp reboot screen. This is not working for you danjac?
Also if you make the changes in the bios to get usb keyboard working you can also disable fast boot which allows you to press f7 at boot which allows entry to bios. gets you to boot device selection and pressing esc will take you to other bios options.
And everyone should give thanks to @danjac for trying this on the yogabook.
Sent from my Nexus 6P using Tapatalk
really tnx @danjac , helpful i will try this later
how ever did you flash twrp as your default recovey?
Code:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
Code:
printf "\x07\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\ x00" > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
Code:
reboot
Not working for me (Yoga book android WiFi only).
What means printf symbols? Unicode characters? If yes, space between "\x00\ x00" is needed?
I tried to insert commands three times, and tried to use "Reboot BIOS" in TWRP. No profit. Device booting in android.
razielvamp said:
Code:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
Code:
printf "\x07\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\ x00" > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
Code:
reboot
Not working for me (Yoga book android WiFi only).
What means printf symbols? Unicode characters? If yes, space between "\x00\ x00" is needed?
I tried to insert commands three times, and tried to use "Reboot BIOS" in TWRP. No profit. Device booting in android.
Click to expand...
Click to collapse
try entering commands from adb shell with tablet on android.
Then on your pc copy and paste
printf "\x07\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\ x00" > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
Sent from my Nexus 6P using Tapatalk
razielvamp said:
Code:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
Code:
printf "\x07\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\[COLOR="Red"] x00[/COLOR]" > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
Code:
reboot
Not working for me (Yoga book android WiFi only).
What means printf symbols? Unicode characters? If yes, space between "\x00\ x00" is needed?
I tried to insert commands three times, and tried to use "Reboot BIOS" in TWRP. No profit. Device booting in android.
Click to expand...
Click to collapse
no 'space'!!!!
there is/was one in the original thread (see the last x00) ...so it also was the reason why it didn't work for me from adb shell. presumably i just ignored the space when typing it manually in twrp...
now it also works from pc/adb...
I corrected the OP! thanks for reporting back!
Ok. I get BIOS but OTG keyboard not working. Halo keyboard too.
I can use only vol up, vol down and power buttons. But I need "ESC" button too, in other case I can not escape submenus.
I got!
long press VolUP = return.
But still do not understand how select usb device in boot order. It seems like BIOS not support OTG function, so how can I change for boot from USB drive when it not detected?
razielvamp said:
Ok. I get BIOS but OTG keyboard not working. Halo keyboard too.
I can use only vol up, vol down and power buttons. But I need "ESC" button too, in other case I can not escape submenus.
I got!
long press VolUP = return.
But still do not understand how select usb device in boot order. It seems like BIOS not support OTG function, so how can I change for boot from USB drive when it not detected?
Click to expand...
Click to collapse
Device manager......
System setup........
android.......
Uefi secure BOOT=disable.
South cluster configuration.......
Usb configuration.....
default drd CONFIG=hostmode
Usb VBUS=on.
that's it save changes and exit. Next time you boot to bios you can use keyboard connected via otg to use bios. You can also select next boot device in bios boot manager.
If you want to be able to interupt boot process to select boot device also disable fast boot under boot category in bios . This will mean you get a black screen with progress bar on power on but allows use f7 to select boot device.
After booting another os from usb it often takes 3 boots to get back to android, don't panic.
Sent from my Nexus 6P using Tapatalk
joesnose said:
Device manager......
System setup........
android.......
Uefi secure BOOT=disable.
South cluster configuration.......
Usb configuration.....
default drd CONFIG=hostmode
Usb VBUS=on.
that's it save changes and exit. Next time you boot to bios you can use keyboard connected via otg to use bios. You can also select next boot device in bios boot manager.
If you want to be able to interupt boot process to select boot device also disable fast boot under boot category in bios . This will mean you get a black screen with progress bar on power on but allows use f7 to select boot device.
After booting another os from usb it often takes 3 boots to get back to android, don't panic.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
Hello Guys and Girls,
Sorry for my english, which is not my mother tongue.
Just to say that after reading a lot in XDA folder (thanks to the people who provided how to root/use TWRP and access Bios)
I managed to boot from USB key but I have a acpi-bios-error ( no matter what I changed in the bios related to acpi) while intalling windows 10 32/64 bits.
I would like to know if someone met this issue and solved it somehow ?
By any chance, is there someone (who was able to boot to W10) who can tell which software they use to make their usb bootable ?
I gave up for the moment (I spent too much time on it, need to rest lol)
Thank you for reading my post,
Sweetgeex said:
Hello Guys and Girls,
Sorry for my english, which is not my mother tongue.
Just to say that after reading a lot in XDA folder (thanks to the people who provided how to root/use TWRP and access Bios)
I managed to boot from USB key but I have a acpi-bios-error ( no matter what I changed in the bios related to acpi) while intalling windows 10 32/64 bits.
I would like to know if someone met this issue and solved it somehow ?
By any chance, is there someone (who was able to boot to W10) who can tell which software they use to make their usb bootable ?
I gave up for the moment (I spent too much time on it, need to rest lol)
Thank you for reading my post,
Click to expand...
Click to collapse
With windows I always get the acpi bios error! I have tried many bios options but obviously with caution. Always the error. I keep trying with my "win to go" usb stick.
This error is also quite generic so its hard to know what is causing it.
Sent from my Nexus 6P using Tapatalk
Many Thanks for the answer,
I guess this will be a blocking issue for everyone.
I "heard" on other forums that we might need to upgrade the bios, I don't think it will be possible from Android side.
(I saw there is a tool on Lenovo support site)
Sweetgeex said:
Many Thanks for the answer,
I guess this will be a blocking issue for everyone.
I "heard" on other forums that we might need to upgrade the bios, I don't think it will be possible from Android side.
(I saw there is a tool on Lenovo support site)
Click to expand...
Click to collapse
Or possibly the current bios needs dumping and editing to allow "hidden options". I did see some pics during searching of a similar cherry view bios but there was a "select os" option that does not show in mine.
Sent from my Nexus 6P using Tapatalk
joesnose said:
Or possibly the current bios needs dumping and editing to allow "hidden options". I did see some pics during searching of a similar cherry view bios but there was a "select os" option that does not show in mine.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
Wooh, maybe we are almost there !
I guess the time has come to wait and see....
---------- Post added 25th April 2017 at 12:09 AM ---------- Previous post was 24th April 2017 at 11:56 PM ----------
Sweetgeex said:
Wooh, maybe we are almost there !
I guess the time has come to wait and see....
Click to expand...
Click to collapse
Just a check, did you go under system-setup >> south cluster configuration >> SCC configuration >> SCC eMMC Support & SCC SD Card Support (internal and SDcard)
here we can set ACPI mode/PCI Mode or disable
I'm afraid that it will remove android, but it might be a key issue.
Sweetgeex said:
Wooh, maybe we are almost there !
I guess the time has come to wait and see....
---------- Post added 25th April 2017 at 12:09 AM ---------- Previous post was 24th April 2017 at 11:56 PM ----------
Just a check, did you go under system-setup >> south cluster configuration >> SCC configuration >> SCC eMMC Support & SCC SD Card Support (internal and SDcard)
here we can set ACPI mode/PCI Mode or disable
I'm afraid that it will remove android, but it might be a key issue.
Click to expand...
Click to collapse
Sorry missed your post there.
I have tried many things in bios so its hard to remember them all. I think i tried pci mode and also disabled.
Also it might be good if people post what they are trying which could be then added to the first post.
And, i was changing one option at a time then reverting the changes after failed boot, there is a possibility that multiple changes are needed.
Sent from my Lenovo YT3-X90F using Tapatalk
No worries,
Are we agreed that if the installation succeed, it will remove android, right ?
Sweetgeex said:
No worries,
Are we agreed that if the installation succeed, it will remove android, right ?
Click to expand...
Click to collapse
agreed.
Like I said I was mostly trying with my "win to go" usb drive. That is a complete win 10 os on a usb stick, boots just fine on other pc's I have.
I would not recommend full install at the moment for two reasons. 1) who knows what kind of driver issues/problems there will be. 2) would returning to android work if whole device was overwritten, losing bootloader etc.
Sent from my Nexus 6P using Tapatalk
Alright, thank for clearing this up.
I guess that for the moment, we need to set the issue with ACPI, I will keep looking to other topics and forums here and there.
If I found anything, I will post it here.
Many thanks for your answers.
Boot with linux??
Good morning, has anyone tried doing this but with any linux distro? i'm not sure which one is compatible with our device
joao1979 said:
Good morning, has anyone tried doing this but with any linux distro? i'm not sure which one is compatible with our device
Click to expand...
Click to collapse
I have booted several versions of linux and android x86 on my yogatab3pro.
Would like to hear your findings.
on yt3p all need the nomodeset flag in order to boot. This of course means no hardware accelleration.
for me no touch , no sound and no hardware accelleration but they will boot.
Oh and there is some cherrytrail targeted distros. One by linuxium and another called xjubutab.
For reference.
https://forum.xda-developers.com/th.../ubuntu-yoga-tab-3-pro-proof-concept-t3565366
Sent from my Nexus 6P using Tapatalk
unfortunately i didn't find anything useful for us but i´ll keep searching for a solution, i don´t know if it´s possible to update or downgrade an android bios (i´m not an expert on this matter)

Categories

Resources