[KERNEL][3.0.31][OC, CIFS, TUN]intersectRaven's Kernel 07/31/2012 17:34 - Kindle Fire Android Development

This is my personally compiled kernel for the Kindle Fire with a few optimizations.
Acknowledgments:
DooMLoRD - for helping greatly in my initial trials on how to create kernels for the Fire
g1011999 - for providing a working .config
paulobrien - insecure boot image
franciscofranco - for some of the ARM optimizations which I've missed since I stopped modding the N1
hashcode - the 3.0 kernel base
Features:
- compiled using Mjolnir
- CPU overclocking code from OMAPZOOM repositories
- ARM code optimizations
What doesn't work:
same bugs as Hashcode's
Download URL:
http://intersectraven.euroskank.com/kernels/
Latest Changes:
20120730_08XX:
- backported cleancache and zcache improvements from 3.4
20120709_1619:
- added further tweaks to interactive scheduler
- rebased experimental optimization to minimize chance of faulty merge
20120703_1041:
- rebased to hashcode's 3.0.31 kernel with support for the touchscreen filter
- added an experimental optimization which in theory should make the kernel a bit more responsive...at least in theory...
20120619_2251:
- numerous ARM optimizations (most from the 2.6 series)
- ported CM's changes to the interactive governor and low memory killer
- GPU driver is compiled into the kernel
20120601_1145:
- integrated latest BFQ release 4 for selection (not default) in SetCPU
20120513_1557:
- integrated shutdown fix from hashcode
20120512_2044:
- first 3.0 release with almost all my tweaks
20120216_1740:
- final fix for TUN without module (if it still doesn't work, going to module in next release)
- UTF8 support for file systems
- some optimizations
20120211_1219:
- minor update for fixing OpenVPN based VPNs
20120207_19XX:
- unification release (unified all my modifications with my Galaxy Nexus kernel and restarted from scratch)
- ARM optimizations
- OC without thermal control
- compiler optimizations
- CIFS and TUN enabled
- now based on 2.6.35.14
- now in zip version for easier flashing
***DEPRECATED***
Instructions (stock WiFi driver):
1.) Boot to fastboot
2.) Test first using fastboot boot command
Instructions (custom WiFi driver):
1.) Turn off WiFi.
2.) Use adb push command to push tiwlan_drv.ko to /sdcard/
3.) Using root explorer, rename tiwlan_drv.ko from /system/etc/wifi to tiwlan_drv.ko.bak.
4.) Usring root explorer, copy tiwlan_drv.ko from /sdcard/ to /system/etc/wifi. Make sure permissions are same with other files in directory together with owner and group being set to root.
5.) Reboot to fastboot and TEST FIRST using fastboot boot command
Detailed instructions are on the next post.
***DEPRECATED***
GitHub:
http://www.github.com/intersectRaven/kindle-kernel

Detailed Instructions:
Turn off your device's WiFi.
From your command prompt issue the ff. commands:
Code:
adb shell
su
idme bootmode 4002
reboot
This will cause your kindle to reboot to fastboot mode. Issue the ff. commands:
Code:
fastboot -i 0x1949 boot bootnew.img
This will cause the Kindle to boot TEMPORARILY to the new kernel which I assume you downloaded from me.
If it doesn't boot normally, you can turn off your Kindle by holding down the power button for at least 10 seconds then turn it on again.
This will boot your Kindle to fastboot mode again.
If the kernel didn't work:
Code:
fastboot -i 0x1949 oem idme bootmode 4000
fastboot -i 0x1949 reboot
This will reboot your Kindle back to normal.
If the kernel worked, here's how to flash it permanently:
Code:
fastboot -i 0x1949 flash boot bootnew.img
fastboot -i 0x1949 oem idme bootmode 4000
fastboot -i 0x1949 reboot
This should boot up with the new kernel.
Once you've booted up properly, issue the ff. commands to replace your stock WiFi driver with the new one.
Code:
adb push tiwlan_drv.ko /system/etc/wifi/
adb shell
su
cd /system/etc/wifi
chmod 644 tiwlan_drv.ko
Ensure that the permissions, owner and group settings for the new WiFi driver are correct by issuing:
Code:
ls -l
Turn on your WiFi.

Partition Backup Instructions:
From your command prompt, issue the ff. commands:
Code:
adb shell
su
This should give you superuser command prompt on your Kindle Fire. To confirm,
you should see a # as your command prompt. Next, issue the ff. commands to backup the smaller partitions to your sdcard. Make sure that the sdcard isn't mounted on your computer so that it is accessible to the Kindle Fire.
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/xloader.bin
dd if=/dev/block/mmcblk0p2 of=/sdcard/bootloader.bin
dd if=/dev/block/mmcblk0p3 of=/sdcard/dkernel.bin
dd if=/dev/block/mmcblk0p4 of=/sdcard/dfs.bin
dd if=/dev/block/mmcblk0p5 of=/sdcard/recovery.bin
dd if=/dev/block/mmcblk0p6 of=/sdcard/backup.bin
dd if=/dev/block/mmcblk0p7 of=/sdcard/boot.bin
After executing those commands, you can now mount the sdcard through USB and copy those files to your HD for backup purposes. The remaining partitions through 8 - 11 can be backed up as well but I'll leave that to your own discretions. These partitions were chosen because they're either critical or unreplicable.
You can also use adb to pull the images above directly to your PC. Here're the commands to do so:
Code:
adb pull /dev/block/mmcblk0p1 xloader.bin
adb pull /dev/block/mmcblk0p2 bootloader.bin
adb pull /dev/block/mmcblk0p3 dkernel.bin
adb pull /dev/block/mmcblk0p4 dfs.bin
adb pull /dev/block/mmcblk0p5 recovery.bin
adb pull /dev/block/mmcblk0p6 backup.bin
adb pull /dev/block/mmcblk0p7 boot.bin

for stock only?

JackpotClavin said:
for stock only?
Click to expand...
Click to collapse
Yeah. There's still a couple of glitches though. Seems connecting USB crashes everything.

And wifi doesn't work?
Sent from my Kindle Fire using xda premium

Veritass said:
And wifi doesn't work?
Sent from my Kindle Fire using xda premium
Click to expand...
Click to collapse
Yup. That's why it's marked INCOMPLETE in the title.

Stock Wifi works now!
*a bit flaky though...drops every now and then...still fixing...

great work mate!!!
have u uploaded sources to git?
also can u please send link of correct toolchain to use?

Have you tried to compile the bluetooth module? I still believe that the Kindle has Bluetooth support

DooMLoRD said:
great work mate!!!
have u uploaded sources to git?
also can u please send link of correct toolchain to use?
Click to expand...
Click to collapse
I'm still thinking of how to quickly upload to git.
As for the toolchain, anything should work. I've fixed my source to use Mjolnir though since I need it for some planned compiler fixes I want to use.
N23 said:
Have you tried to compile the bluetooth module? I still believe that the Kindle has Bluetooth support
Click to expand...
Click to collapse
Not yet. I was quite busy with fixing the WiFi module loading (since it's a pain to build) so I haven't looked at that. Also, even if I enable it, there's no support in the stock ROM so we need CM7 (or 9) to work as well.

intersectRaven said:
I'm still thinking of how to quickly upload to git.
As for the toolchain, anything should work. I've fixed my source to use Mjolnir though since I need it for some planned compiler fixes I want to use.
Not yet. I was quite busy with fixing the WiFi module loading (since it's a pain to build) so I haven't looked at that. Also, even if I enable it, there's no support in the stock ROM so we need CM7 (or 9) to work as well.
Click to expand...
Click to collapse
no problems mate
btw seems one of the kernels i posted yesterday boots, atleast for one user :
http://forum.xda-developers.com/showthread.php?p=20130507#post20130507
regarding wifi, do u have any idea which model of TI chipset is there?
i have the following repo for patched TI modules for Xperia 2011 devices... give it a shot if it works for Kindle Fire...
https://github.com/DooMLoRD/Xperia-2011-TI-WLAN

DooMLoRD said:
no problems mate
btw seems one of the kernels i posted yesterday boots, atleast for one user :
http://forum.xda-developers.com/showthread.php?p=20130507#post20130507
regarding wifi, do u have any idea which model of TI chipset is there?
i have the following repo for patched TI modules for Xperia 2011 devices... give it a shot if it works for Kindle Fire...
https://github.com/DooMLoRD/Xperia-2011-TI-WLAN
Click to expand...
Click to collapse
Thanks for the info! I'll try that later. Fyi, I tried the one in Amazon's release and it didn't work but maybe I did something wrong. I am quite unfamiliar with compiling modules outside of the kernel tree.
*Seems you modified it heavily to prevent reliance in outside export commands.

intersectRaven said:
Thanks for the info! I'll try that later. Fyi, I tried the one in Amazon's release and it didn't work but maybe I did something wrong. I am quite unfamiliar with compiling modules outside of the kernel tree.
*Seems you modified it heavily to prevent reliance in outside export commands.
Click to expand...
Click to collapse
me too
hahahha... yes i had to got bored with long commands
just the msm_env.bash is changed...

DooMLoRD said:
me too
hahahha... yes i had to got bored with long commands
just the msm_env.bash is changed...
Click to expand...
Click to collapse
Forgot to mention that the WiFi is wl1283.

intersectRaven said:
Forgot to mention that the WiFi is wl1283.
Click to expand...
Click to collapse
On the Wifi chip, a quick look at Chipworks indicates that not only does the WL1283 have bluetooth, but also GPS. Providing that its wired up right inside, should we also be able to get GPS working as well? Or is it missing the GPS antenna to make it work?

jcatt said:
On the Wifi chip, a quick look at Chipworks indicates that not only does the WL1283 have bluetooth, but also GPS. Providing that its wired up right inside, should we also be able to get GPS working as well? Or is it missing the GPS antenna to make it work?
Click to expand...
Click to collapse
Might have to add the GPS antenna if anything, but bluetooth could be possible. We just dont know if it has to be enabled in software or if it cant due to the hardware

jcatt said:
On the Wifi chip, a quick look at Chipworks indicates that not only does the WL1283 have bluetooth, but also GPS. Providing that its wired up right inside, should we also be able to get GPS working as well? Or is it missing the GPS antenna to make it work?
Click to expand...
Click to collapse
interesting... the TI driver i have (for Xperia 2011 devices) is WL1273... i have talked to a developer friend and he told me that WL12xx drivers are unified so we can try those drivers too...

Downloading the source here in a bit, but I had a few questions.
Can you check the gpu config? I believe its 1.7 pvr driver but the 3d memory has been cut down a bit. I'm not sure if it'd be possible to move some of that back w/o affecting other optimizations in the kernel. The reason I ask, is that I know ICS/tablet apps would run better with a bit more dedicated 3d mem.
I noted that CM7 was having some audio issues, is the kernel using a stock SoC/Alsa config? Or did they do something odd?
Lastly, I applaud you guys for grinding this out, it's always best to start from the ground up. Great work!
Sent from my DROID3 using XDA App

Kernel updated! See OP for changes.

Related

Xoom WiFi (MZ604) Root!!

This is it guys... HUGE props to bigrushdog (his kernel made this possible!), MADindustries and modplan!
Download the Motorola WiFi Xoom Root Zip file and unzip it. (MediaFire) - Contains Tiamat 1.3.1
You need the Moto Drivers - Read this thread to START you - http://forum.xda-developers.com/showthread.php?t=981578
You'll need fastboot - get it here http://developer.htc.com/adp.html
Make sure you have the latest SDK - adb and fastboot should be in /platform-tools - http://developer.android.com/sdk/index.html
Place the files in the SDK Tools folder.
If rebooting works... - This will wipe your phone by the way!!
adb reboot bootloader
fastboot oem unlock
adb reboot bootloader
If stuck at "Dual Core Technology"
Hold VolUp and power to restart Xoom
Hold VolDown will booting unit for fastboot mode
fastboot flash boot boot.img
fastboot reboot
adb shell
mkdir /data/media/sdcard2
exit
(physically put in microSD card if you are planning to use)
adb reboot
adb remount
adb push bcm4329.ko /system/lib/modules/bcm4329.ko
adb push cifs.ko /system/lib/modules/cifs.ko
adb push tun.ko /system/lib/modules/tun.ko
adb push scsi_wait_scan.ko /system/lib/modules/scsi_wait_scan.ko
adb push su /system/bin
adb shell ln -s /system/bin/su /system/xbin/su
adb shell chmod 4755 /system/bin/su
adb push Superuser.apk /system/app
adb push vold.fstab /system/etc/vold.fstab
adb reboot
adb shell
WE HAZ ROOT!!
Check out this video for basic Windows walkthrough from Buddhahb - http://www.youtube.com/watch?v=ZsVpY0PDwtQ
Check out this video for basic Mac walkthrough from sleeplessninjas - http://www.youtube.com/watch?v=zC6J-hV6SM4
Update: 3/27/2011 12:04pm CST Added cifs.ko, tun.ko, and scsi_wait_scan.ko
Update: 3/27/2011 12:22pm CST Added vold.fstab file for USB mounting & MegaUpload
Update: 4/13/2011 10:07am CST Updated to Tiamat's 1.3.1 kernel for SD card support & Gallery support.
awesome work guys!
Woooooooooooooooooooooooooot
fantastic work!!
\o/
can you try the cifs.ko module as well? i have a 3g version and am curious
Thanks Xaositek and HUGE props to MADindustries and modplan for coming up with a quick solution.
Is there a rip of the stock "boot.img" in case it doesn't work so that people who soft brick their xoom can return it back to stock? If so can that be posted in the OP's post? I know I am not the only paranoid one that would like to have the stock boot.img before attempting any rooting.
Also just for curiousity, can someone explain the differences between the wifi and wifi+3g boot.img versions and what they had to do to workaround this. Thanks.
We end up replacing the stock boot - We'll probably need to wait for Motorola to toss us a bone there
I just downloaded the "xoomwifiroot.zip" file and realized the files in the "xoomwifiroot.zip" are just tiamat's 1.1.6 files (boot.img and kernel modules) that can be found in tiamat's thread.
I was expecting the files to be something different that was close to the original root method by Koush where there is a "rootboot.img".
Maybe a better question for my understanding is this. Sorry if I am a noob.
Is Koush's file rootboot.img for the original xoom root only good for rooting the system while tiamat's boot.img file not only roots the system but also has code to overclock the xoom?
ericdabbs said:
I just downloaded the "xoomwifiroot.zip" file and realized the files in the "xoomwifiroot.zip" are just tiamat's 1.1.6 files (boot.img and kernel modules) that can be found in tiamat's thread.
Click to expand...
Click to collapse
It also has the su and Superuser.apk but essentially yes...
ericdabbs said:
Is Koush's file rootboot.img for the original xoom root only good for rooting the system while tiamat's boot.img file not only roots the system but also has code to overclock the xoom?
Click to expand...
Click to collapse
Koush's rootboot got us into this mess, Tiamat's boot.img got us out of it. It also allows the critical adb remount to allow the next steps.
Xaositek said:
It also has the su and Superuser.apk but essentially yes...
Koush's rootboot got us into this mess, Tiamat's boot.img got us out of it. It also allows the critical adb remount to allow the next steps.
Click to expand...
Click to collapse
Gotcha. Thanks for all your help.
ericdabbs said:
Gotcha. Thanks for all your help.
Click to expand...
Click to collapse
Grab the latest file from MegaUpload and add the additional modules
glad I could help get this working and glad that it fixed my bricked xoom! One thing that I would suggest is someone pull the stock ko files and save them, after moto releases the stock boot.img files I am sure that there will be some people that want to go back to the stock kernel which will then be as easy as flashing the stock boot.Img and then pushing the stock ko files back on.
Guess I'll run out and grab one now at Best Buy then. Thanks!
modplan said:
glad I could help get this working and glad that it fixed my bricked xoom! One thing that I would suggest is someone pull the stock ko files and save them, after moto releases the stock boot.img files I am sure that there will be some people that want to go back to the stock kernel which will then be as easy as flashing the stock boot.Img and then pushing the stock ko files back on.
Click to expand...
Click to collapse
Is there a way to extract the stock boot.img and wifi ko files before flashing it with tiamat's files? If so, what are the instructions so that people who haven't rooted it yet can give it a try. That way we can give back to the community.
ericdabbs said:
Is there a way to extract the stock boot.img and wifi ko files before flashing it with tiamat's files? If so, what are the instructions so that people who haven't rooted it yet can give it a try. That way we can give back to the community.
Click to expand...
Click to collapse
Pulling the boot image looks like it is rather difficult but pulling the ko files should be as simple as using the adb pull command instead of adb push. For example
Adb pull /system/lib/modules/something.ko c:/something.ko (put the right paths obviously the second path is just where you want to save it on your computer)
As an FYI. coolbho's ocboot.img does not work on the wi-fi version of the xoom yet. To prevent your headaches I have already flashed and it stays at boot screen. Tiamat's seems the only kernel that is working for wi-fi only
modplan said:
Pulling the boot image looks like it is rather difficult but pulling the ko files should be as simple as using the adb pull command instead of adb push. For example
Adb pull /system/lib/modules/something.ko c:/something.ko (put the right paths obviously the second path is just where you want to save it on your computer)
Click to expand...
Click to collapse
Got it. When I get my wifi xoom, I'll give this a shot.
d3coy3d said:
As an FYI. coolbho's ocboot.img does not work on the wi-fi version of the xoom yet. To prevent your headaches I have already flashed and it stays at boot screen. Tiamat's seems the only kernel that is working for wi-fi only
Click to expand...
Click to collapse
Tiamat's kernel allows for the 1.5ghz OC
When i command to push the first file, I get all the info on android debug.
chaz03 said:
When i command to push the first file, I get all the info on android debug.
Click to expand...
Click to collapse
Revisit the instructions now - you can just copy and paste them all now

Addition PPP modules for Franco's Kernel (fixes netextender)

I've compiled two additional ppp modules for franco's Galaxy Nexus kernel. These fix the I/O error with Sonicwall Netextender and maybe other apps. I would post these in his development thread but for now I'm under the 10 post count and can't. I take no responsibility if this blows up your phone, makes your toaster come to life or anything else you may come up with. Use at your own risk.
Short howto (assuming your on a computer):
Unzip the correct ppp-(version).zip from below (this gives you two files ppp_async.ko & ppp_synctty.ko)
Use adb to push both files to /sdcard/ (example: adb push ppp_async.ko /sdcard/)
Use adb shell or terminal emulator and navigate to /sdcard/
Insmod both modules (example: insmod ppp_async.ko & insmod ppp_synctty.ko) in your shell. This step will have to be done on each reboot.
*** I have only tested this on CDMA GNEX ***
For Franco's GNEX 18.4 kernel: http://dl.dropbox.com/u/19832908/ppp-franco/18.4/ppp-18.4.zip
Sonicwall released there new Mobile connect client today which appears to no longer require the extra ppp modules.
https://market.android.com/details?...yLDEsImNvbS5zb25pY3dhbGwubW9iaWxlY29ubmVjdCJd
Sent from my Galaxy Nexus using Tapatalk

[modules] cifs.ko, md4.ko, nls_utf8.ko, stock [4.2 / 4.2.2] 3.4.5-g4e6298b / gaf9c307

I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
Is it posible to make a CWM flash file?
Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details
H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.
H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!
You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module
craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.
Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.
Ok, added a script and instructions to the front page for simple on tablet mounting.

[Q] Building CM9, help!

hello xda-developers
I am having problems building from source, I've been trying to get his to work for over a week or so with the help from the lovely people here:
https://github.com/EpicCM/d710tools/issues/10
I think this forum is probably a better place, I will organize my thoughts better on this forum for all to read!
i've tried to install this on different systems, a 12.04 ubuntu, 12.04 and a clean 10.04 vm. in my next post i show all logs for the 10.04 attempt. the build results are also for 10.04
WHAT'S WRONG:
The problem is (depending on the guide i follow) cm9 either does not build (complains about libump.so not existing, despite having the proprietary repo in my localmanifest), or when i install the .zip, my phone goes into an eternal black screen after the "samsung galaxy s2" screen
There are two different basic setups i've been doing (i've tried these two setups in ubuntu 12.04,12.10,10.04LTS)
And i cannot figure out why the [email protected]#$ing [email protected]#$ why!!!!!!!! /rant
(log)Build instructions 1:
this is the build instructions that lead to a build error, these instructions were taken from here:
https://github.com/EpicCM/d710tools/wiki
commands: http://pastebin.com/WbXgKmZp
results:http://pastebin.com/Lq5iLt8L
Note: between each build i do make clobber and make installclean.
(log)Build instructions 2 (after i do make clobber and make install clean, repo sync, and the vendor and d710 tools again):
taken from the readme here
https://github.com/EpicCM/d710tools
commands: . build/envsetup.sh && brunch cm_d710-userdebug
built results:http://pastebin.com/8FWtqkRf
and if you feel the need to download the file, here is a direct download link
buildresults.txt : pastebin.com/download.php?i=8FWtqkRf
NOTE: you'll notice i had to sudo apt-get install schedtool. Also, i've done this from scratch before so i know if i dont at the end up the build it tells me to get pngcrush, so i do that too
WHAT I KNOW:
I've done my homework on the error for the build instructions 1:
-I know libUmp.so is a proprietary file, and the file does no exist in that directory, however it exists in another directory.
-Looking at the proprietary, that is where it should be, is there a script to move these directories? it's not a simple one line cp.
WHAT I DONT KNOW:
-builds but black screens? wtf?
-even if i managed to make something to do the cp to the appropriate directories, I dont even know if i'll end up with the same problem
-perhaps there is more not stated in the tutorial? if so I cannot find it
help? i've lost some hair over this, i hope you all can help buy me time to grow it back
i'll try anything.... i'll start over from an 11.10 if somebody even hints it might work...
what i want from this post
--well of course i would love a solution
--but really what i need is help to debug this, i have no idea where to start, i've done all i believe google and my brain can handle
reserved
more debug information, non build logs. These are the instructions as i followed
LOGS:
With the goal of being very thoughrough, i will start from a clean ubuntu 10.04 VM (network is using bridged), and I will post the result of each command to setup the environment for building.
If i saw an error with these i would google, but i dont see a problem, so i'm here.
Here we go (using this guide to setup env for 10.04 https://github.com/EpicCM/d710tools/wiki)
NOTE: for this step i had to change 0.2.4 to 0.2.6 because 0.2.4 was not building, 0.2.6 appears to work with no problem.
Setup local java repo and java commands: http://pastebin.com/RGhD1Shb
Results: http://pastebin.com/iEnNzSh3
(log)Installing required packages (Ubuntu 10.04)
commands: http://pastebin.com/eCZXkNvV
results: http://pastebin.com/vwzxfVsq
(log)Iidk what this is but guide said to do it for ubuntu 10.04:
command: sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
result: [sudo] password for tryagain: [email protected]:~$
(log)IMKDIRS, DOWNLOAD REPO, INIT REPO:
commands:http://pastebin.com/58aunVxB
results:http://pastebin.com/kKq9vyf5
(log)IThen i LOCAL MANFIFEST saved as local_manifest.xml inside ~/android/system/.repo/local_manifest.xml, here's what my localmanifest looks like:
http://pastebin.com/SCPAV8Ne
(log)IREPO SYNC THE FILES:
you may notice in the script file i had to repo sync -j1 more than once, because sometimes it would fail... in the end had no errors
commands : repo sync -j1
results: http://pastebin.com/a5Pa3sbL
results2: http://pastebin.com/VGPcPrE6
(the reason why there are two results is that i apparently forgot to save the local_manifest.xml the first time, results2 shows with the syncing of the files i have in my local manifest)
(log)IPREBUILTS, APPLY.SH:
commands: http://pastebin.com/VVx84ujN
results: http://pastebin.com/w9Wij28c
NOTE: i had to gedit the vendor to get the term.apk since
https://github.com/downloads/jackpal/Android-Terminal-Emulator/Term.apk isnt working
i replaced https://github.com/downloads/jackpal/Android-Terminal-Emulator/Term.apk with http://dl.dropbox.com/u/11103217/Term.apk to get things going.
reserved
reserved just in case, i got a lot of text
I've tried different jdks different tutorials and refine this from scratch on 3 different Linux versions
Sent from my SPH-D710 using xda app-developers app
updated!!!!
bump
1/24hour bump
1/24 bump
Nigel here, try running running: adb lolcat ; while you're on the blackscreen so we can get some insight into what's wrong with the rom.
so adb logcat doesnt work, it doesnt recognize my device as connected to my computer on the black screen.
The computer says it's an unknown device, or the device errored.
but that didnt stop me from trying anyway, i went into recovery to try and find what i wanted. As adb works in recovery for some reason.
when i execute it in recovery i get this
C:\Users\dfreelan\Downloads>adb logcat
/sbin/sh: exec: line 1: logcat: not found
so I went into adb shell while in recovery and executed /system/bin/logcat and got this
http://pastebin.com/8hnAa3iK
I went into /dev/log and executed "cat main" and tried to cat all the other things there, but i didnt get more information than what you see there.
Here is the recovery.log from installing the .zip, in case that is good for some debugging:
http://pastebin.com/gVC1TYyy
dfreelan said:
so adb logcat doesnt work, it doesnt recognize my device as connected to my computer on the black screen.
The computer says it's an unknown device, or the device errored.
but that didnt stop me from trying anyway, i went into recovery to try and find what i wanted. As adb works in recovery for some reason.
when i execute it in recovery i get this
C:\Users\dfreelan\Downloads>adb logcat
/sbin/sh: exec: line 1: logcat: not found
so I went into adb shell while in recovery and executed /system/bin/logcat and got this
http://pastebin.com/8hnAa3iK
I went into /dev/log and executed "cat main" and tried to cat all the other things there, but i didnt get more information than what you see there.
Here is the recovery.log from installing the .zip, in case that is good for some debugging:
http://pastebin.com/gVC1TYyy
Click to expand...
Click to collapse
adb logcat doesnt work in recovery.
While in recovery, adb shell and pull a last_kmsg, also try editing your local_manifest to build with the ics device tree not the smdk tree and see if that helps.
ie: "<project name="EpicCM/android_device_samsung_d710" path="device/samsung/d710" remote="github" revision="smdk" />" change that to "ics", i think smdk had some issues with cm9.
also if you want, hit up #jb-dev-e4gt on freenode, you may get some help there, our main dev chris41g is MIA so the progress on this device is at a stand-still. Though i do see sbrissen and PhantomPhreak53 are working on cm10.1
hrubak said:
adb logcat doesnt work in recovery.
While in recovery, adb shell and pull a last_kmsg, also try editing your local_manifest to build with the ics device tree not the smdk tree and see if that helps.
ie: "<project name="EpicCM/android_device_samsung_d710" path="device/samsung/d710" remote="github" revision="smdk" />" change that to "ics", i think smdk had some issues with cm9.
also if you want, hit up #jb-dev-e4gt on freenode, you may get some help there, our main dev chris41g is MIA so the progress on this device is at a stand-still. Though i do see sbrissen and PhantomPhreak53 are working on cm10.1
Click to expand...
Click to collapse
well apparently it never writes to /proc/last_kmsg
I figured for kicks and giggles i'd show you kmsg i got freshly booting into recovery, but my guess is that it's no good.
http://pastebin.com/jJC6ZJsZ
here's the brunch std err, they error out as there is no target for d710 (maybe i should use the old kernel? new one is smdk)
http://pastebin.com/jP0mTkZS
brunch stdout
http://pastebin.com/X571EkmR
here's what happens when i use make -j4, you'll notice it still errors out on libUMP.so
http://pastebin.com/eXEcTRPK
here's the new local_manifest.xml, you know to make sure i didnt [email protected]#$ up
http://pastebin.com/zXLCWDAP
when i use the _old kernel (android_kernel_samsung_epic4gtouch_old) i get this build error:
http://pastebin.com/09hDh8Nh
when i use the control kernel (android_kernel_samsung_epic4gtouch) It compiles!!!!!
however, still does the same infinite black screen (and i was so optimistic too)
here's my new local_manifest.xml
http://pastebin.com/FgARtF77
and of course, there is still no last_kmsg :-/
You might take a look at this:
http://aosp.chris41g.org/chris41g_o...How-To-Compile-CyanogenMod-9-from-Source.aspx
I followed this guide, generally, with changes to compile CM10 and got it to work. I did it on ubuntu 12.04. I did have to make some changes for 12.04. I didn't/don't know what I am doing, but got it to compile and flash and work.
todivefor said:
You might take a look at this:
http://aosp.chris41g.org/chris41g_o...How-To-Compile-CyanogenMod-9-from-Source.aspx
I followed this guide, generally, with changes to compile CM10 and got it to work. I did it on ubuntu 12.04. I did have to make some changes for 12.04. I didn't/don't know what I am doing, but got it to compile and flash and work.
Click to expand...
Click to collapse
i was actually doing exactly that to try and get cm9 to work my very first time. i talked to hrubak on the irc channel. He looked at the ICS kernel and noticed chris41g changed some stuff and ssuspected that that's why CM9 wasnt working for me.
He suggested i just do CM10.
i'll post with my success or failure
Thanks for the reply!

Built kernel from scratch, touchscreen doesn't work?

Hi,
I have built the kernel for the Pixel 2 XL from scratch using the branch android-msm-wahoo-4.4-oreo-mr1 (since my device is running the March security update and it looks like that branch is the corresponding source for that build).
After I successfully get my Image.lz4-dtb and dtbo.img generated, I put them in an Anykernel zip and flashed it on my device. The device boots, but unfortunately input does not work on the touchscreen.
What did I do wrong? Do I need to copy over some modules that it generates too?
Thanks!
This issue is caused by kernel moduals mismatched. The device failed to insmod its peripherals' .ko(s) so the peripherals can't work.
You can solve it by pushing out/android-msm-wahoo-4.4/dist/ftm4.ko to /vendor/lib/modules/, follow below procedures:
disable-verity on the phone:
adb root
adb disable-verity
adb shell sync
adb reboot
push module:
adb root
adb remount
adb push out/android-msm-wahoo-4.4/dist/ftm4.ko /vendor/lib/modules/
P.S. It is better to push all ko(s) in the out/android-msm-wahoo-4.4/dist, or other peripherals like WLAN will still unable to work.

Categories

Resources