[DEV/WIP] Kexecboot Bootloader for Galaxy Note 3 N900T - Boot Multiple Kernels - T-Mobile Samsung Galaxy Note 3

This is a development thread at the moment. I'm going to start working on porting the kexec-hardboot patches to the N900T (actually CyanogenMod hlte) kernel. With the kexec-hardboot patch applied, the kernel will be able to act as a second stage bootloader and boot other kernels. Combined with the kexecboot program, it can act as a second stage bootloader, allowing you to boot kernels from any storage device without flashing them. Ultimately the goal here is to dual-boot Android and non-Android Linux without having to re-flash kernels constantly. Like with my Note i717 port I will be focusing on kexec first, then getting Debian to boot on the device with the Freedreno graphics driver. The Note 3 is a very powerful ARM device and with Freedreno working it could play many of the 3D FOSS games.
Here is my modified kexecboot that I will be using:
https://github.com/CalcProgrammer1/kexecboot
Here is a video showing how it works on the Note i717 (it will work the same way on the Note 3):
https://www.youtube.com/watch?v=qtb-TSGumNo
My Note i717 thread:
http://forum.xda-developers.com/showthread.php?t=1787856
Here is the kexec-hardboot porting guide I will be using:
https://github.com/Tasssadar/multirom/wiki/Porting-kexec-hardboot
For anyone inclined you could also get MultiROM working with this. I am not familiar with that framework but have used kexecboot many times on many devices in the past, so I am going with that.
EDIT 1: I've got the main patch applied and I've found some numbers for the addresses that I think might work. Everything compiles and I'm able to build a boot.img and flashable zip, but I'm sure it won't work in its current state. The Note 3 uses a DSI command-mode panel which is different than the Note 1's video-mode panel in that it doesn't continuously refresh (i.e. at 60Hz). Instead, screen updates must be forced manually by using an ioctl for the framebuffer device. There are several ways to handle this - I could add this ioctl into kexecboot any time it draws to the screen but this would only work for kexecboot. Alternatively I could write a background program that sits in a 60Hz waiting loop and calls the ioctl repeatedly, simulating a video-mode panel. I've talked to some other people on the #freedreno Freenode IRC channel and the refreshing background program has been done with some success on other devices (2013 Nexus 7) so I think I'll take this route first as it will hopefully let me get a framebuffer console up for debugging with.
EDIT 2: I found a way to make kexecboot refresh the screen. I call the FBIOPAN_DISPLAY ioctl in kexecboot's framebuffer refresh function and that makes the kexecboot GUI appear on screen. Now to figure out how to build a kernel and pack a boot.img.
EDIT 3: I figured out how to make boot images, it requires a device-tree supporting mkimage tool such as this: https://bitbucket.org/itsmikeramsay/mkbootimg/src I was able to build a boot.img with a precompiled kernel and my new ramdisk with kexecboot, it worked enough to show the kexecboot GUI. Now to build my modified kernel into the mix and create a kexec-bootable kernel for CM11.
EDIT 4: I might put the Note 3 kexec on hold for a bit as I clean up the Note 1 and TouchPad port of Debian. I ran into an issue on the Note 1 with Kexec where CM wouldn't mount the internal storage when booted via kexec-hardboot. I still need the Note 3 as my primary phone so I can't hack on it without a backup plan.
EDIT 5: The issue with storage not mounting appears to be related to having an ext-formatted SD card inserted (which is where I keep Debian). Booting without the card inserted works fine. Hopefully the same applies to the Note 3.
EDIT 6: I got the kexecboot kernel builder scripts for the Note 1 up on github now and released the first version of it, so I'm going to look into the Note 3 some more. I didn't realize that the Note 3 uses device tree until I messed with it earlier. I'm not sure if kexec needs to reserve a dtb image for the kernel or not, that could be a major roadblock if so as the patch I ported didn't take device tree into account. I'm not entirely sure how device tree and atags work but somehow they're related apparently, at least in terms of kexec.
EDIT 7: I think I have my build root mostly set up for Note 3. Initial test was a failure, though it did at least attempt to boot my new kernel rather than drop into download mode like my earlier attempts. I need to figure out what device tree stuff is required in order to boot a compiled kernel with the new mkboot tool and then enable fbconsole so I can see when the display changes.
EDIT 8: I think I figured out how to make a dt.img file now for the device tree stuff, but I've found that my ramdisk doesn't work on the stock CM11 kernel binary nor my custom compiled one. It did, however, work when patched into LeanKernel's boot.img (replacing the default ramdisk). This was the result of that: http://i.imgur.com/c2racE1.jpg I may try using the leankernel defconfig as a base instead of the CM11 defconfigs.
EDIT 9: Derp herp derp herp didn't look at the boot partition size...it's 11.0MB. My cm-based boot.img was 12.3MB. Of course that ain't gonna work.
EDIT 10: WOOT! Kernel has booted, xz compression is some wizard level magic, it shaved off like 3MB without changing anything else. Now to reapply the kexec-hardboot stuff and see how it fares.
EDIT 11: I spent some more time looking into kexec-hardboot on the Note 1 (as it's a ton easier to debug since it has a video-mode panel) and figured out how to properly reset it. The important code is in relocate_kernel.S, an assembly function that does the very last wrap-up stuff before rebooting. On the Note I was letting the watchdog timer kick the reset after hanging on an infinite loop, but the Note 3 doesn't seem to have this watchdog in place and will loop endlessly. The important thing to note from this is that relocate_kernel.S uses physical addressing. The Note had a pretty in-depth reboot procedure and it looks like the Note 3 may be a bit simpler. I'll be looking into this soon to see if I can get it rebooting correctly.
EDIT 12: I'm going to use USB serial for debugging instead of messing with the stupid fbconsole. To initialize the USB you need to set up the ID fields in /sys/class/android_usb/android0 and set functions to acm. Then use getty (part of busybox) to open a bash shell on the port with "getty -n -l bash 115200 ttyGS0 linux". Then use minicom or other terminal on PC to connect to the ttyACMx interface.
EDIT 13: I was able to get a working shell through USB and play around with kexec tools directly. It would not boot when I did kexec -e, whether or not I used hardboot or not. I may need to apply a patch to load dtb images for the kexec'd kernel.
EDIT 14: Looks like I'll need to build my own kexec-tools based off the newest release (v2.0.7) which has device tree image support. I'm still looking for a hardboot implementation that uses dtb images.
EDIT 15: I dug through the stack of calls up from machine_kexec to figure out why machine_kexec was never called. It appears that kernel_restart_prepare (kernel/kexec.c, line 1595) might be hanging and keeping the system awake instead of dropping through to machine_kexec() like it should. Since we're rebooting with hardboot anyways it should be reasonably safe to just forget a clean shutdown and cut straight to the machine_kexec() function. The bootloader will reinitialize the hardware anyways. This is hopefully almost the end, as I'm sure my reboot code is being called and it is successfully rebooting. It hasn't booted the new kernel yet but it could be an address issue.
EDIT 16: Something's happening...I think I may be right on the edge of getting it working but not quite there yet. I got it to lock up after rebooting which means that the redirection was successful (redirecting to the kexec kernel instead of the kexec-boot kernel) but the kexec kernel is crashed or something. Probably something to do with device tree. It might require a dt.img passed in or it might require the command line being set.
EDIT 17: I managed to get Tasssadar's MultiROM kexec-tools to build. I talked to XDA user flar2 who had done some work on the HTC One M8 and ran into a similar issue with device tree kernels not booting. He mentioned that there may be some custom device tree entries that aren't being picked up by kexec-tools and gave me a link to a repository to look at. For now, here's my kexec-tools branch based on Tasssadar's work with the fixed-up Makefiles that compile correctly: https://github.com/CalcProgrammer1/kexec-tools/tree/kexec-tools-2.0.2 I will look into this more this weekend or so.
EDIT 18: So the Note 3 kernel doesn't have last_kmsg (RAM console) enabled for some reason, or at least it isn't appearing despite being enabled in config. RAM console shows the dmesg (kernel log) of the previous kernel run so long as the reserved RAM area isn't erased. This is important as it allows viewing any logs left behind by failed-to-boot kexec'd kernels. I'm guessing both the host (kexecboot) and guest kernel will need RAM console to be working for any meaningful debugging. Samsung has all sorts of goofy debug stuff (SEC_DEBUG_) but the RAM console doesn't appear to be part of that.
EDIT 19: After a lot of printk's and a lot of failures I got last_kmsg support working! This means booting a last_kmsg supporting kernel and then rebooting into another last_kmsg supporting kernel will grant you a /proc/last_kmsg file that contains the previous boot's dmesg log. This will be incredibly helpful for kexec testing. For any other kernel devs who want this capability, you need to register a platform_device for ram_console using the start and end addresses already included for the persistent_ram ram_console registration. For some idiot reason it reserves the persistent RAM but it doesn't set up a ram_console device to use said RAM.
EDIT 20: New Tools! With the help of some users in the S4 forum, I have some new debugging tools available to better see what's going on with reboots. First is viewmem (http://blog.maurus.be/2011/01/23/samsung-i9000-irom-dump/) which dumps memory to stdout. The Note 3 kernel has sec_debug which logs boot messages from the bootloader and optionally kernel to address 0x10000008 in memory. Viewmem is able to read this log as well as inspect other memory locations to see if things are where they should be. The other debugging tool is a physical serial port, hidden on the USB data pins. Putting a 615K resistor between GND and the ID pin of the USB connector as well as shorting the VCC and GND pins causes the port to go into serial debug mode on reboot. The D+ and D- pins become TX and RX, and hooking up a 3.3V serial interface (PL2303 USB serial breakout in my case) you can dump bootloader and kernel messages to a PC running a serial console.

cant wait to give it a shot
this sounds amazing for the note 3

sounds like Ubuntu will be coming soon
Cant wait to dual boot AOSP and TW
I'm so proud to be the same t mobile person as you
I take off my hat and bow!
only if I had a bank account I would so donate to you
Just keep doing what your doing
And you will become famous a xda
I will so make this Thread a Newsworthy Thread!

Update 4
Im crying
Well best of luck

Definitely worth waiting for, we'll be here

Robbdreality said:
Definitely worth waiting for, we'll be here
Click to expand...
Click to collapse
+1

I got framebuffer console working on the Note 1 a bit better last night, though it's still not great. I really need to get framebuffer console working on the Note 3 before anything because it makes debugging a whole lot easier. The super-high DPI might become a problem though, the text was already hard to read on the Note 1's 800p screen. This is what I'm looking forward to seeing on the Note 3: http://i.imgur.com/1kmKDOw.jpg

CalcProgrammer1 said:
I got framebuffer console working on the Note 1 a bit better last night, though it's still not great. I really need to get framebuffer console working on the Note 3 before anything because it makes debugging a whole lot easier. The super-high DPI might become a problem though, the text was already hard to read on the Note 1's 800p screen. This is what I'm looking forward to seeing on the Note 3: http://i.imgur.com/1kmKDOw.jpg
Click to expand...
Click to collapse
Same there But ubuntu
What linux is that one

Debian (testing). I chose it over Ubuntu because it works better in a chroot from within Android. Upstart (Ubuntu's init system) doesn't like chroot or running services from in a chroot as well. Ultimately the idea is to be able to use it both as a chroot within Android (to host ssh and samba and such while still being an Android phone) as well as a full blown reboot into Debian system for playing with the GPU and using hardware that Android normally locks. My TouchPad setup is exactly this, where the Debian rootfs is located within Android's data partition as /data/debian and the initramfs init script on my kernel bind-mounts that directory as the root directory before passing over to the Debian init. You could do the same with Ubuntu as well. The biggest issue is the kernel which you can put whatever distro you want on top of.

i wish you all the luck in the world hmm!?! No, ?!? I wish you all the luck in the whole cosmos! @CalcProgrammer1

update 10
im so happy

Agreed, love the progress

Update 11
Keep up the good work

USBhost said:
Update 11
Keep up the good work
Click to expand...
Click to collapse
+1

This is really cool
Sent from my SM-N900T using XDA Free mobile app

iakeco said:
This is really cool
Sent from my SM-N900T using XDA Free mobile app
Click to expand...
Click to collapse
ii there

Update 14, rootin for you

Robbdreality said:
Update 14, rootin for you
Click to expand...
Click to collapse
+1

Robbdreality said:
Update 14, rootin for you
Click to expand...
Click to collapse
Just now root'in? You should've rooted a long time ago! Using Android without root is a nightmare!

CalcProgrammer1 said:
Just now root'in? You should've rooted a long time ago! Using Android without root is a nightmare!
Click to expand...
Click to collapse
I will never get a device without root
The vary day that i got ny N7 i unlocked the bootloader and rooted it lol
But i think he meant something like im cheering for you

Related

[BUILD] **Complete FroYo Bundle** FRX07.1 - Maintenance Release

FRX07.1 is here!!
This is a maintenance release - basically taking the newest components to make a completely up-to-date (as of Sept. 1).
Quite a lot has changed since FRX06 - the install process hasn't really, but be sure to read the changelog in the next post and the caveats in post #3!
<<<This is a link to the... FAQ Click it!!>>>​
I have created a complete bundle of FroYo with a stable kernel from GIT (August 19 / 1348), and rootfs from GIT (Sept. 2).
Please, feel free to DONATE to the XDAndroid project!
Every little bit helps!
Directions:
1. Download the full bundle (zip). (Updated September 1 2011)
If instead you just want the system.ext2 (zip) (Updated July 15 2011) file by itself... Don't download this if you're not sure! Grab the full bundle!
2. Extract it. You’ll see a folder, FRX07.1, copy its contents to the root of your SD card. If you want to run Android from a folder instead of all the files on the root of the card, follow the steps below.
3. Go into the STARTUPS folder. Grab the appropriate startup.txt for your device (if you don't know what device you have, you should read the FAQ), and move it to the root of the card (or where you run haret.exe from. If you want to change the location of the build, put a rel_path= statement in the cmdline section of the startup.txt. Mine is located two folders deep on the SD, so my rel_path=Androids/TP2Ref)
4. Screen calibration - you have three choices:
Re-use an old ts-calibration file if you have it and you know it's good.
Download the ts-calibration.zip file and extract it to where you put the rest of the files (root of SD or in a folder - make sure it all stays together!)
Manually calibrate - boot with no ts-calibration file and watch the boot process - you'll be asked to hit 5 points to calibrate the screen. If you have issues calibrating, try an older kernel (1225 works well) Once you have the calibration file hold on to it (make 15 copies if it's a good one ), reboot & go back to the newest kernel!
6. Run haret.exe.. Profit!
Let it settle out on the first boot. Many have reported they had to reboot basically because it was so slow - if you let it sit for about 10 mins so the media scanner can go thru everything, etc. it will be much more pleasurable experience. If you want adb in and watch the processes via top, you'll see why the phone seems so slow - there's lots of background processes cranking because this is the first boot .
Troubleshooting:
Please read the... FAQ
If you have any issues with the kernel, feel free to change it:
There are some devices that are having issues with the newest kernels. Please see the kernel autobuild service to get archived kernels. Once you download a replacement kernel, go to where you run haret.exe from - remove your old zImage/modules-xxxxx.tar.gz. Take the new zImage/modules-xxxxx.tar.gz and replace the old ones, same folder - where you run haret.exe from. Make sure the ‘zImage’ is named just that. Do not rename the modules file, do not extract it - should be in .tar.gz format.
See Incremental Updates for more information on updating the kernel and other components.
Random issues can often be solved by forcing the system to create a new data.img. If you're worried about losing data (all user data is stored in the data.img!!), Titanium Backup works quite well. If you wish, you can rename the data.img to something else, and let the system create a new one - just to see if it resolves your problem.
Similarly, if you wish try formatting your SD card - I prefer to use the HP Tool - do a full format, FAT32.
Even though this build is considered fairly stable, you are more than likely going to run into issues. The next post will address issues particular to this build - PLEASE READ THESE before asking questions! Feel free to post questions in this thread, I will do my best to address them. Big thanks to stinebd for releasing the system image, and of course the other developers for their hard work on making these kernels available.
Caveats:​
BT - works! But audio doesn't route. See this thread if you're feeling adventurous and want to play with/don't mind using some unstable/incomplete code...
Audio stutters every 10sec. The only fix I've heard is using a kernel from G3rmo (unfortunately it is old), or
Code:
su
kill -9 28
Which kills the [battery] process. I'm sure this will have negative effects on the battery meter/battery life...
SD Card not working...? "Waiting for SD Card" appearing on boot...? Try putting this command in your startup.txt
Code:
msmsdcc_1bit msmsdcc_fmax=14000000 msmsdcc_nopwrsave
See gummbah30's post reminding us of these commands.
SD Card has partitions? (If you used a non-XDAndroid build the answer is YES) Then you need to add "no_partitions" to your startup.txt. Between the quotes on the set cmdline line. Do not put it on its own line, it goes in between the quotes! Make sure there is one space between each item.
Front buttons messed up/wrong? You can use my rootfs which incorporates g3rm0's layout. This custom rootfs is no longer necessary, I have committed the changes so you can use the autobuild rootfs (in conjunction with physkeyboard=blac in your startup.txt)!
Keyboard tiny/unusable? Either change the IME (long press on the input box) Get rid of it! I've heard "Hackers Keyboard" is a good alternative - many options. There's also "Better Keyboard", Swype, etc... Side load the APK using AndroidApps, adb install, etc.
stinebd's Changelog:​
stinebd said:
Here’s a new release for you, folks. This is a major release with a ton of changes, new features, and fixes. Our friend hyc/highlandsun did most of the heavy lifting for this release. Highlights include a rewritten RIL with support for world phones and greatly improved CDMA support; fixes for the media codecs; fixes for MMS on Sprint; increased security with the Superuser app.
A list of changes is included below. The FRX07 system image is available for download now, and will require the use of a new rootfs image, also available now. Additionally, we have a new bundle containing everything needed to enjoy a full FRX07 system.
Note: Due to the incredibly long list of changes, this is a somewhat condensed, terse changelog describing only the overall scope of the changes.
FRX07:
frameworks/base:
Major frameworks changes for CDMA/GSM dual-mode worldphone support. (hyc)
Fixes for data connection handling to improve startup time. (hyc)
Fixes for wifi handling to avoid issues on hanged drivers. (hyc)
Stagefreight (media codecs) fixes. (hyc/viruscrazy)
Fixes for Sprint’s wonky MMS markup structure. (hyc)
Fix MediaScanner not finding audio files (including ringtones) in system.ext2
hardware/libhardware_legacy:
Minor GPS driver fixes. (Alex[sp3dev])
Rename wifi interfaces to wlan0 on all devices (hyc)
hardware/xdandroid-ril: Major RIL refactoring for improved performance on all devices, and added CDMA/GSM dual-mode worldphone support. (hyc)
packages/apps/Gallery3D: Switched back to Gallery3D as the gallery app (closes bug #111)
packages/apps/Mms: Fixes for Sprint’s wonky MMS markup structure. (hyc)
packages/apps/Phone: Fixes for CDMA/GSM dual-mode worldphone support. (hyc)
packages/apps/Superuser: Added the Superuser package for authorizing su privileges. This, along with our signed builds, provides greatly increased security for the end user (mostly against malicious apps from the Market).
system/extras/su: Added as a dependency for the Superuser package
vendor/qcom/android-open: Include missing stagefright codec symbols. (hyc/viruscrazy)
To coincide with the FRX07 system image, the following rootfs changes have been made:
init.froyo.rc modifications...
Adjust wpa_supplicant service for the new abstraction provided by libhardware_legacy, as well as interface rename
Abstract the hciattach service to provide bluetooth support on both chipsets
Rename wifi interface to wlan0 on all devices
apns-conf.xml updated
keymaps completely reorganized, and RHOD end-call keya has been remapped to be the Home key in Android.
default.prop: set ro.secure=1 to lock down the adb shell - su can be used with the Superuser app to authorize root access in adb if needed.
Click to expand...
Click to collapse
Layman's Changelog​
(As in, the changelog I wrote )​
FRX07.1 Changelog:
RHOD - all buttons on the front no longer wake the device. Only the power button wakes the device now.
Updated to the newest RIL
hyc's modified libs for video now baked in - *most* HQ YouTube videos (and other HQ videos) should finally work!
RHOD & TOPA - Userland (Android) now controls the LED by default now. If you need to debug sleep, you will have to change the behavior manually.
Facebook sync should now work, out-of-box.
FRX07 Changelog:
Updated RIL (thanks hyc!) - this covers many different bugs that were in the old RIL - I'm only going to cover the major ones...
CDMA now works correctly (for the most part). force_cdma (and north_am_dialing) is now deprecated (not needed/ignored!)
You can boot with a SIM in on a CDMA device and choose your GSM or CDMA on the fly under Settings.
Location based on towers now works on CDMA.
1xRTT now displays correctly, but I never seem to get EVDO Rev.a... I always get 0. This is represented by a 3g icon, as this is what the Android framework provides.
Full MMS support! Please see this page for configuration instructions. Will need help fleshing out the list of carriers folks!
Spotty service, switching towers, etc should no longer cause the dreaded SoD (Sleep of Death) condition!
(Basic audio) 3.5mm support for RHOD400/500
Droidwall works out of the box now
Keyboard backlight now fades in/out
Gallery3D back in! Picasa Web Sync comes with it
A couple new apps added to AndroidApps folder:
rpierce99's app GetLogs
Titanium Backup
Cool man! Thanks for your work.
Thanks!
Well, in fact WEP works perfectly for me. The only thing that wifi fails is at turning it on after turning it off 2 times...
Also, with latest updates I can pair BT, haven't tried to transfer anything.
Eodun said:
Thanks!
Well, in fact WEP works perfectly for me. The only thing that wifi fails is at turning it on after turning it off 2 times...
Also, with latest updates I can pair BT, haven't tried to transfer anything.
Click to expand...
Click to collapse
Ah, I forget how different the bugs are for the TI chipsets. I'll change it, thanks!
Updated to FRX07! Enjoy!
woo FRX07 - I should really update my blackstone as its running 05 still
It seems that the 20110716 Kernel is giving problem to the Blackstone/Topaz.
you may use the previous kernel, or wait until is fixed.
Brgds
mass storage not connecting......anyone else facing this problem?
welard said:
mass storage not connecting......anyone else facing this problem?
Click to expand...
Click to collapse
USB mass storage has never worked (on looped mounts).
You can kinda fake it with Droid Explorer, it uses ADB to 'fake' USB mass storage.
arrrghhh said:
USB mass storage has never worked (on looped mounts).
You can kinda fake it with Droid Explorer, it uses ADB to 'fake' USB mass storage.
Click to expand...
Click to collapse
ok thanks alot....
Had to use a different kernel as yours wouldnt let it boot up
Working:
installing apps, no fc, its connecting to wifi nicely, only dropped once so far, connected to google account fine, coping nicely with downloading and installing multiple apps!!! i like that the others i have tried freeze up
Defect list:
Power control wigit loads frame but not icons on first load
froze when opening camera the second time had to battery pull! on first load
On restart attempt seemed to load haret ok, boot speed and time impoved compaired to first load, still lightly juddering boot animation
On second boot reloaded power control wigit, now displays correctly
Downloading and installing two apps at once navigating home screens caused 20second freeze up.
As someone said the motions but not the workings for usb connection, i cant get droid explorer to see my device so :-(
BT is reallly messed up using app "bluetooth file transfer", just loops itself to death, killings wi-fi as well, not kwl
Using phones bluetooth in settings, my computer says unable to send blah blah then when i turn off bluetooth the wifi is dropped might be connected
Can i overclock stably with this mod?
How do i get the front facing camera working?
FRX07 with CWM
I just succeeded in starting FRX07 as a CWM build.
But the startup wizard seems to be a little bit crazy. It's my first try to make a CWM build, so no wonder there are problems.
If I really can make a stable build I will post the results here.
alphecca911 said:
Can i overclock stabley with this mod?
How do i get the front facing camera working?
Click to expand...
Click to collapse
I couldn't really follow you post, these were the only questions I could find..
You can overclock - stably, dunno. I don't, so you tell me if you can OC.
Front-facing cam doesn't work, kernel issue not build.
ThaiDai said:
I just succeeded in starting FRX07 as a CWM build.
But the startup wizard seems to be a little bit crazy. It's my first try to make a CWM build, so no wonder there are problems.
If I really can make a stable build I will post the results here.
Click to expand...
Click to collapse
Startup wizard...? There isn't a startup wizard on XDAndroid builds...
yes i am sorry for that, i have just been note taking as i have been instaling and testing in the event that someone came, they could assist. I have it up and running now but it didnt work using ur kernel. (wouldnt boot) i have listed defects so far.
Thankyou for your answers to my questions.
Great rom, best i have tried
alphecca911 said:
yes i am sorry for that, i have just been note taking as i have been instaling and testing in the event that someone came, they could assist. I have it up and running now but it didnt work using ur kernel. (wouldnt boot) i have listed defects so far.
Thankyou for your answers to my questions.
Great rom, best i have tried
Click to expand...
Click to collapse
Hrm. I've heard BLAC doesn't work on the newest kernel... I'll have to ask emwe, he had a list of changes for FRX07 release, but I assumed they were RHOD-only... Perhaps something is effecting BLAC that isn't supposed to be .
I don't have a BLAC, so you'll have to help me - what is the newest kernel that does work? 20110711_082424? Also, how far does it get in the process? If adb is up, logs would be appreciated. Thanks.
Allright I'm running into problems! Haret starts and I get as far as the linux boot animation, but then the phone crashes and reboots... anyone else experiencing this?
bdacier said:
Allright I'm running into problems! Haret starts and I get as far as the linux boot animation, but then the phone crashes and reboots... anyone else experiencing this?
Click to expand...
Click to collapse
Sorry mate, seems the newest kernel isn't BLAC friendly! Please tell me which kernel does work... Use the autobuild service and try older kernels. First post has details on how to change your kernel, plus links to autobuild service...
To alphecca911 - most of your issues seem to be first boot related. Remember, you should let it sit on first boot so all the processes that run on first boot have plenty of time to work! I usually let it sit until it sleeps. I've had a lot of weird issues trying to do too many things on first boot on the device... I am impatient just like you probably . Just fight it .
Startup wizard...? There isn't a startup wizard on XDAndroid builds...
Click to expand...
Click to collapse
That might explain a lot
I just checked the system/app folder in the frx07 package. Of course you're right. I copied apps into this without looking. And there was an old SetupWizard.apk.
But just in the moment I started frx07 without any error.
Now I can start to make a real nice package for CWM. And "most" important: try a different boot animation.
I have to thank all XDAndroid developers for this and arrrghhh here for pointing me to it with his posts.
Really great job you are doing here at XDA developers
Thanks

[KERNEL] Aircrack-ng on Galaxy Nexus w/ AWUS036H usb wifi adapter (RTL8187 drivers)

For a while now I have been wanting to run aircrack on my galaxy nexus so as to have a mobile pentesting device.
So, I finally got it working and thought I would post how. This is not a task for the terminally challenged.
Install Backtrack 5 ARM. The latter is a linux environment designed for pentesting. On a mobile device the easiest way to install it is by chrooting to the mounted img, running on top of the mobile devices kernel.
Since most people seem to think aircrack is unusable on a mobile arm device, it is not included in the BackTrack 5 linux distro above, so you will need to download it manually once you have BackTrack up and running.
Here are the commands to do so:
#!/bin/bash
# Aircrack-ng installer for BackTrack 5 on Android
# By Justin Barrick aka th3p4tri0t
# install dependency for libssl-dev
apt-get install zlib1g-dev
# install libssl-dev
wget http://launchpadlibrarian.net/64412492/libssl-dev_0.9.8k-7ubuntu8.6_armel.deb
dpkg --install libssl-dev_0.9.8k-7ubuntu8.6_armel.deb
rm libssl-dev_0.9.8k-7ubuntu8.6_armel.deb
# get and install aircrack-ng
apt-get install source-aircrack-ng
cd /var/backtrack/sources/aircrack-ng/1.1/bt9/upstream-sources/
tar -xzf aircrack-ng.tar.gz
cd aircrack-ng/
make
make install
# set path variable
echo "export PATH=$PATH:/usr/local/sbin" >> ~/.bashrc
export PATH=$PATH:/usr/local/sbin
Now, the hard part. Or at least the part that took me forever to discover. You need the drivers for the AWUS036H to be insmod'ed into the kernel. You can accomplish this by obtaining your kernel source and the driver source, which is part of the compat-wireless package, more specifically the AWUS036H uses the rtl8187 chipset. Then, you cross compile those two sources to obtain rtl8187.ko, eeprom_93cx6.ko, and mac80211.ko. Then insmod those kernel modules into your kernel (insmod rtl8187.ko). The process is explained here. One can also recompile the enitre kernel, instead, and include the modules as built-in drivers. However, compiling kernel drivers can be difficult (toolchains, kernel source, etc), so luckily, I found a Galaxy Nexus kernel that already has the modules built-in, it is franco.Kernel R140 with modules added.
***Update:farcno.Kernel R200 with RTL8187 modules added, and R248 for JellyBean 4.1.1 with RTL8187 drivers
, so Aircrack-ng is now compatible with JellyBean! Also, R140 is no longer available but R200 is and has the modules needed
Beware, the kernel R200 needs ICS 4.0.4 installed to work properly, and R248 is built for JB 4.1.1.
***Update 04/11/2013:
I couldn't find any kernels with the RTL8187 drivers for JB 4.2.2, so, I built one my self. The kernel is a modified franco.Kernel R370. I didn't package it into a flashable zip, because I find it just as easy to hook my phone to my computer and use fastboot (fastboot flash boot bootJB422-RTL8187.img). The kernel image is attached below. I have been running it for about 4 days now without issue. I actually find it is the stablest version yet. I was able to play N64oid, while running airodump-ng and aireplay-ng. File attached below.
***Update 04/15/2013:
I looked into getting more of the aireplay-ng attacks to work proper with the RTL8187 drivers. There had been some complaints about fragementation attack not working and negative one always being returned as the channel for mon0. So, I found two patches for those issues on the aircrack-ng site and applied them to the franco.Kernl r370 with RTL8187 and recompiled. Now, we have fully functional aircrack-ng RTL8187 driver.
Once you flash the kernel, using the flashable zip and cwm or fastboot flash, then backtrack will be able to recognize the attached wifi adapter.... once you mount the usb bus in BackTrack. And, of course, this needs a OTG USB host cable.
The final step before learning how to use aircrack-ng is:
1. Open a terminal and load BT5, you can load the 'ui' and use an vnc to connect the the xserver desktop if you want. But, I have found it is easier to just use the chroot shell in the android terminal emulator.
2. open another android terminal window, and type:
su
mkdir -p /data/local/bt/dev/bus/usb
mount -o bind /dev/bus/usb /data/local/bt/dev/bus/usb
3. In the new android terminal window, start the BT5 shell (startbt), then type:
lsusb
You should see atleast one device, the usb root, and whatever device you have plugged in to the otg cable, if any.
A note to remember: I re-performed this guide after formatting my phone and got stuck here. lsusb didn't list anything. I rebooted my phone and tried to start BT5 and mount the usb again and it worked. I rebooted, started BT5, tried lsusb without binding usb and was blank as should be, bound usb back in another terminal window, returned to BT5, tried lsusb and root hub displayed.
Now, plug in the AWUS036H and type: airmon-ng
And you should see the device listed.
Read here for how to run aircrack, or view here.
Essentially the commands are:
lshw -disable dmi
(this should list the attached wifi card under NETWORK, my RTL8187 was wlan1)
ifconfig
(you should see wlan1 listed, if not the type "ifconfig wlan1 up" and retype "ifconfig")
airmon-ng start wlan1
airodump-ng mon0
copy BSSID and CHANNEL
New android terminal with BT5 shell (startbt): airodump-ng -w wep -c CHANNEL --bssid BSSID mon0
New android terminal with BT5 shell (startbt): aireplay-ng -1 0 -a BSSID mon0
New android terminal with BT5 shell (startbt): aireplay-ng -3 -b BSSID mon0
After ~50,000 packets collected:
New android terminal with BT5 shell (startbt): aircrack-ng wep-01.cap
To the purpose, with this, if your friend or mom or just some complete stranger forgets their wep key to their network, all they need to do is call you and you can just drive by, plug your wifi adapter into your phone, chroot to BT5 and aircrack their password for them, in a matter of 5 to 10 minutes.
WARNING!!!: In my intial aircrack run on my galaxy nexus, I cracked a wep key in about 5-10 minutes. I was happy, happy, happy. Then, a ruinous moment occurred. Almost the very second aircrack-ng finished cracking the key, my phone came up with a low battery warning, I was using a awus036h wifi adapter and it was draining my battery fast, I had about 50% to begin and had the 14% warning hit me about 10 minutes in, funny thing is the warning is usually 14%, but this time was 13%, go figure? Anyway seconds after the warning my phone just blanks, turns off. I plug it in and reboot and the battery is at 0% and stuck there, so a word of warning:
An external wifi adapter my require more usb host juice then the battery can safely supply. I have seen people using powered hubs to circumvent draining the phone battery, I would defintiely recommend the practice.
UPDATE: I plugged the phone into an AC charger and the battery finally charged (phew). For some reason, it wouldn't recharge on the USB cable after being so drained.
Is there a compatible wifi device that has the same chip set but with its own power supply (cord or battery)? If so that should help. I'm interested if someone can find one.
Sent from my Galaxy Nexus using xda premium
This is amazing work. I used to do some network pen testing as part of my old job and there's a lot of work that goes into making a mobile setup even with a laptop involved. The fact you got this all working coherently on a phone is mind blowing to me. Huge props.
I have no experience with this manufacturer or ebay seller but through some googling I did find this product:
http://www.ebay.com/itm/Solar-Power...970998?pt=PDA_Accessories&hash=item20b72a86b6
USB hubs in theory do not identify as normal USB devices and allow for pass through communication between connected devices. This one supplies external power as well. In other words, you may be able to connect both devices to this as it provides external power, and they can communicate without you having to rewrite any drivers.
However, be careful because some USB chipsets get confused if you try to use them as USB host but supply external power at the same time. So you may want to verify that is safe on the GNEX USB chipset.
Anyone willing to order that hub and test it?
Sent from my Galaxy Nexus using xda premium
Wow just found that and will be testing it at home tonight.
I flashed the V140 kernel via recovery and I can't locate rtl8187.ko anywhere to move it to /data/local/modules
Where is it located once the kernel flashed?
Thanks!
Once you install the R140 kernel mentioned, there is no need to insmod rtl8187.ko. The rtl8187 chipset support is compiled into the kernel boot.img.
I use this external battery pack, and I spliced a spare USB cord with the cord from my wifi adapter, so it only draws juice from the battery pack.
When you cut open a usb cord there are four wires: red, black, green, and white.
Green and white are data, connect them to the cord going to the galaxy nexus.
Red is +5V, connect it to the +5 V or red cord going to the battery pack.
Black is common, connect it to both usb cords.
So, on the cord going to the battery pack, green and white are loose, and on the cord going to the gnex, red is loose.
Or, you could use the solar powered hub mentioned above. You will still need the modified kernel, as the hub will show up as an attached device, but so will whatever is connected to it. You can't communicate with a device, without the appropriate drivers.
I did the bt5 development for the xoom. Reaver works too for h4xRing wps. I make a module pack with about 100 modules for xoom. If this is something the gnex community is interested in ill see what a can do.
bigrushdog, to be honest, during my trek to get this working, I nearly gave up and bought a XOOM, after seeing how well developed it was.
bigrushdog said:
I did the bt5 development for the xoom. Reaver works too for h4xRing wps. I make a module pack with about 100 modules for xoom. If this is something the gnex community is interested in ill see what a can do.
Click to expand...
Click to collapse
Of course I would be interested!!!
Aircrack is working now with my rtl8187!
Great job. However I noticed that this kernel is draining the battery much quicker than the latest Franciscofranco kernel in Android with a normal everyday usage.
You could download the franco.Kernel updater, it lets you set options in the franco.Kernel, like the "Generic Hotplug" option which saves battery by turning off one cpu core when the phone screen is off and allows you to set undervolt settings. It also has a Power Mode setting with Full Power, Balanced, and Power Save options. Full Power is default, which makes your phone faster, but at the expense of battery power.
Be sure not to upgrade the kernel to the current nightly though. The franco.Kernel I listed is specially modified, the rtl8187 drivers aren't normally found in the franco.Kernel.
bigrushdog said:
I did the bt5 development for the xoom. Reaver works too for h4xRing wps. I make a module pack with about 100 modules for xoom. If this is something the gnex community is interested in ill see what a can do.
Click to expand...
Click to collapse
Yes, please! I'd be interested.
Sent from my Galaxy Nexus using xda premium
michaelmotes said:
You could download the franco.Kernel updater, it lets you set options in the franco.Kernel, like the "Generic Hotplug" option which saves battery by turning off one cpu core when the phone screen is off and allows you to set undervolt settings. It also has a Power Mode setting with Full Power, Balanced, and Power Save options. Full Power is default, which makes your phone faster, but at the expense of battery power.
Be sure not to upgrade the kernel to the current nightly though. The franco.Kernel I listed is specially modified, the rtl8187 drivers aren't normally found in the franco.Kernel.
Click to expand...
Click to collapse
I will try the settings as I already have the app! Huge thanks!
Wow I tried to get rtl8187 working since 2 weeks, but never was able to crosscompile the kernel modules.. And you found a kernel, that has these modules already intergrated thank you very very much
It was brought to my attention that the patches for the compat wireless drivers from aircrack-ng haven't been applied to the driver in the kernel I provided. Nonetheless, aircrack-ng, aireplay-ng, airmon-ng, and airodump-ng still work. The only one that might give you a problem is aireplay-ng because it uses the patches to get the channel of the bssid from the driver, which without the patch just returns -1. I was able to get around it by using the command line option --ignore-negative-one when using aireplay and the ARP request replay attack (attack 3) and fake authentication (attack 1) still worked.
Also, a word to the wise, I overheated my cpu while running airodump, aireplay ARP request replay, and aircrack all at once and caused a kernel panic and emergency shutdown. So, I would advise only running airodump and aireplay, then waiting until you have lots of packets, stopping airepaly and airodump, and then running aircrack. Or, maybe even underclocking the cpu while running in backtrack.
michaelmotes said:
It was brought to my attention that the patches for the compat wireless drivers from aircrack-ng haven't been applied to the driver in the kernel I provided. Nonetheless, aircrack-ng, aireplay-ng, airmon-ng, and airodump-ng still work. The only one that might give you a problem is aireplay-ng because it uses the patches to get the channel of the bssid from the driver, which without the patch just returns -1. I was able to get around it by using the command line option --ignore-negative-one when using aireplay and the ARP request replay attack (attack 3) and fake authentication (attack 1) still worked.
Also, a word to the wise, I overheated my cpu while running airodump, aireplay ARP request replay, and aircrack all at once and caused a kernel panic and emergency shutdown. So, I would advise only running airodump and aireplay, then waiting until you have lots of packets, stopping airepaly and airodump, and then running aircrack. Or, maybe even underclocking the cpu while running in backtrack.
Click to expand...
Click to collapse
Could we patch it manually? We would need to download the kernel source somewhere in the chroot session and modify the makefile then?
You can patch it manually. But, like I said, I'm happy with it, I can crack wep keys and that is what I wanted to do, still as an academic exercise, or academic triathlon, you can patch it manually. To start, I would try getting the kernel source for the gnex, or maybe from Kernel-XP I linked. He might give it to you if you asked. Then, I would recompile the kernel with not changes.
The kernel must be recompiled using the arm gcc toolchain, you can get it like:
$ git clone https://android.googlesource.com/platform/prebuilt
$ export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
I would install all the necessaries on a regular desktop and follow the instructions for building kernels here: http://source.android.com/source/building-kernels.html.
Once you get the kernel rebuilt and it works, look into patching the compat-wireless source here: http://www.aircrack-ng.org/doku.php?id=compat-wireless
And then take a look here: http://stackoverflow.com/questions/4849063/cross-compile-lkm-module-for-android-platform. It says how to setup a makefile in the driver source directory to make it cross-compile with the android kernel source.
Nice!
Cool and thanks for all the steps. Last link was the key I was missing for many weeks!
So right now WPA2 won't be working right?
What do you mean "WPA2 wont be working"?
I believe you can still caputre handshakes, and try to brute force the password. All you need is to run airodump to capture the handshake on the wpa router and run aireplay with attack 0 (deauthication) to cause a client to handshake.WPA cracking is slow though, and only possible if the router has password less then or equal to 7 characters, I think after that the odds of cracking it become worse then hitting the lottery after that. There is no way to recover a WPA key without guessing it.
Capturing the handshake just allows one to guess rapidly without the router knowing or being able to ban your mac for repeated auth attempts.

[DEV] ArchLinux on the TF300T(G)

I've always been more of an Arch than Ubuntu person (how do you know if someone uses ArchLinux? Don't worry, they'll tell you)
This requires you to be unlocked and on the JB bootloader. I disclaim all responsibility if it somehow turns your tablet into a pile of ashes...
What works:
Dual boot with Android.
Internal storage and MicroSD Card
X11, with compositing
Audio
Mouse and keyboard on the dock, as well as dock hotplugging.
Touchscreen
Playing videos (full 1080P works great.) using Xfce's media player
Sensors (Light, compass, accelerometer, gyro). These are all exposed under sysfs.
Charging / Dock charging. This appears to be managed by the kernel.
USB gadget (as a RNDIS device for network access via USB)
CPU frequency scaling / Tegra LP core. The LP core is automatically used you can see its status in /sys/kernel/cluster/active (when that file reads LP) and its use is simply what the current CPU1 use appears to be.
WiFi, with NetworkManager
3G, on the TF300TG model, with NetworkManager
Battery (and dock) status in Xfce
USB port on the dock
Some sensible key remapping (Back -> Escape, Search -> Alt, Home -> Super)
What doesn't work:
Bluetooth
Two finger scrolling with the mouse
Rebooting from Linux (have to do a sync then hard power off)
Basic framebuffer console - to get dual boot working I had to remove the FB console
Using "standard" xv (as in, mplayer -vo xv). Untested really, use gstreamer.
Cameras
Current priorities:
Get Bluetooth working
Get two finger scrolling working.
Get rebooting working
Anything else is untested. Currently, I'm using the TF300TG's kernel source at https://github.com/cb22/tf300tg_jb_kernel - which is just the standard source from ASUS with a patch or two.
Dual booting:
At the moment, my "hybrid" initramfs checks for a file ".boot_linux" on the internal SD card (/data/media/.boot_linux or /storage/sdcard0/.boot_linux - same thing). If it exists, it boots Linux, otherwise, Android starts up. It wouldn't be difficult at all to make a simple Android app with a "Reboot into Linux" button, and vice versa one for Linux with "Reboot into Android"
Important note:
Currently, the provided kernel / initramfs is built for the TF300TG. It does seem to work fine on the TF300T however.
Downloads:
Kernel + Initramfs blob: https://rapidshare.com/files/2827313479/hybridkernel.blob
RootFS with Xfce: https://rapidshare.com/files/201953815/linux.tar.gz
Installation:
Flash the blob to staging using fastboot.
Untar the rootfs to /data/linux/. The easiest way to do this is probably to copy it across to the Transformer via adb or MTP, then run
Code:
$ su
# mkdir /data/linux
# tar -xzvf /storage/sdcard0/linux.tar.gz -C /data/linux
Issues:
Apparently permissions aren't set properly when untar-ing. This can be "fixed" by a chmod 755, apparently. As soon as I can, I'll make a better way of installing this (update.zip style)
Credits:
This work is based off the Arch Linux ARM distribution
Sounds good, I think would be nice together with a dual boot kernel :good:
AWESOME! This is what I've been looking for. Thanks for kick starting this, I'm flashing the recovery right away. I suppose I'll start playing around with the .config and see where that takes me.
C'mon people! lets get this done so we can then try out dualboot options and bring some GNU/Linux flavor to the Transformer Pad.
Good work. Im waiting for a working Ubuntu so I can install Blackbuntu.
Shame Im on ICS bootloader as I would have tried it.
The Prime Ubuntu project aint had any updates recently sadly.
if you get this working, would you then maybe get the win8 tablet version also working? Loving linux, but Win8 on tablets even a bit better :good:
Valantur said:
AWESOME! This is what I've been looking for. Thanks for kick starting this, I'm flashing the recovery right away. I suppose I'll start playing around with the .config and see where that takes me.
C'mon people! lets get this done so we can then try out dualboot options and bring some GNU/Linux flavor to the Transformer Pad.
Click to expand...
Click to collapse
That's the aim! It would be really nice to have Android for tablet mode, and GNU/Linux for dock mode.
Nekromantik said:
Good work. Im waiting for a working Ubuntu so I can install Blackbuntu.
Shame Im on ICS bootloader as I would have tried it.
The Prime Ubuntu project aint had any updates recently sadly.
Click to expand...
Click to collapse
You can always use NVflash to backup your bootloader and such, then freely flash away. That's what I did (I'm on the TF300TG, and no one has uploaded their JB dlpkgfile *hint* *hint* and it's not available on ASUS's site yet) so I simply restored using NVflash to get my ICS with 3G back for when I'm not dev'ing.
Also - the ideas port over to any GNU/Linux system fairly easily once figured out - getting Ubuntu running wouldn't be much more effort. I'm using Arch to start since I understand it better (and prefer it)
-angel* said:
if you get this working, would you then maybe get the win8 tablet version also working? Loving linux, but Win8 on tablets even a bit better :good:
Click to expand...
Click to collapse
Highly unlikely, sorry, and definitely not my field of expertise!
yeah nP - was just a think if they would have similar kernels...
Video looks very good, but as you say in the first post, nothing for ppl who don't know how to flash it and as I need the tablet for school I'd need dual boot at all... :/
But get on your working, really nice, but unfortunately I don't know anything about developing such things, so I can't help you...
This is awesome i'm gonna have to read up on this to see how it works! great work! Always wanted something like this.
cb22 said:
You can always use NVflash to backup your bootloader and such, then freely flash away. That's what I did (I'm on the TF300TG, and no one has uploaded their JB dlpkgfile *hint* *hint* and it's not available on ASUS's site yet) so I simply restored using NVflash to get my ICS with 3G back for when I'm not dev'ing.
Also - the ideas port over to any GNU/Linux system fairly easily once figured out - getting Ubuntu running wouldn't be much more effort. I'm using Arch to start since I understand it better (and prefer it)
Click to expand...
Click to collapse
Yeah.
Might try when I get some spare time.
Great initiative! I'd personally prefer a native debian distro over Arch but I figure once you've laid the groundwork the road's paved for more distro's.
Finally, a real reason to unlock the tab. When this works and it's dual boot, I will be unlocking and installing this.
Amazing! I just hope that it will be possible to dualboot with normal android installed. If so, it would be absolutely perfect. Keep going, buddy!
Would it be possible to get it dualboot with an external HDD's? Because you can only get external SD's only up to 64gb (as I know and not all of them work) and external HDD's usually have a bit more storage
I've been playing around with this today, and I was wondering if you could upload a barebones arch system (without KDE) but with any other improvements you might have been working on.
Thanks
spenat said:
Amazing! I just hope that it will be possible to dualboot with normal android installed. If so, it would be absolutely perfect. Keep going, buddy!
Click to expand...
Click to collapse
That's what I've been working on! I have a kernel that supports full features of both Android and Arch (well sorta - no FB console, so no boot messages or such) and an initramfs that allows you to select (at the moment its hard coded, but I'll make a simple interface to select which one to boot, as well as things like telling Android to reboot into Linux, or vice versa). In terms of implementation, essentially it's just an initramfs chain loader.
Valantur said:
I've been playing around with this today, and I was wondering if you could upload a barebones arch system (without KDE) but with any other improvements you might have been working on.
Thanks
Click to expand...
Click to collapse
I shall - I've gotten WiFi working (works great with NetworkManager even) - I just have a very busy week with varsity work, I'll try and put the latest stuff online over the weekend.
Hello,
Can you use the package manager and install other DM the same way we would on a X86pc?
aachour said:
Hello,
Can you use the package manager and install other DM the same way we would on a X86pc?
Click to expand...
Click to collapse
I guess you could, once you get wifi working. We are waiting for cb22 to upload a new kernel+rootfs with a working wifi interface.
cb22 said:
That's what I've been working on! I have a kernel that supports full features of both Android and Arch (well sorta - no FB console, so no boot messages or such) and an initramfs that allows you to select (at the moment its hard coded, but I'll make a simple interface to select which one to boot, as well as things like telling Android to reboot into Linux, or vice versa). In terms of implementation, essentially it's just an initramfs chain loader.
I shall - I've gotten WiFi working (works great with NetworkManager even) - I just have a very busy week with varsity work, I'll try and put the latest stuff online over the weekend.
Click to expand...
Click to collapse
This project looks awesome. i have a tf300t and intermediate arch linux experience( have made multiple working setups, compiled drivers etc, and would love to do anything i can to help this project, let me know if there is anything i can do
yeah! always looked for linux on this tablet! keep up the development guys
Valantur said:
I guess you could, once you get wifi working. We are waiting for cb22 to upload a new kernel+rootfs with a working wifi interface.
Click to expand...
Click to collapse
Unfortunately I didn't have time over the weekend to get things tidied up and uploaded - I start writing exams soon so things are a bit hectic on my side (coupled with the fact that I actually use my TF for varsity). I'll try to sort things out as soon as I can

[RECOVERY] TWRP 2.8.6.0 for Shield TV (all variants)

I was going to wait for this device to be added to devdb to make a release thread, but that's being delayed, if it'll ever happen. So, I'm making this thread as a placeholder. No big fancy text, just a known problem list and the release. If you're looking for this, you probably know what to do with it. Everything should work from flashing to backup and restore from all external media. If it doesn't, please report it.
KNOWN PROBLEMS:
1. This is a multirom edition of twrp, but there's no multirom support yet.
2. My wireless keyboard / mouse combo (an old Logitech MX something or another) fails to initialize the mouse on boot. I have to unplug and replug the USB receiver for the mouse to work. My wired mouse doesn't do this. I'm curious if anyone else sees a similar problem or if there's something weird with my hardware.
SOURCE:
device (branch cm-12.1-mrom)
kernel
vendor
CURRENT RELEASE:
For Android M:
twrp-20160222-UNOFFICIAL-foster.img
Known Issue: This release does not work on 4K displays. It boots to a black screen. Please use a 1080p display for TWRP until this is fixed.
For Android L:
twrp-multirom-20151112-UNOFFICIAL-foster.img
OLD RELEASES:
twrp-multirom-20150630-UNOFFICIAL-foster.img
twrp-multirom-20150624-UNOFFICIAL-foster.img
twrp-multirom-20150613-UNOFFICIAL-foster.img
MultiRom will be a must have on this device.
I really appreciate your work, and reading the various thread on xda I found out that you're one of the best developers for Nvidia Shield devices.
Without people like you we would all be locked in a large digital cage.
Compliments
Thanks Steel01!
I'm starting to slowly look at what I can disable in the kernel to shrink it down enough to fit in the recovery partition. Unfortunately, my first two ideas, network and sound, can't be unilaterally removed due to the android USB gadget (used for adb) depending on them. I've got it down to 26 MB, but iI dont know if it still boots. I'll try a few more things and hopefully have something working in the next couple days. I'm also hoping Tasssadar merges the 2.8.7.0 changes soon, the resize functionality will be useful (in testing I somehow shrunk my user data partition to 11 GB and had to reformat it get the full 4?? GB back).
Or it could be quicker than I thought. Todays test was successful. It's small enough to barely fit in the partition and appears to work correct. The link is in the OP. The next update to the multirom TWRP will probably make it too big again and I'll have to rip some more stuff out...
I want to install twrp recovery on my 16gb Shield, but i have no need for multirom. Is there an option to bypass the boot option or should I wait for a standard TWRP?
You didn't take much of a break before going back at it again. Thanks for your dedication!
Well, I'm not going back at it fully yet. Next week and a half will likely be pretty busy. I'm just doing a piece here and there.
This TWRP has multirom support, but does not require it or even set it up by default. In fact, to enable multirom, you have to install a separate zip (which I haven't released because it doesn't work). So no, you won't see any extra boot screens with this.
A standard TWRP build should be simple to make with the sources I've linked in the OP. I haven't released one here (or on any device I support) because I don't want to support it directly (basically, I'm supporting what I use myself). If no one else makes one, I might make a one time build for those that want it.
Hi Steel01, thanks for your efforts. I am a rookie at best at this, however, I managed to get this installed to my 16 gb shield tv, all appears to work fine, except I am unable to pair the shield remote, the shield game controller paired fine, but not the remote, just curious is this is expected, or maybe something wrong on my end. Also, If I wanted to load another rom at some point, is it as simple as booting to the twrp screen and selecting install? Hope that doesn't sound like a dumb question, I'm just a little unsure of that exact process. thanks
Remote controller fix
cdsn99 said:
Hi Steel01, thanks for your efforts. I am a rookie at best at this, however, I managed to get this installed to my 16 gb shield tv, all appears to work fine, except I am unable to pair the shield remote, the shield game controller paired fine, but not the remote, just curious is this is expected, or maybe something wrong on my end. Also, If I wanted to load another rom at some point, is it as simple as booting to the twrp screen and selecting install? Hope that doesn't sound like a dumb question, I'm just a little unsure of that exact process. thanks
Click to expand...
Click to collapse
Do not worry and follow these simple steps to fix your remote controller problem:
This is quite normal after a system reset or wipe.
If the remote did not connect:
If the microphone symbol is not flashing, hold down the back and home buttons at the same time until it flashes (3 seconds).
If the microphone symbol does not flash after holding for 3 seconds, charge the remote and try again.
To charge the remote, connect it to one of the USB ports on the back of your SHIELD with the included USB cable or connect it to another USB power source.
---------- Post added at 06:08 AM ---------- Previous post was at 06:01 AM ----------
cdsn99 said:
Hi Steel01, . Also, If I wanted to load another rom at some point, is it as simple as booting to the twrp screen and selecting install? Hope that doesn't sound like a dumb question, I'm just a little unsure of that exact process. thanks
Click to expand...
Click to collapse
Yes with TWRP it is very easy to flash a new rom, it is also recommended to use the recovery roms for updating your system.
Instead of running the OTO updates because this will undo your Root modification and reinstall the original recovery partition.
Download the correct firmware from this forum from the nvidia developers network, place it on a SD card boot to recovery and flash.
As a final suggestion have a look at the Flashify utllity (not compatible yet) or similar from the appstore, that a simple front end for flashing & backing up boot and recovery partitions. And it will enable you to boot to recovery in one click.
I have TWRP running on my Shield Portable / Shield Tablet without any problems.
Enjoy
Josti-Band said:
Do not worry and follow these simple steps to fix your remote controller problem:
This is quite normal after a system reset or wipe.
If the remote did not connect:
If the microphone symbol is not flashing, hold down the back and home buttons at the same time until it flashes (3 seconds).
If the microphone symbol does not flash after holding for 3 seconds, charge the remote and try again.
To charge the remote, connect it to one of the USB ports on the back of your SHIELD with the included USB cable or connect it to another USB power source.
---------- Post added at 06:08 AM ---------- Previous post was at 06:01 AM ----------
Yes with TWRP it is very easy to flash a new rom, it is also recommended to use the recovery roms for updating your system.
Instead of running the OTO updates because this will undo your Root modification and reinstall the original recovery partition.
Download the correct firmware from this forum from the nvidia developers network, place it on a SD card boot to recovery and flash.
As a final suggestion have a look at the Flashify utllity (not compatible yet) or similar from the appstore, that a simple front end for flashing & backing up boot and recovery partitions. And it will enable you to boot to recovery in one click.
I have TWRP running on my Shield Portable / Shield Tablet without any problems.
Enjoy
Click to expand...
Click to collapse
Thanks Josti-Band , that fixed my remote, I appreciate it greatly. Thanks also for the info on flashing, I'm still have one more question, when I flashed the img file from this thread TWRP, did I change the rom or just the recovery? It seems like the rom is the original that was on the shield tv, If rom was not changed do you or anyone else have a recommendation. Thanks again for the assistance.
cdsn99 said:
Thanks Josti-Band , that fixed my remote, I appreciate it greatly. Thanks also for the info on flashing, I'm still have one more question, when I flashed the img file from this thread TWRP, did I change the rom or just the recovery? It seems like the rom is the original that was on the shield tv, If rom was not changed do you or anyone else have a recommendation. Thanks again for the assistance.
Click to expand...
Click to collapse
No Problem, Your Shield TV has basically 3 partitions (to keep it simple)
1) Boot
2) Recovery
3) OS/Data (Rom)
With the steps you have followed
a) you unlocked your 1) bootloader, to enable the installation of unsigned packages to make this possible your personal data was erased/wiped from the 3) OS/Data partition.
b) Then you applied a new TWRP image to the recovery partition an replacing the old one.
So your 3) OS/Data (Rom) is still the original one you only wiped the personal data clean when unlocking the bootloader, this also the partition you will write your updated recovery images to. And stay updated.
I have TWRP running on my Shield Portable / Shield Tablet without any problems.
Enjoy[/QUOTE]
Josti-Band said:
No Problem, Your Shield TV has basically 3 partitions (to keep it simple)
1) Boot
2) Recovery
3) OS/Data (Rom)
With the steps you have followed
a) you unlocked your 1) bootloader, to enable the installation of unsigned packages to make this possible your personal data was erased/wiped from the 3) OS/Data partition.
b) Then you applied a new TWRP image to the recovery partition an replacing the old one.
So your 3) OS/Data (Rom) is still the original one you only wiped the personal data clean when unlocking the bootloader, this also the partition you will write your updated recovery images to. And stay updated.
Click to expand...
Click to collapse
Thank you, that makes better sense, I will try and load a rom and gapps and see how it goes. thanks again for the assistance
Steel01 said:
2. My wireless keyboard / mouse combo (an old Logitech MX something or another) fails to initialize the mouse on boot. I have to unplug and replug the USB receiver for the mouse to work. My wired mouse doesn't do this. I'm curious if anyone else sees a similar problem or if there's something weird with my hardware.
Hi Steel01 , I have a logitech k400r wireless keyboard and mouse, it seemed to work ok, except was very laggy, had to wait for it a few seconds each time I went to move the mouse, and sometimes mouse would freeze.
Click to expand...
Click to collapse
I have edited and deleted the orginal text from this post,and moved it to it's own thread. I realized I was beginning to hijack steels thread, I couldn't find a way to just delete the whole post, sorry.
Tassadar merged TWRP 2.8.7.0 into his multirom twrp fork today. So I ran new builds for everything I support. Unfortunately, I have not been able to test this device (TV's been busy all night), so YMMV. The other builds came off fine, so I don't see why this one should have any problems the last build didn't. Of interest in this build is the partition resize feature. So if someone does something weird like I did and ends up with an 11 GB data partition on the pro, it'll be *much* easier and quicker to fix now. Build is in the OP.
Steel01 said:
Tassadar merged TWRP 2.8.7.0 into his multirom twrp fork today. So I ran new builds for everything I support. Unfortunately, I have not been able to test this device (TV's been busy all night), so YMMV. The other builds came off fine, so I don't see why this one should have any problems the last build didn't. Of interest in this build is the partition resize feature. So if someone does something weird like I did and ends up with an 11 GB data partition on the pro, it'll be *much* easier and quicker to fix now. Build is in the OP.
Click to expand...
Click to collapse
What about the kexec-hardboot patch ? Do you have already tried it ?
The others binary for multirom execution are the same for all arm64 devices like the nexus 9 or we need a specific build for shield ? I never played with multirom stuff. There are specific problems to solve ? In case i can help you with experiments if you don't have much time.
P.S.
I tried your patch for the framework and all others new Nvidia binary + resigned private apk like blakepairing and others. But this year Nvidia added many others things to the framework. You can see by yourself with dex2jar.
It's a shame that for a stupid controller there are all this bloatware inside the firmware. Very bad behaviour, that a so big company not publish drivers for an hardware that we have bought. Fortunately we can use also better wireless controllers. But this fact really remove 10000 points from Nvidia as good company.
I've worked very little on the multirom side of things. The kernel repo has a mrom branch with a kexec patch, which still boots to stock. However, there's something getting triggered in the multirom init program that is skipping the boot screen. I haven't tried to track that down yet.
The controller part is off-topic, but there isn't really anywhere else to discuss it yet. Maybe I'll open a CM thread for discussion and put not working in bold at the top. Anyways, the framework patches work with the blakepairing shipped with the Shield TV, that's what I ship with my portable and tablet builds. But you have to deodex and stuff the class file back in the apk. Or easier, use the one in my vendor repo and just resign it. That should at least run. On a side note, the underlying technologies are all open source. WiFi Direct, wps, hid, etc. It just a standard USB hid controller with a WiFi chip and USB sound card. It's driven by an xmega (iirc) as well, those are all pretty open. It's obfuscation atm that stops me from completely reimplementing the pairing open source.
Steel01 said:
I've worked very little on the multirom side of things. The kernel repo has a mrom branch with a kexec patch, which still boots to stock. However, there's something getting triggered in the multirom init program that is skipping the boot screen. I haven't tried to track that down yet.
The controller part is off-topic, but there isn't really anywhere else to discuss it yet. Maybe I'll open a CM thread for discussion and put not working in bold at the top. Anyways, the framework patches work with the blakepairing shipped with the Shield TV, that's what I ship with my portable and tablet builds. But you have to deodex and stuff the class file back in the apk. Or easier, use the one in my vendor repo and just resign it. That should at least run. On a side note, the underlying technologies are all open source. WiFi Direct, wps, hid, etc. It just a standard USB hid controller with a WiFi chip and USB sound card. It's driven by an xmega (iirc) as well, those are all pretty open. It's obfuscation atm that stops me from completely reimplementing the pairing open source.
Click to expand...
Click to collapse
Already tried all. deodexed and resigned stock stuff, also used your framework patch and your (resigned) apks . not work in shield console. as i write above in shield console there are others proprietary things in the framework. Tested also with your wpa_supplicant and hostapd but the result does not change.
In any way i will retry
We can discuss in a separate thread. sorry for off-topic. can be useful also for others developers
This is very interesting, please continue with this work! Would be great to get the remote working on other ROMs.
Thanks!
Steel01 said:
I've worked very little on the multirom side of things. The kernel repo has a mrom branch with a kexec patch, which still boots to stock. However, there's something getting triggered in the multirom init program that is skipping the boot screen. I haven't tried to track that down yet.
The controller part is off-topic, but there isn't really anywhere else to discuss it yet. Maybe I'll open a CM thread for discussion and put not working in bold at the top. Anyways, the framework patches work with the blakepairing shipped with the Shield TV, that's what I ship with my portable and tablet builds. But you have to deodex and stuff the class file back in the apk. Or easier, use the one in my vendor repo and just resign it. That should at least run. On a side note, the underlying technologies are all open source. WiFi Direct, wps, hid, etc. It just a standard USB hid controller with a WiFi chip and USB sound card. It's driven by an xmega (iirc) as well, those are all pretty open. It's obfuscation atm that stops me from completely reimplementing the pairing open source.
Click to expand...
Click to collapse
Steel01 said:
I
KNOWN PROBLEMS:
1. This is a multirom edition of twrp, but there's no multirom support yet.
2. My wireless keyboard / mouse combo (an old Logitech MX something or another) fails to initialize the mouse on boot. I have to unplug and replug the USB receiver for the mouse to work. My wired mouse doesn't do this. I'm curious if anyone else sees a similar problem or if there's something weird with my hardware.
Click to expand...
Click to collapse
I have a logitech K830 keyboard with trackpad and have exactly the same issue as you. I have to unplug and replug the usb receiver before it will work with the recovery.
The recovery itself is working great for me. I can access my external usb hd from the file manager, and I did a TWRP backup to the external usb drive last night :good: Ive sideloaded this app to boot straight into the recovery from the TV.. https://play.google.com/store/apps/details?id=gt.reboot.utility

Defy - A 2016 Experience

Since this Defy Forum is getting a bit old, I thought I'd give my recent experience with my defy. This is quite a lengthy thread but there is so much information on this forum that it becomes confusing so thought I'd share my experience so you can cut through a lot of the information. I've had my defy for over 5 years with the stock froyo 2.2.2 and its served me well until recently its beginning to bug me with how laggy it is. Also I wasn't sure if the battery was running out a faster than it used to.
The first thing I thought I'd do is do a factory reset which I successfully did however when I went to put back on some of the apps that I had before such as Runkeeper, Telstra 24/7 and RSA Security token, none of them were compatible with my old phone. I was able to find old versions of some of the apps but not Telstra 24/7 which I use to recharge. At this point I decided on installing a custom rom which I'd done before on other devices. If it didn't work out then phones with the same specs were selling for $29 at a local supermarket so no real damage if I get it wrong.
The first thing was to root the phone which I found something called Superoneclick. I had to turn off my antivirus on my PC use it as there are some files that appear corrupt but doing some searching gave me confidence it was just an overzealous AVG and appeared safe.
Once this was done it was a matter of picking a Rom which I went for CM11 Kit Kat it seemed ok but not heaps better. The thing was I'd now picked up a real battery problem. I tried various Calibration apps to no avail. My battery was experiencing quite large drops of 20% ie it would go from 89% to 50% and then later from about 35% to 20%. It would then stay on 1% for quite some time.
Thinking this was due to the ROM, I tried several ROMs but they all had the same problem. Eventually i found a thread on the battery problem and although I didn't change all the permissions as advised I did so some of the other stuff to no avail.
At this stage I thought my main issue was now the battery and thought I'd read someone that perhaps a stock based rom might sort it out. I installed MS4Ginger which was really smooth however was still a bit laggy at times. Also I noticed that it wasn't able to support various apps being Android 2.3. After a bit more reading, my minimum requirement was Jellybean 4.1 and I'd read that the more recent the ROM the more RAM intensive so I decided to try ROMs with my minimum requirement ie 4.1
I'm not a fan particularly the way the Cyanogen type rom look so was looking for something with a different look and feel. The main ones were:-
Miui based ones (Wiui, Jiui) which I quite liked however lag was still there and the occasional sudden reboot. Battery problem still there.
Xperia ROM which was also nice but also did a sudden reboot then stuck in a bootloop.
There was still lag which I couldn't really understand.
Last Rom I tried was Motor Gun Ice 4.1, it still had the Cyanogen look about it but seemed to run pretty smooth. One thing I had to do was change the Baseband to Telstra in the 'Advanced' section of settings. This made the phone and internet connection work faster.
At this point I ordered a new battery. While I was waiting for that to arrive I read that Facebook app is really bad at taking up RAM. In found another app called Facebook lite and uninstalled the standard Facebook app. All of a sudden Lag Fixed.
This got me searching other 'Lite' apps. Now for web browsing i use Opera Mini and the launcher I now use is Holo Launcher. I also tried to find a replacement for Messenger but no luck and its not been an issue.
So now my phone is running better than ever. Web searching is fast and apps are running well, not that I use my phone for much more than a phone.
A few days later my new battery arrived and comparing to the old one, it appeared that the old one had a slight bulge. I charged the new one right up, discharged and charged again and now no more battery drops.
One last tweak I wanted was to try change the status bar icons. I found Xposed Installer and was able to change the icon colours to white but not the icon pictures. Good enough for me.
So now I'm very happy with my 5 year old defy, took a bit of trial and error but got there in the end. So in a nutshell: -
- If your battery is dropping upon installation of a Rom, likely need a new battery.
- If you phone is lagging, look what is taking all the Ram and look for a lite option or uninstall. Facebook is bad for that.
Note that there are many old links to roms and other mods so finding things that work was at times a challenge but here's the process that I found worked for me and works if bricked as well, which I did a couple of times.
If Bricked or to get back to stock
Download RSD Lite
Install drivers for the phone
Download an SBF for your region, I used Telstra with 2.2.2
To install custom rom
Install and use Superoneclick to root (may need to turn off antivirus)
Install 2ndinit.apk then run it. May need to reboot phone first
Download the Rom and Gapps and put on SD card of phone
Get into custom recovery
Wipe Data and Cache
Install Rom and Gapps
Wipe Cache and Dalvik Cache (for all but one Rom, I forget which one, read instructions)
Reboot and enjoy.
the gun rom link is down, where you downloaded it?
That was one of the few that worked. I accessed from the defy wiki page then I think downloaded from the XDA thread.
Yep, there some links in the last post of the MG ROM thread. Post #222.
Good someone still use defy. I give up after digitizer gone mad. Time run over this device... Uuuh, just if it had 1 gb ram and dual core...
Good to hear that someone else still have this cute little thing. I have too, as my second device. The ROMs I tried on this device! Man, it's countless. I had dropped it on all the different terrains you can think of, yet it's still fully healthy (save the jack and usb covers - they are loose now) without a single crack. I didn't have any covers or screen guards. It stayed true to its name. I will never regret spending money to buy this, it is one of Moto's legendary devices. I think I'm drunk, but it feels good to say all this. I'll keep this device forever with me - a product from a time when smartphones weren't made in an oven, but carefully and delicately cooked up.
Digitizer gone mad me too, the upper line is not working, but it is a good phone, for kids.
Which seller you order the battery?
Can you suggest ROMs to watch videos on Kodi, or Youtube?
I liked this phone, this is the best size phone, what i ever had.
Why the companys not make phone like this size, one hand controlled, with 2GB/32GB, and quad cpu??
Now i have Samsung S4 mini, and it is big for me
Battery was off eBay, can't remember seller but was Australian selling genuine batteries.
Just try all the roms possible, that's part of the fun
Sent from my SM-T210 using Tapatalk
I've been wanting to play around w/ my old defy again. This thread may have got the ball rolling. What do you all use as your daily driver? I've got a xperia z3 compact, but want a new phone. unfortunately, I think my best bet is to just get another z3 compact cheap and save it as a backup?
Hi tronjojo, I was still using my Defy until recently I found an old 4 year old Samsung Galaxy SII of my wife's. The problem for her was that it was switching off all the time so she got an S5. I've now flashed various roms and fixed the random reboot issue. The only thing I wish it has is the notification LED.
Sent from my SM-T210 using Tapatalk
I bougnt a Defy + battery on my Defy Red Lens, made my own BL7 fixed SBF and nandroid with 720p patch which made it a Defy Plus, then I rooted it and repartitioned to install CM11 and has made it very usable in 2016.
Make that Defy in 2018
I'm still using a Defy, since 2011. The battery still lasts longer than that in my wife's new Sony Experia X Compact, about as long as in my daughter's Xiaomi Redmi 4X. I will probably have to move to another device somewhere in 2018 as one of the more important apps - the Swedish BankID app - will cease support for Android 4.4 but that is more or less the only reason. For the rest the thing still does what it did 7 years ago so were it not for this I'd keep on using it until it gave up from sheer old age or electron migration or whatnot.
Make that Defy in 2020
I've recently tried if my Defy+ could learn some new tricks and I thought I'd share my findings.
CM11 build
I tried to build CM11 from Quarx repository, but it seems that many of its dependencies no longer exist and whole project is no longer buildable.
3.0 kernel
This one builds fine, however I was unable to boot it - there's one frame or random pixels followed by a reboot. I checked many branches and put the output into most probable directories. I wish there were any instructions as to what actually do with a built kernel. TWRP zips found here didn't work either. Anyone?
SD card size
Defy supposedly shouldn't work with SD cards larger than 32GB. But did anyone try bigger cards? My Defy mounts 256GB cards without any problems.
Debian on chroot
I set up a Debian environment with debootstrap. Unfortunately outdated kernel puts a limit on a Debian version that could be run. For 2.6.32.9 it is Debian Jessie.
With XServer XSDL it is possible to run a full graphical environment.
2.6.32.9 kernel modules
I also succeeded with building kernel modules for the old kernel. These are mostly filesystem modules and cryptographic ciphers. Now I could use whole Debian Jessie repository (49GB) locally from a squashfs filesystem.
Another nice feature is encryption with dm-crypt/LUKS.
I uploaded modules that insmod loads without any error.
CA certificates
These should be updated with system updates, but we won't have new CM/Lineage/stock releases anymore, so I did it by hand. If you want to try it for yourself, remount /system as writable, remove contents of /system/etc/security/cacerts/ (they could be expired) and copy certificates from the archive. Certificates are same as Debian's ca-certificates version 20200601.
Mirror
I also uploaded tools and images - self contained with instructions to go back and forth between stock and CM11, because many links here are spread across many threads or simply dead. Kernel modules and certificates are for CM11. I didn't try them with anything else.
I can't post a link to these files, because this is my first post. Search for ybea in Motorola Defy section at AndroidFileHost.
Another 2020 Defy warrior
ybea said:
3.0 kernel
This one builds fine, however I was unable to boot it - there's one frame or random pixels followed by a reboot. I checked many branches and put the output into most probable directories. I wish there were any instructions as to what actually do with a built kernel. TWRP zips found here didn't work either. Anyone?
Click to expand...
Click to collapse
Hello! Did you check on /bootstrap/bootstrap/binary and other folders? There seem to be a zImage (and the recovery one).
I tried to flash and boot the ROM at http://blechdose-live.de/download/kernel/3.0.x/:
Tried flashing from TWRP 2.8: failed.
Extracted the update-binary, copied it to /tmp and executed it from ADB shell (/tmp/update-binary 3 0 /sdcard/cm11-blah.zip) and flashed with some things, mostly partition related errors. After rebooting, it stays on black screen (turned on), ADB available but unauthorised (just look on Github how to enable ADB from recovery to solve that) and that's all; the ROM doesn't work. I'll try debugging this to check if I can do something.
ybea said:
CM11 build
I tried to build CM11 from Quarx repository, but it seems that many of its dependencies no longer exist and whole project is no longer buildable.
Click to expand...
Click to collapse
What a sad thing, this year even quarx2k.ru became offline...
MaicoLinuX said:
Hello! Did you check on /bootstrap/bootstrap/binary and other folders?
Click to expand...
Click to collapse
Files extracted from 20131213 version did not work for me. I tried swapping /bootstrap/ (and /system/bootstrap/) zImages, binaries, edited cmdline, anything I could think of. Always with the same outcome - black screen.
Flashing in TWRP (v2.6.3.0) initially also failed. Fix_TWRP_and_boot_kernel3.0_v2.zip (on AndroidFileHost) makes it succeed. It is 3.0.8 kernel. It froze during the boot, restarted and finished eventually.
ybea said:
Files extracted from 20131213 version did not work for me. I tried swapping /bootstrap/ (and /system/bootstrap/) zImages, binaries, edited cmdline, anything I could think of. Always with the same outcome - black screen.
Yeah, it did the same for me. Did you read the logcat while device was in that screen? I saw something crashing there (can't remember), anyway that's not so useful if you need a whole new ROM just for the new kernel version. Maybe modules are causing problems?
Pretty offtopic, did you try the OTG function? I can't get it to work, most people say it should work out of the box but I wasn't able to use my USB mouse. Didn't check dmesg, though.
Click to expand...
Click to collapse
MaicoLinuX said:
ybea said:
Always with the same outcome - black screen.
Click to expand...
Click to collapse
Did you read the logcat while device was in that screen?
Click to expand...
Click to collapse
How could I? Android isn't running yet. It it Linux that either fails to load or silently panics. That is my understanding anyway.
The right thing to do would be to check how cm11 build compiles the kernel and the 2nd-init (or whatever it is), but I am not knowledgeable enough, nor keen enough to do that.
OTG is buggy, but usable. If it doesn't work, unplug and plug it again. It is quite normal for my defy to recognize a device on a second or third attempt. No problems with mice, keyboards, flash drives, usb hubs. On the picture in the previous post you can see it with a wireless keyboard+touchpad. If I remember correctly, the driver is set to output 200mAh max. Maybe you mouse draws more (rather unlikely for a mouse). It works for me with cm11-20161124. Also, I think the port outputs 5V even after a device is disconnected, so it unnecessary drains power, but I am not so sure about it.
dmesg should definitely log any new device. Even if android stays quiet. If there's silence, perhaps your cable may of wrong type. USB A to USB micro varies with resistancy across two pins. I don't remember the details. If it is OTG cable, then it should work.
Or simply you have dirty socket/plug pins.
ybea said:
How could I? Android isn't running yet. It it Linux that either fails to load or silently panics. That is my understanding anyway.
Click to expand...
Click to collapse
AFAIK 2ndInit keeps adbd running so you can take a logcat/dmesg from there, also faced the same issue while flashing CM10.2 OTG kernel on CM11 (what was I thinking?) and from there was able to see that something was crashing.
ybea said:
The right thing to do would be to check how cm11 build compiles the kernel and the 2nd-init (or whatever it is), but I am not knowledgeable enough, nor keen enough to do that.
Click to expand...
Click to collapse
Nah, I think just taking some time to understand the 2ndInit boot process is enough, anyway when I get some free time I'll check about this all.
About OTG things, now will install CM11 3.0 kernel and see how it works (I expect some unstability) but don't really need to use the Defy, it's just there for experiments
Anyway, my main goal now is to install Debian natively (on /data partition because of the size) and get X running. As you said, the 2.6.32 kernel puts the limit at Jessie, but that's not a problem as it's still mantained IIRC. I'm using a prebuilt rootfs but it keeps throwing Segmentation Fault whenever I try to chroot there, don't know what happens with this.
I'm doing the same on other 2 phones (Galaxy Y and Pocket Plus, ARMv6 and v7 respectively) but one doesn't boot my compiled kernels (?) and the other complains about the buggy framebuffer driver (thanks Samsung/Broadcom). I went pretty offtopic...
PD: tried to flash some JB Ice Gun Edition v2.02 from CWM and after reboot the phone just is stuck on boot splash, but WIUI runs fine. Maybe the JB IGE BootMenu is broken or something like that.
MaicoLinuX said:
About OTG things, now will install CM11 3.0 kernel and see how it works (I expect some unstability)
Click to expand...
Click to collapse
I didn't have any luck with flashing zips with only the kernel. This 20131213 rom is the only way i know of. But frankly, there's more instability then stability in it. For example only home and power buttons work. OTG also non functional.
MaicoLinuX said:
As you said, the 2.6.32 kernel puts the limit at Jessie, but that's not a problem as it's still mantained IIRC. I'm using a prebuilt rootfs but it keeps throwing Segmentation Fault whenever I try to chroot there, don't know what happens with this.
Click to expand...
Click to collapse
Jessie is no longer maintained. It stopped being oldstable about a month ago. AFAIK it changes little - apt continues to work; unless your applications have dependencies to newer libc, they should at least compile.
I build Debian root with debootstrap. On host machine:
Code:
debootstrap --arch armhf --foreign stable /debian http://http.debian.net/debian
Then mounting on Defy:
Code:
# Mount an sd card partition
mount -o remount,rw /
mkdir -p /debian
mount -o remount,ro /
mount -t ext3 -o noatime,suid,exec /dev/block/mmcblk0p2 /debian
mkdir -p /dev/shm
mount -t tmpfs -o rw,nosuid,nodev,noexec none /dev/shm
mount -t proc proc /debian/proc
mount -t sysfs sysfs /debian/sys
mount -o bind /dev /debian/dev
mount -o bind /dev/pts /debian/dev/pts
mount -o bind /dev/socket /debian/dev/socket
mount -o bind /dev/shm /debian/dev/shm
Then debootstrap second stage:
Code:
LD_PRELOAD= TMPDIR= PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/root SHELL=/bin/bash /system/bin/chroot /debian /debootstrap/debootstrap --second-stage
Done. To login:
Code:
chroot /debian /bin/su -
Don't chroot into bash. It will leak Android's shell environment into Debian's.
Android has its own groups and users. To make Debian adapt:
Code:
dpkg -i android-permissions_0.2_all.deb
Edit /etc/group, so that it contains:
Code:
inet:x:3003:root,_apt
net_raw:x:3004:root
Edit /etc/passwd/:
Code:
-_apt:x:104:65534::/nonexistent:/bin/false
+_apt:x:0:65534::/nonexistent:/bin/false
Edit /etc/adduser.conf:
Code:
-LAST_SYSTEM_UID=999
+LAST_SYSTEM_UID=99900
-LAST_SYSTEM_GID=999
+LAST_SYSTEM_GID=99900
-FIRST_UID=5000
+FIRST_UID=500000
-LAST_UID=8999
+LAST_UID=899900
-FIRST_GID=5000
+FIRST_GID=500000
-LAST_GID=8999
+LAST_GID=899900
Then:
Code:
apt-get update
apt-get install dialog
apt-get install locales
dpkg-reconfigure locales
apt-get install less man
If apt can't resolve hostnames select a nameserver in /etc/resolv.conf.
This how I setup Debian on chroot. Some of these steps may be unnecessary - they got accumuated over the years and I don't fully remember reasoning behind them. Debian inside /data/ should work too. I can imagine there would be problems with permissions on fat32 /sdcard, but /data/ is ext3.

Categories

Resources