[development] Ubuntu as an app on Nook Tablet - Barnes & Noble Nook Tablet

This is a development thread. Do not post "good job", or "great idea", or "cool, i'm trying this now".. I want feedback.
Introduction
This is a precursor to a possible way of running a custom kernel and ROM on the Nook Tablet in a chroot environment. I've been working on an Android app and almost have a usable installer for my AndBuntu project. If we are sucessful, this installer can be converted to a Un-Nook-er app "AndNook" which may be used to install custom kernels and ROMs with additional work.
So, with that said, lets get to it.
You will need:
This is all the software you will need to run this script. If you don't have a Debian Linux based computer, you can dual boot, install Ubuntu within Windows, or run it from a memory stick.
A rooted Nook Tablet
Android Market installed on the Nook Tablet
Busybox Installed on the Nook Tablet
A Terminal Emulator installed on the Nook Tablet
A VNC viewer Installed on the Nook Tablet
A Linux computer, dual boot or run from a memory stick
Getting started
The basic process will go like this.. Generate an image in Ubuntu, put that on your /sdcard/Ubuntu folder and then execute a script
On the Linux computer execute the following code block
Code:
cd ~/Desktop
sudo apt-get install rootstock
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh --fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104 --locale en_US.UTF-8 --serial ttyS0 --doswap --swapsize 256M
This will take a while, and it will generate a image file with a bunch of charactors like ***************.img.
rename this file "ubuntu.img" without the quotes
create a folder on the Nook Tablet called "/sdcard/ubuntu". (that's internal storage folder "/ubuntu/")
copy the "ubuntu.img" file to the folder
copy THIS SCRIPT to your sdcard/ubuntu/ folder and name it "uboot".
launch the terminal emulator and execute the following code block
Code:
su
sh /sdcard/ubuntu/uboot
Paste the output of that command here. If it failed stop. If it worked, keep going
in the Ubuntu environment execute the following code block
Code:
/firstRun
tightvncserver
tightvncserver may ask you for a password
Launch your VNC Viewer app
Specify 127.0.0.1 as the connection address. Use your password which you selected in previous code block.
Please note, the script is designed for a Samsung Android device. There is a line in the SH script
Code:
export UbuntuLoopFS=/sdcard/ubuntu/ubuntu.img
This line may require modification.
I'm looking for feedback. If you cannot understand what's going on, please don't post. This is not user friendly.
I take no responsibility or liability for anything which may happen to your device. This may force your device into a boot loop 8 times and your device will be factory restored. If it does, please let me know and I will make changes accordingly.

I am interested in trying this but
How much data will need to be downloaded, I currently only have "borrowed" WiFi and cell phone
And does this give you a fully usable ubuntu with desktop and ability to install linux apps
thanks for info

little8020 said:
I am interested in trying this but
How much data will need to be downloaded, I currently only have "borrowed" WiFi and cell phone
And does this give you a fully usable ubuntu with desktop and ability to install linux apps
thanks for info
Click to expand...
Click to collapse
about 2-400 megs

Not sure if it makes a difference, but the NT mounts the sdcard at /mnt/sdcard
Any way, though, I have a Linux Mint (based on Ubuntu) distro installed through VirtualBox, and I'll throw together an Ubuntu installation as well right now. I'm more than willing to help out.

(misinterpreted the meaning of 'feedback'. Apologies.)
EDIT 2: Turning this into a useful post. Hopefully this is the kind of bull**** you want. If not, I'll try again!
Tried the image build on a system running Oneiric. Receive segfaults when attempting to add CA certs to java.
Code:
Setting up ca-certificates-java (20100412) ...
creating /etc/ssl/certs/java/cacerts...
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
/var/lib/dpkg/info/ca-certificates-java.postinst: line 40: 16110 Segmentation fault LANG=C LC_ALL=C keytool -importcert -trustcacerts -keystore $KEYSTORE -noprompt -storepass "$storepass" -alias "$alias" -file "$cacertdir/$pem" > $log 2>&1
/var/lib/dpkg/info/ca-certificates-java.postinst: line 40: 16113 Segmentation fault LANG=C LC_ALL=C keytool -importcert
trustcacerts -keystore $KEYSTORE -providerClass sun.security.pkcs11.SunPKCS11 -providerArg '${java.home}/lib/security/nss.cfg' -noprompt -storepass "$storepass" -alias "$alias" -file "$cacertdir/$pem" > $log 2>&1
error adding brasil.gov.br/brasil.gov.br.crt
Many segfaults follow. One for each cert it tried to install. Image build abends shortly after with an error code 1 in sub-process /usr/bin/dpkg.
At first I thought this might be due to my use of OpenJDK. I removed OpenJDK, installed Sun/Oracle JDK and experienced same. This may be Oneiric-specific. For giggles I'm trying oneiric as the dist in a follow-up build on this machine, and also moving to a second Ubuntu box that's running Maverick for another try at the original instructions. Will edit this post with future updates.

AdamOutler said:
[*]On the Linux computer execute the following code block
Code:
cd ~/Desktop
sudo apt-get install rootstock
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104 --locale en_US.UTF-8 --serial ttyS0 --doswap --swapsize 256M
This will take a while, and it will generate a image file with a bunch of charactors like ***************.img.
Click to expand...
Click to collapse
Arg, I let this go for ~an hour on my netbook and got a long way through the process before I got:
Code:
/usr/bin/stat: cannot read file system information for `/home/UserUser': No such file or directory
Segmentation fault
Can this be done on a 64-bit installation of ubuntu? I have that on the more powerful desktop downstairs.

You know that this is already in the market... Ubuntu install guide. An image of 10.10 for Arm is linked in the app along with the script to start it. I have it installed and running. Only issue I have is that the resolution is lower than Blaze as the image is designed for phones.
Sent from my BNTV250 using xda premium

liquidzoo said:
Not sure if it makes a difference, but the NT mounts the sdcard at /mnt/sdcard
Any way, though, I have a Linux Mint (based on Ubuntu) distro installed through VirtualBox, and I'll throw together an Ubuntu installation as well right now. I'm more than willing to help out.
Click to expand...
Click to collapse
mint will work.
LouZiffer said:
Personally I'd like the option of a slimmed down version that doesn't include the overhead of X/VNC, though I can understand the advantages of a GUI from a usability standpoint. That's a simple matter of generating an image without those options, but you might want to consider it if you're offering pre-generated images or scripts for download at some point.
Sent from my HTC Evo Design 4G using XDA Premium
Click to expand...
Click to collapse
This is the kind of bull**** I don't want in this thread. Congratulations on wasting a post.
jeph36 said:
Arg, I let this go for ~an hour on my netbook and got a long way through the process before I got:
Code:
/usr/bin/stat: cannot read file system information for `/home/UserUser': No such file or directory
Segmentation fault
Can this be done on a 64-bit installation of ubuntu? I have that on the more powerful desktop downstairs.
Click to expand...
Click to collapse
you need to log in as a full user. UserUser is not a valid user. Useruser does not have a home folder.

AdamOutler said:
you need to log in as a full user. UserUser is not a valid user. Useruser does not have a home folder.
Click to expand...
Click to collapse
It actually was "/home/jeph36/" where 'jeph36' is my normal ubuntu login. When I posted I thought maybe I should change it for some privacy reason, only to later realize that it is my xda user name anyway. I assume by "full user" you just mean the user that I use to login.
Edit: I tried again on the same computer with the same result. I am not sure what is missing. Unfortunately I can not stay up later to try on a different computer or with a new install (new 3-day old baby, work tomorrow, etc). Hopefully someone else has this working by tomorrow afternoon/evening, but if not I will get on it then.

AdamOutler said:
This is a development thread. Do not post "good job", or "great idea", or "cool, i'm trying this now".. I want feedback.
<QUOTE SNIP>
.
Click to expand...
Click to collapse
Saw a few mistakes such as "sh /sdcard/uboot" Shouldnt it be "sh /sdcard/ubunbtu/uboot"? I am currently n the proccess of getting ubuntu up and running in virtualbox and will be trying this out once i get this up and running for you.
Edit: The rootstock command did not work for me on ubuntu 10.04 it just spits out the command usage spill. IT installed rootstock just fine tho. so I am lost at the moment until I get some feedback of my own here. do I need to iunstall anything ontop of my fresh ubuntu install to get this working?
Edit got the command working but its still flawed big time as it keeps kicking out errors at me. You are going to want to take a good look at it and fix it.
Ed ok I managed to create the image file and here is the command i used to do it
Code:
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -f localhost --l ubuntu --p ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104 --locale en_US.UTF-8 --serial ttyS0
Not sure if it will work correctly or not but I am going to find out soon.
Edit: Ok got it transfered over and ran the "sh /sdcard/ubuntu/uboot" Command and this is the output from it
Code:
: permission denied
"
"
"
"
"
"
"
"
"
The command executed failed. please search for this command on Google. IF that fails, try [url]www.ubuntuforums.org[/url].
: permission denied
"
"
"
Setting up environmental variables
test: permission denied
Environmental is:
/sdcard/ubuntu/uboot: 96: Syntax error: "else" unexpected (expecting "then")

Montisaquadeis said:
Saw a few mistakes such as "sh /sdcard/uboot" Shouldnt it be "sh /sdcard/ubunbtu/uboot"? I am currently n the proccess of getting ubuntu up and running in virtualbox and will be trying this out once i get this up and running for you.
Edit: The rootstock command did not work for me on ubuntu 10.04 it just spits out the command usage spill. IT installed rootstock just fine tho. so I am lost at the moment until I get some feedback of my own here. do I need to iunstall anything ontop of my fresh ubuntu install to get this working?
Edit got the command working but its still flawed big time as it keeps kicking out errors at me. You are going to want to take a good look at it and fix it.
Ed ok I managed to create the image file and here is the command i used to do it
Code:
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -f localhost --l ubuntu --p ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104 --locale en_US.UTF-8 --serial ttyS0
Not sure if it will work correctly or not but I am going to find out soon.
Edit: Ok got it transfered over and ran the "sh /sdcard/ubuntu/uboot" Command and this is the output from it
Code:
: permission denied
"
"
"
"
"
"
"
"
"
The command executed failed. please search for this command on Google. IF that fails, try [url]www.ubuntuforums.org[/url].
: permission denied
"
"
"
Setting up environmental variables
test: permission denied
Environmental is:
/sdcard/ubuntu/uboot: 96: Syntax error: "else" unexpected (expecting "then")
Click to expand...
Click to collapse
try as superuser.. I'm downloading right now, later I'll tell if work

AdamOutler said:
mint will work.
Click to expand...
Click to collapse
Excellent, I will do this tonight and post results.
Montisaquadeis said:
Edit: Ok got it transfered over and ran the "sh /sdcard/ubuntu/uboot" Command and this is the output from it
Code:
: permission denied
"
"
"
"
"
"
"
"
"
The command executed failed. please search for this command on Google. IF that fails, try [url]www.ubuntuforums.org[/url].
: permission denied
"
"
"
Setting up environmental variables
test: permission denied
Environmental is:
/sdcard/ubuntu/uboot: 96: Syntax error: "else" unexpected (expecting "then")
Click to expand...
Click to collapse
I believe it should be sh /mnt/sdcard/ubuntu/uboot (though it appears that may be what you input), and it should be done as root.

Ok after giving terminal emulator root access all those permisson denied turn into not found. so that script dont work either way. the rest of that output stayed the same.

The script must be edited to the absolute path for the Ubuntu image.

good job, great idea, this is cool, i'm trying this now

AdamOutler said:
The script must be edited to the absolute path for the Ubuntu image.
Click to expand...
Click to collapse
I have the image on the sdcard in a folder called ubuntu and the file name is ubuntu.img
I would assume that is where the script is looking for the image and its there on the sdcard in the folder named ubuntu and the file is ubuntu.img

The image parameters were wrong..
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104 --locale en_US.UTF-8 --serial ttyS0 --doswap --swapsize 256M
should have been
Code:
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh -fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104 --locale en_US.UTF-8 --serial ttyS0 --doswap --swapsize 256M
See that? I didn't either... the comma after "ssh" should not be there.

Not sure if it's going to make a difference, but I am getting an error when running the (corrected) rootstock command:
Unable to open a folder for 4.0 GB Filesystem
No application is registered as handling this file
Click to expand...
Click to collapse
It's still running, so maybe it won't matter. This is on a 20GB (total, split 500M /boot, 10G /, 9.5G /home) VirtualBox Mint system.

And they are still wrong it should be -f localhost --l ubuntu --p ubuntu not -fqdn localhost --login ubuntu --password ubuntu

Montisaquadeis said:
And they are still wrong it should be -f localhost --l ubuntu --p ubuntu not -fqdn localhost --login ubuntu --password ubuntu
Click to expand...
Click to collapse
-f and --fqdn are interchangeable, but you're right, if you use fqdn it needs another dash, though you're wrong about --l and --p, it's either --login and --password or -l and -p Again, they're interchangeable.
The shorter way would be:
sudo rootstock -d maverick -s lxde,tightvncserver,openoffice.org,gimp,ssh, -f localhost -l ubuntu -p ubuntu -i 3800M --notarball -n "Ubuntu for Android" --kbmodel pc104 -x en_US.UTF-8 --serial ttyS0 --doswap --swapsize 256M
Click to expand...
Click to collapse
Though, for some reason, the -s switch doesn't seem to work (on my version) in place of --seed

Related

[HOWTO] Ubuntu on Folio 100

I'm sorry it took so long, I got lots of stuff to deal with. Good things are worth waiting for (i heard)
First off: You are responsible for any of your actions! Changes that are needed to boot Ubuntu on your folio will void your warranty!
Special Thanks goes to DerArtem for posting his Kernels, Weeds2000 for eMail support, topogigi for wifi hacking and last but not least the Ubuntu-Touch Team on IRC that made it possible for me to tweak the touchscreen driver.
However, the system you are about to create is not fully functional, there are still things missing (a working sound driver for example). Its nice to play with it anyway
Heres a quick walk-through:
We will flash a kernel to the toshiba folio tablet which makes it possible to boot from an sdcard or USB-stick (You have to choose one, we need at least 2GB, I'd recommend 4GB so you can install fancy stuff like OpenOffice etc.).
We will then create a root filesystem with rootstock, which will hold our Ubuntu system (similar to your hard drive-Ubuntu).
Finally, we have to tweak that filesystem and change passwords, copy wifi driver etc.
Then we're able to boot a beautiful Ubuntu.
Things you will need:
- A Computer running Linux (Debian / Ubuntu would be great. If you're not running Linux on your computer, running it on the folio would make absolutely no sense. Please don't ask, I don't know how to install it in Windows.)
- The files i added to this post
- A SD-Card, 2-4 GB should be fine.
- optional: A second SD-card, 128MB would be enough (for flashing)
- A USB hub (If you want to boot from USB AND use a keyboard.
- Some time... =)
The first thing you should do is flash one of the update.zip files; choose update-sdmmc.zip (this will boot your folio from sdcard) or update-usb.zip (this will boot from a usb pen drive), open it and unpack the content to a sdcard (This has to be a SDcard, we're gonna flash our device from there.)
Backup all your data on your folio (I'm serious! It'll be gone!) and turn it off.
Put the SDcard in its slot and turn the folio back on. Press + hold both power and volume up.
Follow instructions to do a system update (If you've never done this before you shouldn't start now =) )
When it reboots, your folio will show some funny black and white linux text stuff and hang somewhere. Congratulations! You just bricked your tablet. Now lets see how we can fix it... Turn it off (Keep power pressed for about 5 seconds) and take out the sdcard, put it in your PC.
It's getting messy now, so grab a beer and let's go:
Open a Terminal on your linux computer.
Code:
#echo "Hello world!"
If your console says "Hello World" you got it. Awesome! =)
Code:
#sudo apt-get install rootstock gparted
This will install rootstock, the tool we're gonna need to create our filesystem, as well as gparted, a tool for partitioning our flash drive. You can also install rootstock-gtk, the graphical version. Try it if you like:
Code:
#sudo apt-get install rootstock-gtk
I heard that ubuntu-netbook won't work because there are drivers missing, would somebody try that and report please?
If your beer is already empty when this is done, you need a faster computer. Tell your wife the guys at xda-developers told you so
Back to the terminal:
Code:
#sudo rootstock -f MyCoolHostName -l myCoolUserName -p myCoolPassword --seed xubuntu-desktop -i 2G --notarball
This will create our filesystem with a user called "myCoolUserName" and (theoretically) his password "myCoolPassword" and install a basic xubuntu-desktop. I had to change the password manually because it didn't work this way... We'll do that later.
Rootstock will download lots of packages (You could also set it up with "--seed ubuntu-desktop", then youll download even more packages or "--seed ubuntu-minimal" or kubuntu... I still didnt find a list of seeds online :-/
The creating will take quite some time, get another beer.
When this is done, you'll get a file like this : "qemu-armel-201104112120.img". We will now mount this image: (make sure the directory /mnt/ does exist and is empty:
Code:
#ls -la /mnt )
Code:
#sudo su
(its simpler to be root for now)
Code:
#mount -o loop qemu-armel-201104112120.img /mnt/
(You are aware that your filename is different, are you? Try this:
Code:
# mount -o loop qemu-armel-*TAB*
and your terminal will automatically fill in your filename. Awesome linux, huh? =)
)
Code:
#cd /mnt/etc/
#mv fstab fstab.bak
#echo "proc /proc proc defaults 0 0" > fstab
#echo "dev /dev tmpfs rw 0 0" >> fstab
Note that the first time we create a file called fstab (echo asdf > fstab), then we add one line to this file (echo asdfasdf >> fstab)
Now we need to copy our wifi-driver over. Remember I told you to write down the directory you put them in? =)
Code:
#cp /home/YourUserName/Desktop/FolioStuff/firmware /mnt/lib/firmware
We will now do something stupid: We chroot into our arm-based system from an intel-system. But since we're only changing passwords, we should be OK.
Code:
#cd /
#chroot /mnt/
#passwd myCoolUserName
#passwd
#exit
That's it, we're out of the chroot.
It's now time to prepare the SDcard (The steps are the same for a USB Flash drive, I think you'll figure them out.)
Find out how your SDcard can be accessed (You should still be root):
Code:
# fdisk -l
In my card reader, it's "/dev/mmcblk0", it could also be "/dev/sdb1" in your computer.
Now there are two possibilities:
1. You know what youre doing. Then it's easy: You wipe the only partition (or, if there are more than one, the first partition) on your sdcard and format it with ext3:
Code:
#mkfs.ext3 /dev/mmcblk0p1
Note: The device is called /dev/mmcblk0, the partition itself /dev/mmcblk0p1 (Partition 1)
2. You are not sure about this. No problem, start gparted: (as root!)
Code:
#gparted
In the upper right corner, select your flash drive, delete all partitions and create one formatted with ext3. Close gparted.
Mount your freshly created partition somewhere (i chose /mnt2/):
Code:
#mkdir /mnt2/
Code:
#mount /dev/mmcblk0p1 /mnt2
We can now copy our filesystem over. Make sure you use exactly the same flags (rfp for recursive, force, preserve (attributes))
Code:
#cp -rfp /mnt/* /mnt2/
OK, that could work. Unmount the sdcard:
Code:
#umount /mnt2/
Put it in your folio and cross your fingers.
Wifi drivers will be up soon...
It's recommend to add build-essentials to your rootstock image too..
Because then you can easily build the wireless lan drivers on your devices..
Maybe I'll post a howto this afternoon!
Is this Ubuntu really usable (for daily work) with the folio 100 (touch, response speed, ecc.)?
Thanks.
Yup, it's usable for everyday work. It's quite fast on the Folio 100, I've been pretty impressed when I tested it a few weeks ago.
Thanks ph84
It seems most difficult than expected but, great job !
Only i have 1 question, bricking the tablet sounds dangerous... is possible break out the tablet and get a rock?
Thanksss!!!!!
if ubuntu is installed on sd, does that mean that we can dual boot foliomod from nand and ubuntu from sd/usb?
Hm... I'm using Ubuntu 11.04 and I'm getting this error at the end of the rootfs creation :
E: Sub-process /usr/bin/dpkg returned an error code (1)
E: Second stage build in chroot failed !
E: Please see the log to see what went wrong.
I: Cleaning up...
.....
I: Umounting temporary Image
umount2: Dispositivo o risorsa occupata
umount: /tmp/tmp.zaZ1j1Tgt6/tmpmount/proc: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount2: Dispositivo o risorsa occupata
Click to expand...
Click to collapse
Do you have any idea where I can find the log?
And this procedure will build in the tablet a dual boot? Or dualboot is another procedure?
what is the *.rar????
No it's for singleboot only...
You can only start Ubuntu installed on SD-Card/USB-Stick with this procedure...
I don't know wether the boot-partition is locked when you are booting ubuntu/android..
If not it should be possible to build some applications to flash the boot-partition on the running system to change from ubuntu to android
When I do the rootstock step,I got this error!!!Please help!!!
I: Base system installed successfully.
I: First stage install done
I: Using Chroot for installer
Adding 'local diversion of /usr/sbin/invoke-rc.d to /usr/sbin/invoke-rc.d.rootstock'
Generating locales...
en_GB.UTF-8... done
Generation complete.
Generating locales...
en_US.UTF-8... done
Generation complete.
/bin/installer: line 53: syntax error near unexpected token `+'
E: Second stage build in chroot failed !
E: Please see the log to see what went wrong.
I: Cleaning up...
.....
I: Umounting temporary Image
I: A logfile was saved as //rootstock-201104140706.log
I: Done
Click to expand...
Click to collapse
Could you upload an *.img for us in this forum?
or a databank,etc?
mhmm it always hangs in the xulrunner configuration.. bahh someone know a solution for this? or does i realy have to chroot the rootfst and install everything manualy =(? Cant find any solution on google for this bug =/
sony_tornado said:
what is the *.rar????
Click to expand...
Click to collapse
Nvm, I was talking crap...
schnudergof said:
mhmm it always hangs in the xulrunner configuration.. bahh someone know a solution for this? or does i realy have to chroot the rootfst and install everything manualy =(? Cant find any solution on google for this bug =/
Click to expand...
Click to collapse
Just try rootstock without the parameters on --seed..
Maybe it will work..
You wont have a Desktop Enviroment like Gnome or something but you wont need that for installing the wireless drivers...
And after installing wireless drivers you can install ubuntu-desktop or something with apt-get!
Ok, I have been looking at rootstock, and if you install rootstock-gtk and than click on tasksel there is a whole list of seeds to chose from. I Think im going to try build the netbook build.
On a side note:
We will now do something stupid: We chroot into our arm-based system from an intel-system. But since we're only changing passwords, we should be OK
Click to expand...
Click to collapse
with chroot your only changing the root of your file system, your not running anything from there.
But its its in no way a complaint to your awesome guide! Thanks and keep up the good work!
shidima_101 said:
with chroot your only changing the root of your file system, your not running anything from there.
Click to expand...
Click to collapse
Thats right but when you change your root shell to the rootstock-fs you can also use sudo apt-get update/install and install it into the rootfs!
ph84 said:
Meanwhile, open another terminal. (This is linux! We're gonna multitask since our computer is capable of handling that!) Go to where you stored the attached files, for example
Code:
#cd /home/YourUserName/Desktop/FolioStuff
and unpack them:
Code:
#rar x *.rar
Click to expand...
Click to collapse
Where/what is the "attached files"?
Thanks
Just go to the first page, press STRG+F and type attached into the search window...
I hope you will find the attached files.. Else you dont have to try installing ubuntu on your folio >_<
°EraZoR° said:
Just go to the first page, press STRG+F and type attached into the search window...
I hope you will find the attached files.. Else you dont have to try installing ubuntu on your folio >_<
Click to expand...
Click to collapse
The files I found are only *.zip for update bootloader. Where is *.rar file?
Thanks

[NEW] Need Mac OS X Tester (Script)

I have script that I want to make sure works on Mac OS X.
Could anyone test it for me?
Download here. Thanks.
Run it by:
Code:
chmod +x
./test
It's just a simple user input
Script output should be somewhat like this:
Code:
Enter input: [COLOR="SeaGreen"]XDA[/COLOR]
You typed: [COLOR="SeaGreen"]XDA[/COLOR]
What's the script do? I don't think most people want to just run a random script without knowing what it's purpose is.
SkyBehind said:
What's the script do? I don't think most people want to just run a random script without knowing what it's purpose is.
Click to expand...
Click to collapse
Sorry I forgot to explain it. It's just a simple user input
Script output should be somewhat like this:
Enter input: XDA
You typed: XDA
Ew mono
lithid-cm said:
Ew mono
Click to expand...
Click to collapse
>_< ... Do you have a Mac? (If you do can you test this?)
I have a Mac. I downloaded the file, there was no file extension. Tried running it with a .sh extension, no dice. Tried running it in terminal with no extension, again, no dice.
SkyBehind said:
I have a Mac. I downloaded the file, there was no file extension. Tried running it with a .sh extension, no dice. Tried running it in terminal with no extension, again, no dice.
Click to expand...
Click to collapse
Try issuing the command:
Code:
chmod +x
./test
This is what i get on OS X 10.8.2:
michael$ chmod +x test
michael$ ./test
-bash: ./test: cannot execute binary file
It's Compiled as windows portable executable. basically a windows console. as revealed with the linux "file" command
Code:
test: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
You need to check your compile settings buddy.
Alright I compiled it on Arch Linux (32bit)
file test:
Code:
test: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x1e06a9cf1d352f14daa5d1955a12ed185fd76768, stripped
Download the new one, here. Thanks.
(It's a simple user input. I just wanna test if it works on Mac)
Peteragent5 said:
Alright I compiled it on Arch Linux (32bit)
file test:
Code:
test: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x1e06a9cf1d352f14daa5d1955a12ed185fd76768, stripped
Download the new one, here. Thanks.
(It's a simple user input. I just wanna test if it works on Mac)
Click to expand...
Click to collapse
You compiled it for linux as well
Code:
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x1e06a9cf1d352f14daa5d1955a12ed185fd76768, stripped
I'm not 100% sure but I'm fairly sure that won't work on OSX ( I could be wrong ) you need to compile for Darwin which is what OSX is.
works great on linux tho
trevd said:
You compiled it for linux as well
Code:
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x1e06a9cf1d352f14daa5d1955a12ed185fd76768, stripped
I'm not 100% sure but I'm fairly sure that won't work on OSX ( I could be wrong ) you need to compile for Darwin which is what OSX is.
works great on linux tho
Click to expand...
Click to collapse
We'll see if it works on OSX or not...
I'm waiting for my Mac testers to be online...
Sorry, same as with the other one:
Michaels-MacBook-Proownloads michael$ ./test
-bash: ./test: cannot execute binary file
Michaels-MacBook-Proownloads michael$
You probably need a Mac to compile it for OS X.
Or maybe this helps:
http://devs.openttd.org/~truebrain/compile-farm/apple-darwin9.txt
Alright I think I've got it!
Can you please please test this new one?
file test:
Code:
test: Mach-O fat file with 2 architectures
Download here. Thanks!
Hi, I've tried run your file. This is the output:
-bash: ./test: Permission denied
Something missing?
alfanumerica said:
Hi, I've tried run your file. This is the output:
-bash: ./test: Permission denied
Something missing?
Click to expand...
Click to collapse
chmod a+x test
alfanumerica said:
Hi, I've tried run your file. This is the output:
-bash: ./test: Permission denied
Something missing?
Click to expand...
Click to collapse
chmod -x test
./test
I get a pop-up error:
Uncaught exception - [email protected]_read
sourcecodepoet said:
I get a pop-up error:
Uncaught exception - [email protected]_read
Click to expand...
Click to collapse
Same here. Lion 10.7.4
Sent from Xperia Mini Pro
I can't do that
Sent from my HTC Desire HD using xda premium

[GUIDE] How To Compile TWRP Recovery for QVGA And Other Unsupported Devices.

How To Compile TWRP Recovery For QVGA And Other Unsupported Devices​
Guys a humble request don't spam this thread. If you face any error reply to this thread or PM me i will help and after you build it please don't post your bugs here this thread is only for compiling and not for resolving bugs in your build. I can only help with the errors you face during compilation because i faced a lot .
I thank XDA members cybojenix, kD as i got an idea of how to make guides from them
I would also thank Dees_troy for the sources.
I have worked hard in creating this guide so when you release your build please give proper credits .
Click to expand...
Click to collapse
Minimum Requirements:-
1. RAM:- 4GB
2. HDD Space:- More than 18GB required for CM7 source code (I am going to use CM7 for this guide as CM9 is not yet supported for many devices).
3. Processor:- Equal to Core 2 Duo or Anything above it.
4. Internet Speed:- Minimum of 2 Mbps as we will be downloading files of large size.
5. Patience:- A lots of it needed to get success
Click to expand...
Click to collapse
Ok Lets Start With Step 1:- Setting Up Your Computer For Development.
Getting Linux​
Please note your PC/Laptop must satisfy the minimum requirements to continue. If it doesn't contact any person who is developing for your device to develop this.
Click to expand...
Click to collapse
For compiling you need Linux the most common and free Linux available for development is Ubuntu. Go ahead choose your version and download it.
If you wish to use Ubuntu 10.04 64-Bit for Development use this link
http://releases.ubuntu.com/lucid/ubuntu-10.04.4-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 10.10 64-Bit for Development use this link
http://releases.ubuntu.com/maverick/ubuntu-10.10-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 11.04 64-Bit for Development use this link
http://releases.ubuntu.com/natty/ubuntu-11.04-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 11.10 64-Bit for Development use this link
http://releases.ubuntu.com/oneiric/ubuntu-11.10-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 12.04 64-Bit for Development use this link
http://releases.ubuntu.com/precise/ubuntu-12.04-desktop-amd64.iso
Click to expand...
Click to collapse
After downloading install it in a Virtual Machine or dual boot it alongside another OS you are using now. If you are using a Virtual Machine make sure you allocate more than 50GB of HDD space.
So far so good now that you have Linux installed :victory: you can proceed to the next step of setting up which is followed in the second post.
Setting Up Your Laptop/PC For Development.​
Note:- You may be asked for a password when using sudo command.
Click to expand...
Click to collapse
Installing Python-2.7.5:-
First and foremost is installing Python. For those who are wondering what Python is well here is the answer Python is a language like C,C++,Java which primarily centers around Linux.
1. Open Terminal by hitting Ctrl+Alt+T.
2. Type or copy paste these codes into terminal (I prefer typing though )
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
tar -xvzf Python-2.7.5.tgz
cd Python-2.7.5
./configure --prefix=/usr/local/python2.7
make
sudo make install
sudo ln -s /usr/local/python2.7/bin/python /usr/bin/python2.7
3. Python is now installed to make sure type this code in terminal
Code:
python
and it should produce an output like this
Code:
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or " lincense" for more information.
>>>
4. If it shows something like that you are good to go.
5. Press Ctrl+D, close the terminal and proceed to install Java 6 JDK.
Installing Java 6 JDK:-
I have to thank cybojenix and kD for this part as it is theirs and i didn't write this part .
Click to expand...
Click to collapse
If you are using Ubuntu 12.04 follow these commands others skip this set of commands.
1. Download Java 6 JDK from here.
2. After Downloading copy that to the Downloads folder.
3. Open Terminal.
4. Type these commands one by one in the terminal
Code:
cd Downloads
chmod +x jdk-6u34-linux-x64.bin
sudo ./jdk-6u34-linux-x64.bin
sudo mv jdk1.6.0_34 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_34/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_34/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_34/bin/javaws 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
If you are not using Ubuntu 12.04 follow these commands:-
1. Open terminal
2. Type these commands one by one in the Terminal.
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
If you had done those steps correctly then you must now have Java installed.
To check and make sure it is installed type this command in terminal.
Code:
java -version
and the output should be
Code:
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
If the output was some thing similar you are now ready to install GNU Make.
Close the Terminal and proceed.
Installing GNU Make 3.81
Note:- Any other version of make either lower or higher won't work for compiling TWRP.
Click to expand...
Click to collapse
1. Open Terminal
2. Type these codes in terminal.
Code:
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.81
./configure
sudo make install
3. That's it now you got make installed.
To check and make sure that Make is installed type this command in Terminal.
Code:
make -v
and it shoud give the output
Code:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This Program built for x86_64-unknown-linux-gnu
If it was something smiliar to that you can close the terminal and proceed to the next step.
Ok now we got the big guns rolling it's now time for small guns without whom we can't compile yes I mean't the dependencies.
Open Terminal and apply these commands:-
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc gedit git schedtool
export USE_CCACHE=1
If you are using Ubuntu 10.10 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
If you are using Ubuntu 11.04 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386
If you are using Ubuntu 12.04 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386
sudo apt-get install libncurses5-dev:i386 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Good now you will have dependencies installed.
It is now time for SDK and ADB which will be continued in the next post.
Installing SDK and ABD​
Installing SDK:-
1. Download Android SDK from here.
2. Extract it to your home folder.
3. Rename the folder to sdk.
4. Open the Terminal and type these commands
Code:
cd sdk/tools
./android sdk
5. A window should popup and there will will be a list of Packages.
6. Install Android SDK Tools and Android SDK Platform-Tools.
Checking ADB:-
Since you installed Android SDK Tools and Android SDK Platform-Tools ADB must now be checked and configured.
1. Enable USB Debugging in your device and connect your phone to computer.
2. Now execute these commands in Terminal
Code:
cd sdk/platform-tools
./adb devices
It should give the output as
Code:
List of devices attached 0123456789ABCDEF device-name (Note the number-letter combination may vary)
If it does give like that skip Adding Permissions.
Or if it gives the output as
Code:
List of devices attached ????????????????? no permissions
Don't worry we have add permission to your device that's it.
Adding Permissions:-
1. Open Terminal
2. Execute this command.
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
3. It should open text editor
4. Paste this line
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666"
5. Replace Vendor ID with your Vendor id given in the list.
For e.g if your vendor is Acer you will replace "xxxx" with "0502"
Here is a list of Vendor ID's
Code:
Acer - 0502
ASUS - 0b05
Dell - 413c
Foxconn - 0489
Fujitsu - 04c5
Fujitsu Toshiba - 04c5
Garmin-Asus - 091e
Google - 18d1
Hisense - 109b
HTC - 0bb4
Huawei - 12d1
K-Touch - 24e3
KT Tech - 2116
Kyocera - 0482
Lenovo -17ef
LG - 1004
Motorola - 22b8
MTK - 0e8d
NEC - 0409
Nook - 2080
Nvidia - 0955
OTGV - 2257
Pantech - 10a9
Pegatron - 1d4d
Philips - 0471
PMC-Sierra - 04da
Qualcomm - 05c6
SK Telesys - 1f53
Samsung - 04e8
Sharp - 04dd
Sony - 054c
Sony Ericsson - 0fce
Teleepoch - 2340
Toshiba - 0930
ZTE - 19d2
6. Save and close the editor.
7. Execute this command in Terminal.
Code:
sudo gedit /etc/udev/rules.d/99-android.rules
8. Again paste this line
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666"
Replace "xxxx" with Vendor ID.
9. Save it and close the file.
10. Execute these commands one by one in the Terminal
Code:
sudo chmod a+r /etc/udev/rules.d/99-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Now RESTART your Ubuntu and type these codes in the Terminal.
Code:
cd sdk
./adb devices
You must not get the output with ???????????????? no permission still if you get it please reply below I will help.
Now we need to edit .bashrc so that we can access adb from anywhere
Execute these codes in the Terminal.
Code:
cd
sudo gedit .bashrc
It should open text editor copy paste this line at the end.
Code:
export PATH=${PATH}:~/sdk/tools
export PATH=${PATH}:~/sdk/platform-tools
Save it and close it.
Now in terminal type adb devices it should give output List of devices attached.
That's it you got Ubuntu, Python, Java 6 JDK, GNU Make-3.81, SDK and ADB ready.
Now you are ready to start development go on to the next step to download source code.
Intializing Repo And Download Source Code
Step 2:- Initializing Repository And Downloading Source Code​
Initializing Repository​
First step is to download the Repo which is essential to download the source code.
1. Open Terminal
2. Execute these commands one by one in Terminal
Code:
mkdir ~/bin
PATH=~/bin:$PATH
sudo apt-get install curl
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Downloading Source Code​
After you have initialized the repo you are set to download the source code.
1. Open Terminal
2. Execute these commands one by one in Terminal
Code:
mkdir source
cd source
repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread
sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -jx (Replace x with a number this number corresponds to number simultaneous download you want for e.g if you give 5 it will download 5 files at once so go on increase to whatever you like but be reasonable :D)
The Source Code is around 15GB - 17GB so have patience and more importantly HDD space.
Click to expand...
Click to collapse
.
The download will take hours if you are on slow connection like it will be a 2 days is 512kbps connection so if you are planning to develop please have a good internet connection with a reasonable fast speed. Every developer recommends more than 1Mbps and sometimes 4Mbps.
After downloading is finished go to source folder you must have many folders inside them. Also make a backup of the source folder just in case as we will modifying it so if something goes wrong you don't have to re-download it all again.
Go to the next step to start the actual development.
Modding Files And Stuff
Step 3:- Modding Files And Folders To Make Your Device Supportable.​
First up is to compile a build of ClockworkMod.
Building ClockworkMod:-
1. Open Terminal
2. Type these commands one by one in Terminal
Code:
. build/envsetup.sh
lunch (it should show you list of devices select your device with their serial number select your device by typing the serial number)
make clean
make -j4 recoveryimage
If you didn't receive an error you are ready to compile TWRP for your device.
If you do receive and error reply to the post I will help you.
Modifying Files And Folder:-
The original Dees_Troy's build folder isn't gonna work as your device resolution doesn't support it. So I have patched the build folder with some extra libs added to prelink map and patched recovery folder with gui changes for smooth compilation.
If you have experience with using git you can clone the repo or you can download it directly from github.
Click to expand...
Click to collapse
If you are going to clone execute these commands in terminal. (Thanks to cybojenix for this so that there will no manual copying).
Code:
cd source
rm -rf build/
rm -rf bootable/recovery/
git clone git://github.com/chainhacker/TWRP_Build -b 2.3 build
git clone git://github.com/chainhacker/TWRP_Recovery -b 2.3 bootable/recovery
If you are going to download directly use the following link make sure you are downloading 2.3 branch and extract it.
Here is the link for the patched build folder------>TWRP_Build
Here is the link for the patched recovery folder------>TWRP_Recovery
After you have done downloading from the above two files.
Replace the contents of source/build folder with the patched one.
Similarly replace the contents of source/bootable/recovery folder with the patched one.
I have 240x320 resolution already in the patched ones but if your device is not 240x320 and also not supported by TWRP download a theme made by other members which has your device's resolution or create a theme. I didn't create the theme though I resized the images and made changes in ui.xml. If you are interested in theming follow the official TWRP theming guide in their website.
If you did find a theme or created it rename the theme folder to your device resolution folder for e.g. If your device resolution is 320x240 you would rename the folder as 320x240.
Copy the theme folder into source/bootable/recovery/gui/devices.
That's it finished the basic requirements next up is configuring BoardConfig.mk.
Editing BoardConfig.mk:-
1. Navigate to source/device/your_vendor/your_device.
your_vendor:- Vendor of your device e.g for me it is lge.
your_device:- Your device name.
Click to expand...
Click to collapse
2. Find BoardConfig.mk and open it in a text editor.
3. Come to the last and add these line
Code:
#twrp
DEVICE_RESOLUTION:= [I]your_device_resolution[/I] (e.g If your resolution is 240x320 type it)
RECOVERY_GRAPHICS_USE_LINELENGTH := true
2. Save it and close it.
Yay you have finished everything only thing left out is compiling which is carried out in the next post.
Psssst.......
After you have compiled your first successful build here are few other things that you could add to BoardConfig.mk
Note:- You can add this after finishing first successful build of recovery till then avoid these.
Click to expand...
Click to collapse
Code:
RECOVERY_SDCARD_ON_DATA := true -- this enables proper handling of /data/media on devices that have this folder for storage (most Honeycomb and devices that originally shipped with ICS like Galaxy Nexus)
BOARD_HAS_NO_REAL_SDCARD := true -- disables things like sdcard partitioning
TW_INCLUDE_DUMLOCK := true -- includes HTC Dumlock for devices that need it
TARGET_RECOVERY_GUI := true -- uses gui format instead of ui.xml
TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565" -- to change the colour
TARGET_USE_CUSTOM_LUN_FILE_PATH :=/sys/devices/platform/usb_mass_storage/lun0/file
TW_CUSTOM_POWER_BUTTON := 107 -- to get a power button on the home screen of recovery
TW_EXTERNAL_STORAGE_PATH := "/sdcard" -- default external storage path
TW_EXTERNAL_STORAGE_MOUNT_POINT := "sdcard" -- default external mount point
TW_FLASH_FROM_STORAGE := true -- enables you to flash zips form the sdcard (You don't neeed o add this it is activated by default)
TW_HAS_DOWNLOAD_MODE := false -- to enable download or more precisely enabling usb mass storage
TW_HAS_NO_RECOVERY_PARTITION := true -- do this only if you device has no partion to recovery
TW_INCLUDE_CRYPTO := false
TW_INCLUDE_JB_CRYPTO := false
TW_NEVER_UNMOUNT_SYSTEM := true -- always keeps the system mounted
TW_NO_BATT_PERCENT := false -- shows battery percentage
TW_NO_REBOOT_BOOTLOADER := true --- disables rebooting into bootloader
TW_NO_USB_STORAGE := false -- disabled usb storage
TW_SDEXT_NO_EXT4 := false
Compiling Recovery
Step 4:- Compiling Recovery​
Finally you have come to the final part of the guide which is compiling recovery.
1. Open Terminal.
2. Execute these commands in Terminal
Code:
. build/envsetup.sh
lunch (Again select your device)
make -j4 recoveryimage
.
That's it when it is finished grab recovery.img from:
out/target/product/your_product_name/recovery.img
Flash it in your device test it fix the bugs and release it.
Wait if you don't want flash and just see how it looks so that you can flash another recovery if it is not working do these
I am not resposible if your device gets bricked in fastboot mode but mostly it won't happen though
Click to expand...
Click to collapse
1. Copy the recovery.img to sdk/platform-tools
2. Boot your device into fastboot mode.
3. Open Terminal
4. Execute these commands one by one in Terminal
Code:
fastboot devices (wait for your device to show up int terminal)
fastboot boot recovery.img
You can test out all the features except flash zip, backup and restore.
Victory :victory: you have successfully compiled TWRP recovery for your device go ahead have fun and enjoy.
If you really like my work express your gratitude by pressing the Thanks button. See you soon in another thread :victory: :laugh: :fingers-crossed:
Click to expand...
Click to collapse
Reserved
reserved just in case :fingers-crossed:
Contributions
You can Contribute to this guide by suggesting improvements and stuff are welcome PM about the contribution and i will add by giving credits to the person contributed
Does it make any difference if I want to compile it for an ARMV6 device?
Gesendet von meinem Skate mit Tapatalk 4 Beta
Joe4899 said:
Does it make any difference if I want to compile it for an ARMV6 device?
Gesendet von meinem Skate mit Tapatalk 4 Beta
Click to expand...
Click to collapse
Nope it won't make any difference it is just the same even if your device is ARMv6 or ARMv7. Make sure your device is supported by CM
Chain Hacker said:
Nope it won't make any difference it is just the same even if your device is ARMv6 or ARMv7. Make sure your device is supported by CM
Click to expand...
Click to collapse
i'm wondering if it will work for Tegra's device
666satyr666 said:
i'm wondering if it will work for Tegra's device
Click to expand...
Click to collapse
Yes it will work go ahead give it a shot :good:
So that's me again :laugh: Wanted to compile TWRP 2.6.0.0 for cm10.1 so I have set up everything so far but get an error when I try to compile
build/core/base_rules.mk:130: *** external/fuse/lib: MODULE.TARGET.STATIC_LIBRARIES.libfuse already defined by bootable/recovery/fuse.
Click to expand...
Click to collapse
Seems to be really stupid, so far I understand is the libfuse defined twice in recovery and base_rules.mk so think (thought ) it's an easy part - just to remove this libfuse from one of them... But I can't find something with "libfuse", "static libraries" or anything like that in base_rules.mk
Joe4899 said:
So that's me again :laugh: Wanted to compile TWRP 2.6.0.0 for cm10.1 so I have set up everything so far but get an error when I try to compile
Seems to be really stupid, so far I understand is the libfuse defined twice in recovery and base_rules.mk so think (thought ) it's an easy part - just to remove this libfuse from one of them... But I can't find something with "libfuse", "static libraries" or anything like that in base_rules.mk
Click to expand...
Click to collapse
I have never tried compiling 2.6.0.0 because Dees_Troy is evaluating my theme for my device such that it gets official support so if you are ready to use CM7 and TWRP 2.3.3.0 you can follow my guide and i can help you with the errors but any other version please ask Dees_Troy for the solution.
How I compile twrp if my phone is not officially/unofficially supported?is it possible?
Sended from my ascend g330 using tapatalk 4 [VIP]
andrea210701 said:
How I compile twrp if my phone is not officially/unofficially supported?is it possible?
Sended from my ascend g330 using tapatalk 4 [VIP]
Click to expand...
Click to collapse
It is possible after successful build with no bugs you can contact Dees_Troy for evaluation and get official support.
Sent from my LG-P350 using Tapatalk 2
Error detected
Hi, Chain Hacker.
Does it matter how to write address after "git://"?
I mean this:
Code:
[B]repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread[/B]
Should it be like this:
Code:
[B]repo init -u git://github.com/Cyanogen[COLOR="Red"]M[/COLOR]od/android.git -b gingerbread[/B]
By the way, it's a very good manual for those who are just starting to understand how to compile
maximik1980 said:
Hi, Chain Hacker.
Does it matter how to write address after "git://"?
I mean this:
Code:
[B]repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread[/B]
Should it be like this:
Code:
[B]repo init -u git://github.com/Cyanogen[COLOR="Red"]M[/COLOR]od/android.git -b gingerbread[/B]
By the way, it's a very good manual for those who are just starting to understand how to compile
Click to expand...
Click to collapse
No i doesnt matter at all the only thing that is case sensitive are the words after cyanogenmod as they must be written as it is so it is your wish whether you are gonna write Cyanogenmod or CyanogenMod and by the way thanks for the complement
Sent from my LG-P350 using Tapatalk 2
TWRP Recovery size...
Hi again...
I've managed to compile a TWRP-Recovery 2.6.0.1 based on CM9 for my Huawei Ascend Y101 (8186).
But I had to change recovery partition size in BoardConfig.mk (originally it was BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000, I changed it to 0x00600000), because without these changes it wasn't possible to build a recovery.img ("recovery.img is too large... etc.")
When I flashed it on my device, the TWRP recovery started and worked perfectly, but I wasn't able to boot my device. But it's not a problem for me, I understand why it wasn't able to boot very good.
The question is the following: is it possible to decrease somehow the source files' sizes of TWRP recovery (maybe images, don't know...) in order to compile the recovery.img that would be less than 4.85 MB (actually it's size is 5*095*424, it's more than my recovery partition....... )
By the way, the size of a CWM-recovery (cm9) that I've compiled is 4*489*216, so it fits like a glove :good: and works fine...
Thanks in advance. I understand that you compiled a TWPR recovery based on CM7, but I don't see much differences...
maximik1980 said:
Hi again...
I've managed to compile a TWRP-Recovery 2.6.0.1 based on CM9 for my Huawei Ascend Y101 (8186).
But I had to change recovery partition size in BoardConfig.mk (originally it was BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000, I changed it to 0x00600000), because without these changes it wasn't possible to build a recovery.img ("recovery.img is too large... etc.")
When I flashed it on my device, the TWRP recovery started and worked perfectly, but I wasn't able to boot my device. But it's not a problem for me, I understand why it wasn't able to boot very good.
The question is the following: is it possible to decrease somehow the source files' sizes of TWRP recovery (maybe images, don't know...) in order to compile the recovery.img that would be less than 4.85 MB (actually it's size is 5*095*424, it's more than my recovery partition....... )
By the way, the size of a CWM-recovery (cm9) that I've compiled is 4*489*216, so it fits like a glove :good: and works fine...
Thanks in advance. I understand that you compiled a TWPR recovery based on CM7, but I don't see much differences...
Click to expand...
Click to collapse
The difference is no on the source dude so relax. You have to modify your kernel and change the compression method to lzma. Contact Dees_Troy for this because i dont know how to change it. You can chat with him through IRC.

[ROM]Samsung S3 Intl Sailfishos

Hi there!
Following the hadk pdf from jolla porting guide.
I've got the sailfishos working on terminal android running. Booting on top attempting since monday tonight.
I'll explain more and I'll give more shots on working.
My issue now is to build the boot, recovery image to flash and boot it. The jolla sailfishos as a GUI operating system on Galaxy S3 I9300 model.
FIY : filename = sfa-i9300-ea-1.0.8.19-my1.tar.bz2
Instructions for chroot co,pilation on ubuntu amd64 x86_64 bit:
Code:
sudo mkdir -p /srv/mer/
mkdir -p $HOME/mer/
nano .bashrc
export $MER_ROOT=/srv/mer/
export $MER_ROOT=$HOME/mer/
ctrl +x to save and y
but type sudo apt-get install -y curl
for do the downloading file.
next do the following commands on terminal:
export $MER_ROOT=/srv/mer/
cd $HOME; curl -k -O https://img.merproject.org/images/mer-sdk/mer-i486-latest-sdk-rolling-chroot-armv7hl-sb2.tar.bz2 ;
sudo mkdir -p $MER_ROOT/sdks/sdk ;
cd $MER_ROOT/sdks/sdk ;
sudo tar --numeric-owner -p -xjf $HOME/mer-i486-latest-sdk-rolling-chroot-armv7hl-sb2.tar.bz2 ;
echo "export MER_ROOT=$MER_ROOT" >> ~/.bashrc
echo 'alias sdk=$MER_ROOT/sdks/sdk/mer-sdk-chroot' >> ~/.bashrc ; exec bash ;
echo 'PS1="MerSDK $PS1"' >> ~/.mersdk.profile ;
sdk
Now, do the following instructions:
$HOST>
nano $HOME/.hadk.env
export MER_ROOT="[/home/$user]"
export ANDROID_ROOT="$MER_ROOT/android/droid"
export VENDOR="[samsung]"
export DEVICE="[i9300]"
ctrl +x and y for save it.
nano $HOME/.mersdkubu.profile
function hadk() { source $HOME/.hadk.env${1:+.$1}; echo "Env setup for $DEVICE"; }
export PS1="HABUILD_SDK [\${DEVICE}] $PS1"
hadk
save it again
nano $HOME/.mersdk.profile
function hadk() { source $HOME/.hadk.env${1:+.$1}; echo "Env setup for $DEVICE"; }
hadk
now save this file.
Now in ctrl + alt + x, it will show a terminal:
type this:
sdk
type your password
hadk
TARBALL=ubuntu-quantal-android-rootfs.tar.bz2
curl -O http://img.merproject.org/images/mer-hybris/ubu/$TARBALL
UBUNTU_CHROOT=/parentroot/$MER_ROOT/sdks/ubuntu
sudo mkdir -p $UBUNTU_CHROOT
sudo tar --numeric-owner -xvjf $TARBALL -C $UBUNTU_CHROOT
hadk
ubu-chroot -r /parentroot/$MER_ROOT/sdks/ubuntu
exit
git config --global user.name "Your Name"
git config --global user.email "Your email"
back again for
hadk
cd $HOME
mkdir -p $HOME/mer/android/droid
repo init -u git://github.com/mer-hybris/android.git -b hybris-10.1
repo sync
after this, you will have HABUILD_SDK
DEVICE=i9300
export $DEVICE
source build/envsetup.sh
breakfast $DEVICE
now type
make hybris-hal
But now as a ota file for flashing on i9300, in this last 2 days in my laptop core2Duo Extreme I'm facing overheating.
So, everyone can test it.
Code:
A little change on mount fixups.
Go to the directory hybris/hybris-boot
nano mount-fixups on i9305| encore)
put the "i9305" | "encore" | "i9300")
Script for booting sailfishingos on an android terminal. This script is to mount the binds folders and for fixing for preventing the /dev/null issue when we all boot the chroot sailfishos.
name of the script : sailfishos.sh - made it on the /extsdCard/ folder.
1) nano /extSdCard/sailfishos.sh and copy the following code
2) ctrl +x to save it
3) bash sailfishos.sh
Code:
su
mount -o bind /dev /data/.stowaways/sailfishos/dev
mount -o bind /proc /data/.stowaways/sailfishos/proc
mount -o bind /sys/ /data/.stowaways/sailfishos/sys
chroot /data/.stowaways/sailfishos/ /bin/su -
echo "nameserver 8.8.8.8" > /etc/resolv.conf
Code:
Procedures:
1) get cm 10.1 flash it.
2) recovery mode to flash it.
3) download my sailfish i9300 tar.bz2 from d-h.st
4) Copy it for your /extSdCard
Code:
Procedures inside adb:
1) sudo adb kill-server
2) sudo adb start-server
3) adb devices
4) adb shell
5) su
6) cd /extSdCard/
8) mkdir -p /data/.stowaways/sailfishos
8) tar --numeric-owner -xvf filename -C /data/.stowaways/sailfishos
9) mount -o bind /dev /data/.stowaways/sailfishos/dev
10) mount -o bind /proc /data/.stowaways/sailfishos/proc
11) mount -o bind /sys /data/.stowaways/sailfishos/sys
finally:
chroot /data/.stawaways/sailfishos/ /bin/su-
you'll see sailfish os version something 15
try this on it:
cd /
ls
[LINK] http://d-h.st/gX5 [/LINK]
See folders on it.
PS: I'll give more shots also more instructions very soon. Thanx.
Another PS: I'll give more news about Jolla sailfish os very soon.
But I need to tell this, I've got i9300 defconfig kernel for Jolla sailfishos very similar to defconfig i9305 kernel and I got it compiled with very success on hadk Ubuntu chroot on mine Ubuntu 14.04 LTS version.
astronfestmon said:
Hi there!
Following the hadk pdf from jolla porting guide.
I've got the sailfishos working on terminal android running. Booting on top attemptinh since yesterday tonight.
Code:
Procedures:
1) get cm 10.1 flash it.
2) recovery mode to flash it.
3) download my sailfish i9300 tar.bz2 from d-h.st
4) Copy it for your /extSdCard
Code:
Procedures inside adb:
1) sudo adb kill-server
2) sudo adb start-server
3) adb devices
4) adb shell
5) su
6) cd /extSdCard/
8) mkdir -p /data/.stowaways/sailfishos
8) tar --numeric-owner -xvf filename -C /data/.stowaways/sailfishos
9) mount -o bind /dev /data/.stowaways/sailfishos/dev
10) mount -o bind /proc /data/.stowaways/sailfishos/proc
11) mount -o bind /sys /data/.stowaways/sailfishos/sys
finally:
chroot /data/.stawaways/sailfishos/ /bin/su-
you'll see sailfish os version something 15
try this on it:
cd /
ls
[LINK] http://d-h.st/gX5 [/LINK]
sees folders on it.
Click to expand...
Click to collapse
Screenshots?
Sent from my SM-G900F using XDA Free mobile app
Fantastic... I'll give a try. Plz provide some more details, screenshots & new features from your currently running sailfish os. Thanx for sharing
i fed with adb commands & not able to flash
Uhm ... I gonna wait for this ...
Sent from my SM-G900F using XDA Free mobile app
how to install ?
When I had the rom for flashing in recovery. I'll explain it.
For now, it can be installed through the adb, to work it inside the android terminal.
astronfestmon said:
When I had the rom for flashing in recovery. I'll explain it.
For now, it can be installed through the adb, to work it inside the android terminal.
Click to expand...
Click to collapse
any update on this?
I followed the above procedure and I can see the Sailfish version and the files list from adb. What next?
EDIT: Just saw your PS in OP
In the end of the week probably I'll release the boot kernel working on.
astronfestmon said:
In the end of the week probably I'll release the boot kernel working on.
Click to expand...
Click to collapse
I've successfully built boot and recovery images, packed the zip for flashing in recovery but there is a problem with the boot.img.
I'm trying to find out why it doesn't boot (the phone stays at the galaxy logo)
The actual guide for porting misses some stuff and there are errors here and there. Besides, there is a problem with the trusty chroot, quantal is working.
Aye. I've notice that.
I'm fixing some issues in quantal chroot.
E.g. inside the sources.list I add the 12.04 lts mirrors. Made by a website with the sources.list for 12.04 lts mirrors.
Yeah. I've done the boot kernel image and it made the same as you.
But with meld diff I've compared the i9305 defconfig with mine i9300 defconfig.
I'm going to test it with the changes meld diff made with a comparison with i9305 defconfig.
Now I made a make systemtarball and I'll try a make bootimage or a make factory_image for it.
astronfestmon said:
Aye. I've notice that.
I'm fixing some issues in quantal chroot.
E.g. inside the sources.list I add the 12.04 lts mirrors. Made by a website with the sources.list for 12.04 lts mirrors.
Yeah. I've done the boot kernel image and it made the same as you.
But with meld diff I've compared the i9305 defconfig with mine i9300 defconfig.
I'm going to test it with the changes meld diff made with a comparison with i9305 defconfig.
Now I made a make systemtarball and I'll try a make bootimage or a make factory_image for it.
Click to expand...
Click to collapse
It would be great if you could make it to boot.
I will try to compile the kernel with CONFIG_CMDLINE="console=tty0" . I'm hoping that would direct kernel panic message to the screen so we could idenfity what the problem is with booting hybris-boot.img
So... Any development?
Sent from my Nexus 5 using XDA Premium 4 mobile app
Hi! All of you! I'm doing efforts between these days. In these vacation days. I'll report more when I got home back.
astronfestmon said:
Hi! All of you! I'm doing efforts between these days. In these vacation days. I'll report more when I got home back.
Click to expand...
Click to collapse
Hi, I've also been trying to port sailfish os to i9300. I've been successful in creating an image that works, i.e. got it to boot into sailfish but there are some issues that I haven't been able to fix, like for instances, the wlan is detected but fails to establish a connection with any network, GSM is also not working. A full list with details can be found here https://wiki.merproject.org/wiki/Adaptations/libhybris
Maybe we should try to work together to get a fully functional sailfish os image
Cheers
---------- Post added 19th August 2014 at 12:01 AM ---------- Previous post was 18th August 2014 at 11:12 PM ----------
redrum781 said:
I've successfully built boot and recovery images, packed the zip for flashing in recovery but there is a problem with the boot.img.
I'm trying to find out why it doesn't boot (the phone stays at the galaxy logo)
The actual guide for porting misses some stuff and there are errors here and there. Besides, there is a problem with the trusty chroot, quantal is working.
Click to expand...
Click to collapse
The phone may be stuck at the galaxy logo, but there's a way to debug to find out what's wrong, follow this steps (only tested on linux):
1) connect your phone with the computer, the initramfs in boot.img will create a network interface (phone's ip is: 192.168.2.15) and enable a telnet deamon (default port: 23) and also a udhcp server, so luckily the computer will ask for an ip that everything will be set up automatically. If not try configuring static ip (192.168.2.20 and adding a route to 192.168.2.0)
2) telnet 192.168.2.15
3) when you're in the telnet session, you can check /diagnostic.log (i think) it will show why the boot failed. It is possible to execute commands into the init, by writing to (/init-ctl/stdin)
When logged into the telnet session it will dump a bit of information, be sure to read it as is useful .
Also check HADK 9.2 Operating Blind on an Existing Device
PS: the files may contain mistakes as I wrote this post without checking for the correct names (I don't have sailfish flashed at the moment).
Also consider visiting the IRC channel (#sailfishos-porters), if you're not doing it already
Hope it helps
rusty88 said:
Hi, I've also been trying to port sailfish os to i9300. I've been successful in creating an image that works, i.e. got it to boot into sailfish but there are some issues that I haven't been able to fix, like for instances, the wlan is detected but fails to establish a connection with any network, GSM is also not working. A full list with details can be found here https://wiki.merproject.org/wiki/Adaptations/libhybris
Maybe we should try to work together to get a fully functional sailfish os image
Cheers
---------- Post added 19th August 2014 at 12:01 AM ---------- Previous post was 18th August 2014 at 11:12 PM ----------
The phone may be stuck at the galaxy logo, but there's a way to debug to find out what's wrong, follow this steps (only tested on linux):
1) connect your phone with the computer, the initramfs in boot.img will create a network interface (phone's ip is: 192.168.2.15) and enable a telnet deamon (default port: 23) and also a udhcp server, so luckily the computer will ask for an ip that everything will be set up automatically. If not try configuring static ip (192.168.2.20 and adding a route to 192.168.2.0)
2) telnet 192.168.2.15
3) when you're in the telnet session, you can check /diagnostic.log (i think) it will show why the boot failed. It is possible to execute commands into the init, by writing to (/init-ctl/stdin)
When logged into the telnet session it will dump a bit of information, be sure to read it as is useful .
Also check HADK 9.2 Operating Blind on an Existing Device
PS: the files may contain mistakes as I wrote this post without checking for the correct names (I don't have sailfish flashed at the moment).
Also consider visiting the IRC channel (#sailfishos-porters), if you're not doing it already
Hope it helps
Click to expand...
Click to collapse
Will this os improve our device? Whats the pro and the con for a change (if it works finaly)?[emoji4]
MaxAndroided said:
Will this os improve our device? Whats the pro and the con for a change (if it works finaly)?[emoji4]
Click to expand...
Click to collapse
well maxAndroided all I can say at the moment is that the OS looks very promising... the UI is very smooth. Is another approach to mobile interaction based on gestures. I'm really loving it, sadly I can used it for day to day activities yet.
The jolla phone at the moment is able to run android apps and hopefully soon that will be available for any image built for android phones. So what that means is that if you don't find a suitable native app for sailfish os, you can always run your favorite android app in sailfish os
Anyone that wants to help bring sailfish os to i9300 is welcome to help, so if you have any idea on how to debug and fix the issues let me know
PS: if any one would like to try it, take a look at my previous post here
rusty88 said:
well maxAndroided all I can say at the moment is that the OS looks very promising... the UI is very smooth. Is another approach to mobile interaction based on gestures. I'm really loving it, sadly I can used it for day to day activities yet.
The jolla phone at the moment is able to run android apps and hopefully soon that will be available for any image built for android phones. So what that means is that if you don't find a suitable native app for sailfish os, you can always run your favorite android app in sailfish os
Anyone that wants to help bring sailfish os to i9300 is welcome to help, so if you have any idea on how to debug and fix the issues let me know
PS: if any one would like to try it, take a look at my previous post here
Click to expand...
Click to collapse
@rusty88, I am no developer/expert, but is there any way we can try and use I9300 native libraries or binaries to make GSM (or some other functionality for that matter) work? maybe RIL libs/binaries for GSM?
msri3here said:
@rusty88, I am no developer/expert, but is there any way we can try and use I9300 native libraries or binaries to make GSM (or some other functionality for that matter) work? maybe RIL libs/binaries for GSM?
Click to expand...
Click to collapse
yes @msri3here technically that is what i'm doing, its using RIL lib based on cm10.1.3 that was working fine before I flash sailfish, but on sailfish the log that RIL daemon dumps is really a mess and haven't figure out why is failing. One thing that I've notice is that RILD (one of its child process) creates the socket at /dev/socket/rild but it's killed afterwards, the sockets disappear and the process restarts all over again
Stracing RILD is not helping either as it seems that everything is Ok.
I'm trying to buy a new smartphone for day to day use so I can dedicate more time to debug on my i9300.
rusty88 said:
well maxAndroided all I can say at the moment is that the OS looks very promising... the UI is very smooth. Is another approach to mobile interaction based on gestures. I'm really loving it, sadly I can used it for day to day activities yet.
The jolla phone at the moment is able to run android apps and hopefully soon that will be available for any image built for android phones. So what that means is that if you don't find a suitable native app for sailfish os, you can always run your favorite android app in sailfish os
Anyone that wants to help bring sailfish os to i9300 is welcome to help, so if you have any idea on how to debug and fix the issues let me know
PS: if any one would like to try it, take a look at my previous post here
Click to expand...
Click to collapse
tried your rom but stuck on "samsung galaxy s 3 gt-i9300" screen nothing is happening plus if i touch the screen i get a response from the capacitive buttons but thats all

[Linux] Porting native Linux to Galaxy Note9

This thread is about starting native Linux on Samsung Galaxy Note9. This isn't my first attempt to do such thing. The history looks like Galaxy Spica -> Galaxy J1 (2016) -> Galaxy Note9. So I know what I'm doing
Later I'll post instructions how to install and run it.
Note9 isn't my main device, so I won't work on dualboot. If some wants to make it, feel free to build dualboot (kexec) recovery and post it here.
Source code.
Kernel: https://github.com/LONELY-WOLF/crownlte-linux-os
First success
So, here is a first result.
With minor modifications to DECON (framebuffer) my Note9 is able to run Arch Linux form SD card.
So far it has no serial or USB console. I can't find a way to make UART JIG for Type-C Samsungs. USB gadgets are hardcoded and can't be easy changed to CDC ACM. This is not good and makes development harder.
Arch Linux says it started GUI but I don't know what happened to Xorg. It can be on back buffer or on another display (since Note9 has it via Type-C).
This would be awesome for me during pen testing?!
Def following!
Could install it on dualboot?
giorgior.r said:
Could install it on dualboot?
Click to expand...
Click to collapse
Yes, it's possible. As for now kernel is inside phone memory and root FS is on SD card.
There are two ways to install it alongside Android:
Flash Linux kernel as recovery. So when you try to enter recovery it'll boot into Linux. You lose recovery in this case.
Install special dualboot/kexec recovery and start Linux from recovery menu. (If someone will make such recovery for Note9)
All Linux files (except kernel) are on SD card. SD has following partition scheme:
Storage. That's what your Android sees as SD card. FAT32 or exFAT
Apps2SD. Is someone still using it? However this partition can be 1MB in size.
Linux rootfs. That's where Linux "ROM" lives.
So SD is also ready for daily use.
nice, have similar thing based on exynos-linux-stable and debian stretch wifi work but sound and usb not yet for me. how you enabled boot console? also need to swap red and blue channel because they are flipped on 24/32 bit colours
Sisah said:
nice, have similar thing based on exynos-linux-stable and debian stretch wifi work but sound and usb not yet for me. how you enabled boot console? also need to swap red and blue channel because they are flipped on 24/32 bit colours
Click to expand...
Click to collapse
For fbcon you need to patch decon driver. Take a look at my commits on GitHub.
Yes, RGB<->BGR is a common issue. I have it on J120F too. This hack work for J1. But it would be nice to find a source of the problem. I believe decon reports wrong color order.
WARNING! I had to disable fbcon on J1 because it messed up with Xorg.
Still no luck with USB. I try to configure it with configfs, but got error
Code:
Config c/1 of g1 needs at least one function
Looks like Samsung hardcoded something inside USB drivers.
Found out that USB configfs is heavily modified. That's the reason why Linux can't configure USB gadgets properly. Bring back compatibility seems to be a hard task.
ho ho ho... so long time im not play dualboot
sorry i have diferent question, i see on youtube, normal windows 10 work on lumia 950 and 950xl, what its that ?
Ce Doresti said:
ho ho ho... so long time im not play dualboot
sorry i have diferent question, i see on youtube, normal windows 10 work on lumia 950 and 950xl, what its that ?
Click to expand...
Click to collapse
Since I'm a Windows Phone hacker, I can answer your question
That project is very similar to what I do here. Starting from Windows Phone 8, phone OS and desktop one have one (NT) kernel. Just like Android and desktop Linux do. Windows you see on NL950 on YouTube is "Windows for ARM". It looks like desktop but it can't run normal Windows EXEs because of different processor architecture. Maybe it can run desktop .NET applications (I've made proof-of-concept EXE that worked on both Windows Mobile 5.0 and Windows XP) but I'm not sure.
Linux is a better way to get desktop OS on mobile device. Open source nature of most Linux software makes it possible to use almost any program on any processor architecture. Take a look at single board computers (like Raspberry Pi) if you want to see what Linux can do on ARM architecture.
I think win 10 for arm have integrated x86 emulator, so it probably launch nearly anything.
If i can have one more question. How you refreshing screen? Refresh rate is set to 0 and my every attempt to configure screen with fbset result in black screen and hard reset, so i must use infinite loop that send "1" to /sys/class/graphics/fb0/rotate to refresh my screen
-W_O_L_F- said:
Since I'm a Windows Phone hacker, I can answer your question
That project is very similar to what I do here. Starting from Windows Phone 8, phone OS and desktop one have one (NT) kernel. Just like Android and desktop Linux do. Windows you see on NL950 on YouTube is "Windows for ARM". It looks like desktop but it can't run normal Windows EXEs because of different processor architecture. Maybe it can run desktop .NET applications (I've made proof-of-concept EXE that worked on both Windows Mobile 5.0 and Windows XP) but I'm not sure.
Linux is a better way to get desktop OS on mobile device. Open source nature of most Linux software makes it possible to use almost any program on any processor architecture. Take a look at single board computers (like Raspberry Pi) if you want to see what Linux can do on ARM architecture.
Click to expand...
Click to collapse
thank you !
I can see the potential of this project if things go according to your vision.. I will for sure donate you for your amazing effort
Interesting, is it more for the challenge itself or what's your goal?
Linux on Dex works great for me, it's missing a gui if you don't connect it to a display but you could probably trick it to believe that the phone screen is an external display.
Sisah said:
I think win 10 for arm have integrated x86 emulator, so it probably launch nearly anything.
If i can have one more question. How you refreshing screen? Refresh rate is set to 0 and my every attempt to configure screen with fbset result in black screen and hard reset, so i must use infinite loop that send "1" to /sys/class/graphics/fb0/rotate to refresh my screen
Click to expand...
Click to collapse
Since we use the same kernel can you share your work on GitHub too? Also I need all your current work on OS. What image you use? What modifications you made? It's a good idea for me to migrate to the same distro. This can speed up our work.
-W_O_L_F- said:
Since we use the same kernel can you share your work on GitHub too? Also I need all your current work on OS. What image you use? What modifications you made? It's a good idea for me to migrate to the same distro. This can speed up our work.
Click to expand...
Click to collapse
Here is my config files for debian.
https://www.mediafire.com/file/ccziy42yj2bn28x/LINUX.zip
(Include precompiled mtev driver from meefik https://github.com/meefik/xorg-input-mtev
Also it set wacom driver for spen to work
)
kernel .config
https://www.mediafire.com/file/czrct62638xpkhz/.config
And debian install cdrom
https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/
installation was little tricky, need to install linuxdeploy compile kernel with atleast isofs, systemv-ipc, vt console, kernel automounter-v4, fanotify and raid-dm support and put it to recovery.img, then dd it to BOOT partition.
Now download debian-installer.iso, extract ramdisk.gz from him and reboot to modified recovery.
Here mount system, go to terminal, type linuxdeploy shell.
Now we must unpack ramdisk.gz from installer with abootimg or mkbootimg, mount debian-installer.iso to unpacked-ramdisk/cdrom and then we can chroot to installer ramdisk with chroot /unpacked-ramdisk /bin/ash
After that just type
./init
debian-installer-startup
debian-installer
Use sdcard as root partition and install.
After installing base system it probably fail to setup apt, so we must open terminal in setup program then
mount --bind /cdrom /target/media/cdrom (need to create that dir first)
then
chroot /target /bin/bash
apt-cdrom add
apt-get update
Now you can run tasksel and install desktop (kde xfce and gnome work but need lightdm for virtual keyboard on login)
(Here is nice place to copy those config files i posted and run install.sh, but also be sure to install lightdm and onboard keyboard, its not in my pack)
after that type exit few times until you get back to installer where you can finish installation.
Then need to compile kernel make initrd and create boot.img (can be done in linuxdeploy on android)
Also copy /vendor from phone to installed system then wifi start working and we can install from netinst-cd with little less trouble, or install to .img maybe even folder from internal_sdcard, its much faster than booting from memory card
Here is my fresh install of debian stretch and kde, only modification is in lightdm-gtk-greeter.conf, 40-libinput.conf, xorg.conf (not needed much), /usr/share/initramfs-tools/scripts/local (hardcoded root partition and loop .img for boot) and added framebuffer_refresh systemd service. To install just unpack .zip to root of /data (sda25) and flash linux-boot.img to boot partition.
Sound, USB, and 24bit colors are still broken, but maybe still better than linux on dex with some hardware graphics acceleration like panfrost driver it may be better than my pc
Root - 16GB .img after unpack
https://mega.nz/#!zeAA3KzY!vK5g2HtI0H3CD654wx40w14VstT6ktLX6tzNsUMWNoU
Boot.img
https://mega.nz/#!LCQB0QJK!YKTflwPsAJosaxr0Bqlu_9XtfgCFxkgNCmrbyNNaBvM
Login as sisah with password 123456, root password 123456, kde wallet password is set to 123456 too. Made on n960f dual sim.
Sisah said:
Here is my fresh install of debian stretch and kde, only modification is in lightdm-gtk-greeter.conf, 40-libinput.conf, xorg.conf (not needed much), /usr/share/initramfs-tools/scripts/local (hardcoded root partition and loop .img for boot) and added framebuffer_refresh systemd service. To install just unpack .zip to root of /data (sda25) and flash linux-boot.img to boot partition.
Sound, USB, and 24bit colors are still broken, but maybe still better than linux on dex with some hardware graphics acceleration like panfrost driver it may be better than my pc
Root - 16GB .img after unpack
https://mega.nz/#!zeAA3KzY!vK5g2HtI0H3CD654wx40w14VstT6ktLX6tzNsUMWNoU
Boot.img
https://mega.nz/#!LCQB0QJK!YKTflwPsAJosaxr0Bqlu_9XtfgCFxkgNCmrbyNNaBvM
Login as sisah with password 123456, root password 123456, kde wallet password is set to 123456 too. Made on n960f dual sim.
Click to expand...
Click to collapse
Good work
@Sisah
I've managed to get USB to work. Here, take the code:
Code:
#!/bin/bash
mkdir -p /sys/kernel/config/usb_gadget/g1
cd /sys/kernel/config/usb_gadget/g1
echo 0xabcd > idVendor
echo 0x1234 > idProduct
mkdir -p strings/0x409
echo SM-960F > strings/0x409/serialnumber
echo Samsung > strings/0x409/manufacturer
echo Note9 > strings/0x409/product
# Config 1
mkdir -p configs/c.1
echo 120 > configs/c.1/MaxPower
mkdir -p configs/c.1/strings/0x409
echo "ACM" > configs/c.1/strings/0x409/configuration
mkdir functions/acm.GS0
ln -s functions/acm.GS0 configs/c.1
# Config 2
#mkdir -p configs/c.2
#echo 120 > configs/c.2/MaxPower
#mkdir -p configs/c.2/strings/0x409
#echo "RNDIS" > configs/c.2/strings/0x409/configuration
mkdir functions/rndis.usb0 # use default parameters
ln -s functions/rndis.usb0 configs/c.1
echo "acm,rndis" > /sys/class/android_usb/android0/functions
echo 10c00000.dwc3 > UDC
echo 1 > /sys/class/android_usb/android0/enable
# to unbind it: echo "" UDC; sleep 1; rm -rf /sys/kernel/config/usb_gadget/g1
/sbin/agetty -w -L 115200 ttyGS0 linux
exit 0
-W_O_L_F- said:
@Sisah
I've managed to get USB to work. Here, take the code:
Code:
#!/bin/bash
mkdir -p /sys/kernel/config/usb_gadget/g1
cd /sys/kernel/config/usb_gadget/g1
echo 0xabcd > idVendor
echo 0x1234 > idProduct
mkdir -p strings/0x409
echo SM-960F > strings/0x409/serialnumber
echo Samsung > strings/0x409/manufacturer
echo Note9 > strings/0x409/product
# Config 1
mkdir -p configs/c.1
echo 120 > configs/c.1/MaxPower
mkdir -p configs/c.1/strings/0x409
echo "ACM" > configs/c.1/strings/0x409/configuration
mkdir functions/acm.GS0
ln -s functions/acm.GS0 configs/c.1
# Config 2
#mkdir -p configs/c.2
#echo 120 > configs/c.2/MaxPower
#mkdir -p configs/c.2/strings/0x409
#echo "RNDIS" > configs/c.2/strings/0x409/configuration
mkdir functions/rndis.usb0 # use default parameters
ln -s functions/rndis.usb0 configs/c.1
echo "acm,rndis" > /sys/class/android_usb/android0/functions
echo 10c00000.dwc3 > UDC
echo 1 > /sys/class/android_usb/android0/enable
# to unbind it: echo "" UDC; sleep 1; rm -rf /sys/kernel/config/usb_gadget/g1
/sbin/agetty -w -L 115200 ttyGS0 linux
exit 0
Click to expand...
Click to collapse
Nice it enable usb, but still getting errors when i plug otg, and phone reboot if i connect it to pc, its strenge because i installed linux on more phones and otg alwais worked without any configuration.

Categories

Resources