/!\ OLD THREAD 16-10-2013 /!\ -- CYANOBIZ - ICS for GEN8 based on CM9 - BETA2.6 - Gen8 Android Development

The system is stable now on my tab, don't forget, you have only 256MB of RAM, i cannot make the impossible Lots of tweaks are include into the kernel and the ROM to have a fast tab...!
If you have any problem, go there:
Sources:
Github: https://github.com/bizcuite
Kernel sources is available here: https://github.com/bizcuite/Archos_OPENAOS_Kernel_ICS
Frameworks base folder: https://github.com/bizcuite/android_frameworks_base
Device Folder: https://github.com/bizcuite/Device_ICS-for-ARCHOS-GEN8
--------------------------------------------------------------------------------------------------------------------
/!\
DON'T TRY THE KERNELWITH OTHERS OS for GEN8
IT IS NOT COMPATIBLE WITH OTHERS SYSTEMS
/!\
--------------------------------------------------------------------------------------------------------------------
Works:
3D - libs comes from Galaxy SL - and Kernel drivers from RowBoat
Sensors - Rotation
Sound
Youtube (HD is not smooth- 15/20FPS)
Touchscreen in multipoint (thanks to Divx118 and Letama for their help on my thread)
Wifi
Sdcard & MMC - USB SHARE
12/03/2013
H264/H263 - MP3/AAC played with hard decoders
OMX interface comes from CM10.1
UI optimised (thanks defy dev)
Sound HAL from opensource
Camera but you cannot take any picture or video with this camera ATM
Version 1.6 (17/03/2013):
- Dspmanager has been removed (bug)
- MusicPlayer from google AOSP include.
- Phone.apk removed too
CYANOBIZ - BETA 2.0/2.3 - 10/04/2013
- GPU Libs update
- OPENGL renderer activated
- WallPaper works
- WebGL works well (Chrome can works now)
- Network statistics works
- Sound noises are less frequents than v1.7 and V1.8
CYANOBIZ - BETA 2.1 - 18/04/2013
- Youtube works (i had heard that it doesn't worked in beta 2.0)
CYANOBIZ - BETA 2.4 - 11/05/2013
-Libs from Samsung Galaxy Ace works very well (better) than rowboat libs.
-A43 must have a working TS
-Zram configured directly to have 250MB of ZRam (better perf than compcache)
CYANOBIZ - BETA 2.5/2.6 - 19/05/2013
-TLS register activated
-Swap of 175MB added in the image file
-Zram can be activated (re-added) - i have a way to activated zram1 as ext4 partition...
KERNEL:
- OC kernel by interface (see in /sys/power/)
- dsp to 800MHz when 5th step is activated
- GPU drivers Updated (backported)
- CPU Alignment (backported)
- JHash update
- Network stat driver added (backported)
- Lots of modules directly include into the kernel
- Cleancache include (backported) and activated http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/vm/cleancache.txt?id=4fe4746ab694690af9f2ccb80184f5c575917c7f
- Genlock Backported from 2.6.35
- New Zram
- New driver wifi functions (configurate in ".config" files) i find wifi better
- TLS register hacked
- Zram
- Snappy compression from google
- Compcache 25% or 35% of RAM
Doesn't work:
-Bluetooth can works with a command enter in a terminal hciconfig hci0 up.
-Camera (you can preview only)
-Battery stats (% works, but no notification of charge)
-Bugs - report please
-------------------------------------------------------------FILES TO DOWNLOAD-------------------------------------------------------------
SINCE V2.4 AND DON'T USE ANY SWAP SOFTWARE WITH THIS VERSION
---------- V2.6 with another start order for Swap: /swapfile (175MB) uses in first, zram in second and compcache in last. = 175+50MB+25%/35% of your RAM
A101 - v2.6 = http://www.mediafire.com/download.php?444vbceqerzboqb
A70 - A70S2 (change the dpi to 160 in build.prop for A70S2 only) - v2.6 = http://www.mediafire.com/download.php?1urte0y2f5dnzwu
A43 - TS not fix in landscape ATM - v2.6 = http://www.mediafire.com/download.php?206d2tqybl1260w
GAPP: http://www.mediafire.com/download.php?blsz6ie172i1qzo
For kernel initramfs and data image see attachment files
25% of RAM is "compcached" with zram snappy compression
35% of RAM is "compcached" with zram snappy compression
25% of RAM is "compcached" with zram LZO compression
-------------------------------------------------------------SYSTEM INSTALLATION-------------------------------------------------------------
How install CM9 on archos gen8
-Download CM9 image files from mediafire that i have shared, choose appropriate image.
-Download initramfs.cpio.gz (NOT MINICOM except i tell you to install it for a report)
-Download Kernel in attachment files (don't uncompress the Kernel file, just rename it like this: zImage)
-Download data.img.tar.gz and uncompress it - choose the data image that you want and renamed it like data_ICS.img
Install Kernel and initramfs.cpio.gz
-install kernel and initramfs.cpio.gz (don't install the minicom version) by SDE menu
-Don't uncompress the Kernel file, just rename it like this: zImage
-Just copy-paste, ONE BY ONE the kernel and initramfs.cpio.gz (if I paste together the files, it doesn't worked for me)
/!\ BUT BIZCUITE, I HAVE A PROBLEM, THE TAB SAYS ME THAT zImage IS NOT INSTALLED, AAAAAAAAH!!!!!PLEAAAASE HEEELP
=>You have WINDOWS please read this!!!
Install CM9 Image:
-uncompress image of CM9 downloaded
-copy paste image on the root of internal sdcard (like CM7)
-uncompressed data.img.tar.gz if it's not done, choose an image and rename it like data_ICS.img
-copy/paste the data_ICS.img to the root of the internal sdcard.
How configure menu.lst (See the file in attachment, just uncompress it)
-edit your menu.lst, copy paste my line
Code:
CYANOBIZ||/CYANOBIZ_BETA2.X_AX.img|/init|0Archos|ARCHOS|ARCHOS|/init
Change "CYANOBIZ_BETA2.X_AX.img" by the version and the type of tab that you have downloaded
Exemple: CYANOBIZ_BETA2.4_A101.img
If you haven't the file. Create a file named "menu.lst" with notepad++ under windows (not the windows notepad!!!) Or gedit for ubuntu.
And copy paste the line on it. Save and copy paste the file on the root of the internal sdcard.
-------------------------------------------------------------GOOGLE APP. INSTALLATION-------------------------------------------------------------
How install Google App.
If you have NEVER installed GApp:
-Download the file
-Rename the file like this "gapps-ics-20120429-signedremake_all_dpi_works.zip" ( just WITHOUT the "-" )
-Copy paste the file in the download folders of your internal SDCARD
-Reboot
-After the first reboot wait 5 minutes (the system uncompresses the files and install its)
-Reboot and enjoy
-------------------------------------------------------------BLUETOOTH ACTIVATION-------------------------------------------------------------
If you want to have Bluetooth
In a terminal enter:
Code:
hciconfig hci0 up
-------------------------------------------------------------SWAP CONFIGURATION-------------------------------------------------------------
SWAP / Zram / CompCache:
The swap is used with this priority:
Code:
[email protected]:/ # cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 179156 5716 -1
/dev/block/zram0 partition 51192 0 -2
/dev/block/ramzswap0 partition 175464 0 -3
This the new swap_activation.sh
Code:
swapoff /dev/block/ramzswap0
swapoff /dev/block/zram0
echo $((50*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /swapfile
swapon /dev/block/zram0
swapon /dev/block/ramzswap0
Just change the order of this lines to start differently the swap.
First to start : swapon /swapfile
second to start: swapon /dev/block/zram0
last to start: swapon /dev/block/ramzswap0
Play with this lines to see if performance are better.
-------------------------------------------------------------OVERCLOCK-------------------------------------------------------------
HOW OVERCLOCK THE CPU
just change the value with a root explorer into the file at this path:
/sys/power/mpu_freq_opp5
YOU WILL LOSE THE CHANGE AFTER A REBOOT
but if you find your oc stable write the line in the init.rc, under " # Enabling power management features":
Code:
write /sys/power/mpu_freq_opp5 1100
-------------------------------------------------------------SOFT TO USE-------------------------------------------------------------
Which software i used to have a better tab or functions:
Performance:
Seeder (more smooth): http://forum.xda-developers.com/showthread.php?t=1987032
Tools:
Archos Video player: To have access to SMB server and watch directly video. (deactivate hardware decoding)
ZRAM Status:to keep an eye on my Zram Swap (lots of information)
LogCat:
Logcat Extreme: to share me a logcat when you have a crash or others problems
--------------------------------------------------------------------------------------------------------------------
FAQ:
I HAVE TRIED GMAIL, IT DOESN'T WORKED WITH MY TAB
HOX FIX IT: Biz, gmail works by installing maps, then open gmail it will force close, then go to accounts and sync gmail reboot tablet and works ==> Thanks Porobu
How have a good Camera image :
-> just open camera app, unplug usb cable and press power button to activate deep sleep mode (wait the led turn off) and presss again power button. Re open the camera app and the image is clean.
--------------------------------------------------------------------------------------------------------------------
If you have any problem with kernel or OS, download again all files and reinstall its.
If you have bootloop or crash of tablet, make me a report plz.
--------------------------------------------------------------------------------------------------------------------
/!\ To make a report /!\ MINICOM version of initramfs is required.
YOU DON'T USED ADB (select NONE option) .. JUST MINICOM (SERIAL option)
I used the initramfs.cpio.gz with debug by serial made by Divx118.
install minicom and enter in a terminal under root rights:
"minicom -D /dev/ttyACM2" (when you are after selection of debug types screen and when OS screen selection appears press "enter" don't forget to plug usb cable )
The minicom must be connected. and DMESG log appears on terminal.
CONFIGURE YOUR TERMINAL TO HAVE UNLIMITED CHARACTERS ON THE SCREEN (else log will be cut)
See the tutorial about debug on Openaos website
Have Fun!!
Bizcuite
Thanks to:
-Letama
-Divx118
-Powerplop for his help on sound pb
-All who have helped me indirectly or directly
-My beer shop :angel:
-Many thanks to Wilsey and Guanfy to have helped me to debug screen and TS without them, your tabs couldn't worked correctly.
-Bingoig for his help to fix menubutton for A101
-Mavasilisk for his great help and his topic about my ROM in general section
-Mikerla
-Porobu
-All donators (4 times)]

18/10/2012
UPDATE: init.rc FOR A101 ONLY FIX SCREEN ORIENTATION
How push it:
With adb, you must have installed adb initramfs.cpio.gz (see first page)
run adb with adb shell after have configure it to see if the configuration is good:
"adb shell"
"exit"
"adb root"
"adb push / /"
---------------------------------------------------------------------------------------------------------------
19/10/2012
UPDATE KERNEL TO SEE IF TouchScreen OF A70S WORKS works with all Tabs!!
---------------------------------------------------------------------------------------------------------------
22/10 i have include in rom, binaries for TS from archos firmware. And update init.rc. see first post to download the new update.
---------------------------------------------------------------------------------------------------------------
26/10 I have made a modification in code to have TS working for all tabs, i need log and report to see if it works correctly
See V0.4 to have update.
Modification in the code are situate in inputreader.cpp in framework/base/service/:
Code:
if (mParameters.orientationAware
|| mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
|| mParameters.deviceType == Parameters::DEVICE_TYPE_POINTER) {
mParameters.associatedDisplayIsExternal = false;
mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
&& getDevice()->isExternal();
mParameters.associatedDisplayId = 0;
---------------------------------------------------------------------------------------------------------------
29/10 -- CM9 - V0.5
-Kernel revert back (for A101, bad name of TS, it was a test that i had forgotten to remove)
-data_ICS.img to install to root of SDCARD (like CM7)
-Bootloop fix
-NO BOOTANIMATION (black screen, please wait that the first boot finished it)
-BUG WITH CPU GOV ALWAYS AT PERFORMANCE (see first post to fix it)
----------------------------------------------------------------------------------------------------------------
30/10 -- CM9 - V0.6
-soft button fix (ty guanfy and Wisley)
----------------------------------------------------------------------------------------------------------------
31/10 -- CM9 - V1.0
-All about screen works well for all tabs (A70S2 - A101S - A70S-H confirmed)
-CM9 Sources in "cooking" for share
---------------------------------------------------------------------------------------------------------------
22/12:
FIx USB SHARE for SDRAM Version.
New version ALPHA 1.1 in progress
Had to need to update my Ubuntu to 12 to download update of ICS from Cyanogen (Git-Core error, impossible to update git-core with 10.04)
Kernel modify for more stability (Cpu Gov conf - 5th freq. step deleted)
I will make another kernel to include driver for A43 tabs TouchScreen.
But i need logcat by A43 tabs users.[/B]
VolumeManager.cpp has been changed to have USB SHARE working.
---------------------------------------------------------------------------------------------------------------
Problem with stability is fix. with Kernel V1.4

DON'T TRY TO COMPILE ATM, IT'S JUST A BETA VERSION OF THE HOW - I HAVEN'T TEST IT!!
How to compile CyanoBiz:
Make sure that you have Ubuntu 10.04 or 12 - 64Bits - 4GB of RAM - 100GB free on HD and a Quad core CPU is better to compile it (i have 4GB of RAM and a little Core2duo 1.6GHz - dual core on a T60P Lenovo - HD of 300GB).
Go to your work foder. i have put it directly in my home directory, done it as you want.
mkdir -p ./BIZ_ICS
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://github.com/CyanogenMod/android.git -b ics-release
repo sync -j16
Wait that the download is finished....
Download my github and uncompress the framework, device and hardware zip files (not update ATM).
Replace CM9 folders by mine:
-./framework/base
-./hardware/...
-./device/archos/g8
To compile:
. build/envsetup.sh
lunch
choosecombo
-> option userdebug let the others default value
Make -j4
To make the image file after compilation
Code:
rm CYANOBIZ*.img
umount /mnt
echo A70S:
qemu-img create -f raw ./CYANOBIZ_BETA2.x_A70.img 300M
mkfs.ext4 -qF -O ^huge_file ./CYANOBIZ_BETA2.x_A70.img
mount -o loop ./CYANOBIZ_BETA2.x_A70.img /mnt/
rsync -rlpgotvDH --progress --delete ./root/ /mnt/
rsync -rlpgotvDH --progress --delete ./system/ /mnt/system/
mkdir -p /mnt/data/test /mnt/mnt /mnt/mnt/storage
ln -sf /mnt/storage /mnt/storage
chmod 0777 /mnt/mnt/storage /mnt/data/test
chown -R root:root /mnt/
chmod 0755 /mnt/system/framework/*
chmod 6755 /mnt/system/xbin/su
chmod -R 0755 /mnt/system/media/*
chmod -R 0755 /mnt/system/usr/share/alsa/*
chmod -R 0755 /mnt/system/lib/dsp/*
chmod -R 0644 /mnt/system/lib/libOMX.*
chmod -R 0755 /mnt/lib/*
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
mkdir /mnt/system/media
cp -R ../../../../device/archos/g8/media/* /mnt/system/media/
mkdir /mnt/system/usr/share/alsa
cp -R ../../../../device/archos/g8/system/usr/share/alsa/* /mnt/system/usr/share/alsa/
cp -R ../../../../device/archos/g8/init.rc /mnt/init.rc
mkdir /mnt/system/lib/dsp
cp -R ../../../../device/archos/g8/system/lib/* /mnt/system/lib/
mkdir /mnt/lib
cp -R ../../../../device/archos/g8/lib/* /mnt/lib/
rm /mnt/system/app/Phone.apk
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
chmod -R 0755 /mnt/system/lib/*
sync
umount /mnt
echo A101:
qemu-img create -f raw ./CYANOBIZ_BETA2.x_A101.img 300M
mkfs.ext4 -qF -O ^huge_file ./CYANOBIZ_BETA2.x_A101.img
mount -o loop ./CYANOBIZ_BETA2.x_A101.img /mnt/
rsync -rlpgotvDH --progress --delete ./root/ /mnt/
rsync -rlpgotvDH --progress --delete ./system/ /mnt/system/
mkdir -p /mnt/data/test /mnt/mnt /mnt/mnt/storage
ln -sf /mnt/storage /mnt/storage
chmod 0777 /mnt/mnt/storage /mnt/data/test
chown -R root:root /mnt/
chmod 0755 /mnt/system/framework/*
chmod 6755 /mnt/system/xbin/su
chmod -R 0755 /mnt/system/media/*
chmod -R 0755 /mnt/system/usr/share/alsa/*
chmod -R 0755 /mnt/system/lib/dsp/*
chmod -R 0644 /mnt/system/lib/libOMX.*
chmod -R 0755 /mnt/lib/*
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
mkdir /mnt/system/media
cp -R ../../../../device/archos/g8/media/* /mnt/system/media/
mkdir /mnt/system/usr/share/alsa
cp -R ../../../../device/archos/g8/system/usr/share/alsa/* /mnt/system/usr/share/alsa/
cp -R ../../../../device/archos/g8/init.rc /mnt/init.rc
mkdir /mnt/system/lib/dsp
cp -R ../../../../device/archos/g8/system/lib/* /mnt/system/lib/
mkdir /mnt/lib
cp -R ../../../../device/archos/g8/lib/* /mnt/lib/
rm /mnt/system/app/Phone.apk
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
chmod -R 0755 /mnt/system/lib/*
sync
umount /mnt

Hello,
ICS doesn't work on my A43. It stay locked on the OpenAOS screen after the .img selection menu.
Maybe my tablet isn't compatible.
Thanks for your great work
Sent from my A43 using xda premium

GoL LuM said:
Hello,
ICS doesn't work on my A43. It stay locked on the OpenAOS screen after the .img selection menu.
Maybe my tablet isn't compatible.
Thanks for your great work
Sent from my A43 using xda premium
Click to expand...
Click to collapse
Have you any cable connected on the tab and have you seen this?
Others things:
If you want to power on your tab without make any debug, don't forget to disconnect the tab from the USB computer.
If you do that, the CM9 doesn't want boot.
DISCONNECT USB CABLE IF YOU HAVEN'T MINICOM RUNNING
Retry without cable please and with the new kernel!!
Try to see if you have any log on terminal if it doesn't worked
Bizcuite

Please report about Touchscreen it's very important for me (and for you if you want a CM9 who works on your tab )
Make a report like this:
Model of tab: Archos xx
Touchescreen works: yes / no
Another bug (except if it writes on first post)
Remember: the first boot takes time the dexopt is active 2-3 minutes to have unlock screen.
Bizcuite
Bizcuite

Biz,
I've flashed the new kernel, booted back into CM. I've been sitting at the bootsplash for 20 minutes now. Attachment below.

Is it safe to try it on A70S with "kboot" installed? Seconds question that I'd like to know is that the touchscreen isnt currently working, right?

Mavasilisk said:
Is it safe to try it on A70S with "kboot" installed? Seconds question that I'd like to know is that the touchscreen isnt currently working, right?
Click to expand...
Click to collapse
I don't know if it works with kboot, the kernel is based on CM7 kernel, if it works with it i think that yes!!
Touchscreen for A70S doesn't work (except if it uses Hanvon TS, it must work now), yes and i need a full log to fix it if i can (without tab it's very difficult).
Biz,
I've flashed the new kernel, booted back into CM. I've been sitting at the bootsplash for 20 minutes now. Attachment below.
Click to expand...
Click to collapse
You have a harddrive version, that's the pb, there is no error who permit me to fix it ATM.
I will pm you and see it later.
Edit: i have seen that all your log is cut, can you remake it with a more larger terminal (or more little char.) to have all lines
Bizcuite

the last thing that I see when I boot is some cyano guy who is traveling in space. Do I have to wait longer or its the unlock screen and my touchscreen isnt working?
EDIT: Rename your data.img to something else.
EDIT2: Can u help me run adb successfully, I've tried many times with guides but it was not for gen8 and I couldnt make it run. I really wanna join.
EDIT3: It booted. The touchscreen on A70S is working only at the upper left side (I can pull down the statusbar and enable/disable wifi). Nothing else is working on touchscreen. Hope it helps you cuz I cant run adb.

Bootloop

Mavasilisk said:
the last thing that I see when I boot is some cyano guy who is traveling in space. Do I have to wait longer or its the unlock screen and my touchscreen isnt working?
EDIT: Rename your data.img to something else.
EDIT: Can u help me run adb successfully, I've tried many times with guides but it was not for gen8 and I couldnt make it run. I really wanna join.
Click to expand...
Click to collapse
/!\ To make a report /!\
YOU DON'T USED ADB.. JUST MINICOM (adb cannot worked with this initramfs.cpio.gz, don't change it if you want adb, i have another version without serial debug)
I don't think that rename data.img is usefull:
look the init.rc:
Code:
mount ext4 /dev/block/mmcblk1p1 /mnt/storage
mount vfat /dev/block/mmcblk1p1 /mnt/storage
mount ext3 /dev/block/mmcblk0p2 /mnt/system
# mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
# mount ext4 [email protected]/mnt/storage/data.img /data nosuid nodev
data.img is not mount i used only data folder IN the image.
I need a log to see what's appened, i will retry my rom upload when i will be at home
If you have any linux machine you can try to see if there are crash errors when you mount the image in the data folder and tombstones folder
To mount image file enter:
mount -o loop /media/A70S/openaos-cm.img /mnt/
look the path of your tab, maybe it's not the same.
Bizcuite

arkade91 said:
Bootloop
Click to expand...
Click to collapse
More usefull with a log please.
Thanks
Bizcuite

I dont have a linux machine. Is there any tutorial "how to set up minicom" or what is it?

bootlooping for about 10 mins on a101it using kboot, is it related to kboot i wonder, anyway il see if i can pull logs later, right now i got to go somewhere?

bizcuite said:
I don't know if it works with kboot, the kernel is based on CM7 kernel, if it works with it i think that yes!!
Touchscreen for A70S doesn't work (except if it uses Hanvon TS, it must work now), yes and i need a full log to fix it if i can (without tab it's very difficult).
You have a harddrive version, that's the pb, there is no error who permit me to fix it ATM.
I will pm you and see it later.
Edit: i have seen that all your log is cut, can you remake it with a more larger terminal (or more little char.) to have all lines
Bizcuite
Click to expand...
Click to collapse
I can expand the terminal window, but I already changed the profile for unlimited scrolling. The entire log as it was recorded should be there. I can produce another one with a maximized terminal window if that will help. Log attached.
---------- Post added at 09:59 PM ---------- Previous post was at 09:54 PM ----------
Mavasilisk said:
I dont have a linux machine. Is there any tutorial "how to set up minicom" or what is it?
Click to expand...
Click to collapse
Your best bet if you want to get serious on testing and debug is to install a linux distro. Since android was born from linux, it's much easier to get the work done from a linux platform. Your best best would be to used an Ubuntu based distro, like Ubuntu or it's variants, or Linux Mint. If you use that, I can give you instructions on what you need to get rolling. PM me if you are interested in doing that.

Yes I am interested in installing Linux. Anyway I found something. On A70S the TS seems to be miss calibrated, I entered settings and enabled the cursor (something that displays my touch direction) and it seems like its miss calibrated for a bigger screed or bigger resolution. Hope it helps.

Mavasilisk said:
Yes I am interested in installing Linux. Anyway I found something. On A70S the TS seems to be miss calibrated, I entered settings and enabled the cursor (something that displays my touch direction) and it seems like its miss calibrated for a bigger screed or bigger resolution. Hope it helps.
Click to expand...
Click to collapse
PM sent. Let me know if you have further questions.

Ok i go home and i will try another thing this evening (launcher pb??)
Wait and see.
I put my log how i like it
Bizcuite

Ranomez said:
bootlooping for about 10 mins on a101it using kboot, is it related to kboot i wonder, anyway il see if i can pull logs later, right now i got to go somewhere?
Click to expand...
Click to collapse
It is not related to kboot I think, i have A70S with kboot and the only difference between them both is the large screen that 101 has.

Related

[WIP] [DEV] [HOWTO] Ubuntu on Nook Color! UPDATE 1/5/11

DISCLAIMER: You know the risks, bricking, breaking etc. I'm not, nor is anyone else responsible if something goes wrong with your device, especially should it turn into a cave troll and bludgeon someone to death.
You will have to be rooted for this to work.
Update 1/5/11
Changed the install and loader scripts re-compressed and uploaded, new download link. Stream lined the installation process (removed 5 steps)
Update 1/4/11
reflect changes to ubuntu.sh and bootubuntu scripts and streamlining the process. Added screenshots
_________________________
I was over at nexusonehacks.net and looking at the ubuntu on nexus one hack and was thinking that this could be ported to the nook color. The idea is to run ubuntu from an img on the sd card.
The following is a modified version of the "how to" orginally posted here
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
Credits
The guys at NexusOneHacks
xda user munday who has modified the scripts to work for the nook color
Devs at XDA Developer for the Ubuntu ARM image for HTC HD2
Saurik (Jay Freeman) for the Debian G1 script, which was hacked for Ubuntu on Nexus One! and then re-hacked for the Nook Color by munday
Here we go:
1) Go download the ubuntu file here: http://www.megaupload.com/?d=67BU4Y3T
2) Extract the contents using 7zip http://www.7-zip.org/download.html
3) Copy the extracted folder "ubuntu" to the root of your SD card
4) Unmount the nook from your pc, go into the app NookColor Tools (if you don't have it download it here courtesy of Ben 74 and click All Settings->Development then uncheck Auto Mount. This will prevent the SD card from being mounted automatically when plugged into the PC
5) Plug the Nook back into your pc and open a command line then navigate to your android sdk folder ie C:\android-sdk or wherever you have it and type
Code:
adb devices
Hit enter and make sure that the nook color comes up (should be the SN of your Nook)
Note: This can also be done from terminal emulator instead of adb...but it is kind of a pain
6) Now we want to go into the command line on the nook so type
Code:
adb shell
Hit enter and this should bring up a "#" sign.
7) Type
Code:
su
hit enter (I do this just as a force of habit)
8) Now we navigate to the ubuntu folder we just copied to our sd card by entering
Code:
cd /sdcard/ubuntu
hit enter. To confirm you are where you want to be you can type
Code:
ls
and it should list the contents of the ubuntu folder.
9) Run the setup script ubuntu.sh by entering the following:
Code:
sh ./ubuntu.sh
hit enter
10) Now type
Code:
bootubuntu
and hit enter
11) So now we have ubuntu command line up and running which should look like:
Code:
[email protected]:/#
We will need to get some packages to run a gui and then connect to it via VNC client. So we need to update a few things first. Type:
Code:
apt-get update
then
Code:
apt-get install tightvncserver
now we need the gui elements so enter this:
Code:
apt-get install lxde
12) Type the following:
Code:
export USER=root
vncserver -geometry 1024×600
this sets the resolution...you can change it to play around, but the native resolution for the nook is 1024x600. This is also where you will set the password for your vnc server...make sure to remember it
13) Next, we are going to add the following to /root/.vnc/xstartup file using cat command: (hit enter after each line and ignore the fact that it looks like it does it twice)
Code:
cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
After hitting enter after the last line press "Ctrl+D" twice then press enter
14) We need the vnc server to start every time we start ubuntu, type this:
Code:
cat > front
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1024×600
Same as before, hit enter after each line then after hitting enter for the last line press "Ctrl+D" twice then press enter.
15) Enter this
Code:
cat front /root/.bashrc > temp
Then
Code:
cp temp /root/.bashrc
16) Now on the nook open up your vnc viewer app (android vnc viewer or PocketCloud...or whatever you use)
Use the following settings:
Host Address: 127.0.0.1 (some don't require this)
Password: the password you set up in step 16
Port: 5901
Save and then click connect and you should be up and running on ubuntu! To leave ubuntu type exit from adb. This should kill ubuntu. Exit adb and then you can disconnect the nook from your pc.
To start ubuntu from the nook open up a terminal emulater and type:
Code:
bootubuntu
Hit enter, this should bring up the [email protected], hhen press "Home" key and open up your vnc app. Now you are ready to rock your Linux tablet!
You could also use gscript lite to automate the process of starting ubuntu so you don't have to type it in the terminal everytime. You can get gscript lite from the market or download the file I have attached.
It does seem a little laggy..just a little...for now anyway
To exit ubuntu: Disconnect the vnc client then hold the "Home" key (I use button savior which brings up a nice little task manager) and click the Terminal emulator when it pops up under running tasks. Once you are back in the terminal you can type:
Code:
exit
to shut down ubuntu.
Enjoy and make sure you thank munday and the guys at nexusonehacks and all the devs who helped make it possible.
-devastator
EDIT:
I noticed that after rebooting the nook would hang at the "Future of reading" screen....if this happens turn the device off remove the sd card the turn the nook back on. It should boot fine. After it's finished you can return the sd card and mount it. This is strange and I'm looking into it. I'm not sure if this is limited to me or if it is universal to all nooks. It also still fails at shutting ubuntu down for some reason. I'm still looking into this.g into this.
I got it going, just needed a few "busybox"-es here and there . It needs some work, right now to get X you have to use VNC.
It's sluggish but a bit more work might just yield something a bit more usable. I'll play more tomorrow night.
Here's my scripts:
ubuntu.sh
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /system
busybox modprobe ext2
rm -f /data/local/bin/fsrw
rm -f /data/local/bin/bootubuntu
rm -f /data/local/bin/unionfs
rm -f /data/local/bin/installer.sh
rm -f /data/local/bin/mountonly
mkdir /data/local/mnt
#busybox clear
rm /system/bin/fsrw
rm /system/bin/bootubuntu
rm /system/bin/unionfs
rm -/system/bin/mountonly
busybox cp -f fsrw /system/bin
busybox cp -f bootubuntu /system/bin
busybox cp -f unionfs /system/bin
busybox cp -f mountonly /system/bin
cd /sdcard/ubuntu
busybox chmod 4777 *
cd /system/bin/
busybox chmod 4777 *
cd /
#busybox clear
echo " "
echo "Ubuntu Chroot Bootloader v0.1"
echo "Ubuntu Bootloader is now installed!"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Installer by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo " "
echo "To enter the Debian Linux console just type 'bootubuntu'"
bootubuntu
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox mknod /dev/loop2 b 7 0
mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Then just followed the instructions at nexusonehacks.
note: to run bootubuntu i had to use sh and the use the full path:
Code:
# sh /system/bin/bootubuntu
other note: I was using adb not a term app on the nook.
Obligatory video
I can't post links yet so check: youtube.com/watch?v=TnXfZ6aagn8 for a really boring video
EDIT: switched the names, DOH!
I also had to use sh and the full path also. Thanks for the update on the script...gonna try it in the morning (it's 2am here) will also see if I can help to get it running smoother. What class SD card are you using? I imagine a class 4 or higher would yeild better results as far as responsiveness goes.
The sd is a class 2 that came in one of my dev phones. I'll pick up a faster one tomorrow after work and test it out.
It's just about 3am here now, we must be in the same time zone.
I'm going to bed now, but first here's a modded version of the script you had originally posted that also works now.
bootubuntu
Code:
#!/bin/sh
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
busybox [ ! -d /data/local/ubuntu ] && mkdir /data/local/ubuntu
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox mknod /dev/loop1 b 7 0
busybox losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
busybox losetup -d /dev/loop1
#unregistering the loopback device just seems to die. need to fix or remove.
I'll look at the N1 formus tomorrow too and see if they have made progress in getting X to run fast or without need for VNC.
Nice work, I am addicted in seeing the crazy crap people are doing everyday.
Couldn't sleep so I'm messing around with it now...I'm using a class 4 and have it up and running. It does seem to be a little laggy, but I don't have a class 2 to compare it to. Let me know what you find out, I'll keep playing with it also to see if I can get it to be more responsive...but we are definately on our way to having a great little linux tablet in addition to android. You should also be able to use this for other builds of linux also by just changing out the .img file to a flavor of your choosing. I'm excited
I have also updated the OP with the how to and credits. Really appreciate your help munday.
I noticed that after rebooting the nook would hang at the "Future of reading" screen....if this happens turn the device off remove the sd card the turn the nook back on. It should boot fine. After it's finished you can return the sd card and mount it. This is strange and I'm looking into it. I'm not sure if this is limited to me or if it is universal to all nooks.
Edit:
Running into some strange occurrences...it appears that when you type exit from the terminal to kill ubuntu, I believe ubuntu stays running...anyway, I'm going to bed and will work on it more tomorrow.
devastatorx said:
You should also be able to use this for other builds of linux also by just changing out the .img file to a flavor of your choosing. I'm excited
Click to expand...
Click to collapse
Are there any increased risks with changing the version you use?
Well, you will want to make sure that the build supports ARM based devices.
munday said:
Then just followed the instructions at nexusonehacks.
note: to run bootubuntu i had to use sh and the use the full path:
Code:
# sh /system/bin/bootubuntu
Click to expand...
Click to collapse
I fixed this, the scripts were backwards, I have updated the OP to reflect the changes and bootubuntu now works
devastatorx said:
I fixed this, the scripts were backwards, I have updated the OP to reflect the changes and bootubuntu now works
Click to expand...
Click to collapse
sweet, i can't wait to get home to play more!!!
I've tried running ubuntu.sh from the terminal emulator (With su) and from ADB, and have not had success with either.
The readout is:
Code:
': File existste '/system/bin
': File existste '/system/bin
': File existste '/system/bin
: not found
: not found
cd: can't cd to /sdcard/ubuntu
: not found
: No such file or directory
: not found
cd: can't cd to /system/bin
: not found
: No such file or directory
: not found
cd: can't cd to /
: not found
: not found
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
etc., etc.
Is there a problem with how I copied the script? I assume the first part about the file existing is due to this being the third or fourth time I've tried running the script (Unsuccessfully), but I've no idea how to interpret the rest.
Thanks
munday said:
sweet, i can't wait to get home to play more!!!
Click to expand...
Click to collapse
I sent you a message
Link3737 said:
I've tried running ubuntu.sh from the terminal emulator (With su) and from ADB, and have not had success with either.
The readout is:
Code:
': File existste '/system/bin
': File existste '/system/bin
': File existste '/system/bin
: not found
: not found
cd: can't cd to /sdcard/ubuntu
: not found
: No such file or directory
: not found
cd: can't cd to /system/bin
: not found
: No such file or directory
: not found
cd: can't cd to /
: not found
: not found
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
etc., etc.
Is there a problem with how I copied the script? I assume the first part about the file existing is due to this being the third or fourth time I've tried running the script (Unsuccessfully), but I've no idea how to interpret the rest.
Thanks
Click to expand...
Click to collapse
Try using these, just unrar and then copy them in your ubuntu folder, if it asks to overwrite just click yes...also you have autmounting of the sd card turnned off in nook color tools settings right?
Yeah, it must have been an error on my end. Using the updated scripts you posted worked like a charm.
Thanks!
Link3737 said:
Yeah, it must have been an error on my end. Using the updated scripts you posted worked like a charm.
Thanks!
Click to expand...
Click to collapse
Good to hear!
I'm currently working on making this a port to the SD card so that with the sd card in it boots into ubuntu from power off, and with the sd card out it boots to android then you replace the sd and use it for storage like normal. It will also run a lot snappier....well that's the idea anyway.
devastatorx said:
Good to hear!
I'm currently working on making this a port to the SD card so that with the sd card in it boots into android from power off, and with the sd card out it boots to android then you replace the sd and use it for storage like normal. It will also run a lot snappier....well that's the idea anyway.
Click to expand...
Click to collapse
Booting from SD in the same fashion as Nookie Froyo? That sounds like it would give a huge performance boost over the current method, I can't wait to see what you come up with.
This should be acheivable using the method mentioned in this topic:
http://forum.xda-developers.com/showthread.php?t=873243 thanks to clockworx.
Currently looking into this
devastatorx said:
This should be acheivable using the method mentioned in this topic:
http://forum.xda-developers.com/showthread.php?t=873243 thanks to clockworx.
Currently looking into this
Click to expand...
Click to collapse
I was thinking the exact same thing, the nook seems to like booting from sd, so we should be able to set up the partitions like the foryo sd and edit the init.rc and env.txt to boot ubuntu instead of android. Just a theory though. It's my plan for tonight anyway.
munday said:
I was thinking the exact same thing, the nook seems to like booting from sd, so we should be able to set up the partitions like the foryo sd and edit the init.rc and env.txt to boot ubuntu instead of android. Just a theory though. It's my plan for tonight anyway.
Click to expand...
Click to collapse
I also stumbled across this: http://androix.org/ Which talks about a native android xserver which does a way with the vnc aspect altogether. I downloaded and attempted to install but I get the error "There is a problem parsing the package" and I haven't had any luck plus there isn't much documentation.
Let me know how it goes munday, I'll be working on the same thing later (have to take the fiance out for dinner)
question
I was just curious, after installing ubuntu can we install flash as we would had we booted linux from netbook?

[Q] cinergy hybrid stick (dvb-t xc3028L) on tf201

hi
this is a sequel from this thread
ive got a cynergy hybrid stick dvb-t tuner i would like to use on my transformer (tf201)
i first compiled every dvb-t kernel modules you get in linux kernel as explainned here
here are the modules i compiled for kernel 3.1.10-00002-g599d0cf :
www.mindthepressure.org/android/dvb_ko_3.1.10-00002-g599d0cf.tar.gz
which was more or less useless because this specific tuner works on linux with firmware xc3028L-v36.fw :
www.linuxtv.org/wiki/index.php/Xceive_XC3028/XC2028#How_to_Obtain_the_Firmware
http://linuxtv.org/wiki/index.php/DVB-T_USB_Devices/Full
Terratec Cinergy Hybrid Stick
Supported: ✔ Yes, in kernel since 2.6.35
USB ID: 0ccd:00a5
Tuner: xc3028L
Demodulator: ZL10353
USB Bridge: TM6010
firwmare: xc3028L-v36.fw
Click to expand...
Click to collapse
i succeed to get this tuner to work on linux just by installing xc3028L-v36.fw in /lib/firmware/
i tried randomly to put the same file in /etc/firmware/ on android but it doesn't seems to work this way
my tuner doesn't light on either when i launch this script
Code:
echo "Starting DVB support"
insmod dvb-core.ko # core support for DVB
insmod dvb-pll.ko # I am not sure if this is even needed
insmod rc-core.ko # Support for remote control, some drivers won't load otherwise
insmod dvb-usb.ko # Support for usb tuners
insmod zl10353.ko # Add here your driver. If more than one needed, add another line
# if firmware is needed, make sure the firmware is in the right folder, it should be /lib/firmware, but I'm not 100% sure
# Also some devices won't need the steps below
echo "Waiting for device"
sleep 5
cd /
mkdir /dev/dvb
mkdir /dev/dvb/adapter0
cd /dev/dvb/adapter0
ln -s /dev/dvb0.frontend0 frontend0
ln -s /dev/dvb0.demux0 demux0
ln -s /dev/dvb0.dvr0 dvr0
ln -s /dev/dvb0.dvr0 dvr0.ts
chmod -R 777 /dev/dvb* # The original script doesn't have it, but try adding a -R before 777 might ease things a bit
echo "DONE!"
(from here)
i get this error :
unable to chmod /dev/dvb/adapter0/dvr0.ts No such file or directory
must be a simlink to /dev/dvb0.dvr0 which does indeed not exist
i guess i'm missing something, probably much, but i don't know what
would *.fw firmwares work in an android environnement as they do on linux ?
thanks for any help !
i guess i need to compile tm6000.ko driver
http://www.linuxtv.org/wiki/index.php/Trident_TM6000
but i don't know how for i can't find it sources in kernel 3.1.10-00002-g599d0cf nor in v4l-dvb

[Q] USB networking. I want to VNC over usb from Ubuntu 12.04,[ working over wifi]

Well the script should be working, it is 'ettin.sh' now. To get VNC to work on separate device just change 'eth0' to 'wlan0' or whatever other interface you know how to configure, like usb maybe, in the 'init.sh' script that resides in ~/ on the images you can download from http://linuxonandroid.org/downloads/. Cool. If anyone can help with the usb configuring that would be cool.
Also on the different roms your storage might be different so just change that to what suites your environment,
BAD NEWS, After my first launch and exiting the VNC on my laptop (Ubuntu) My phones home button and a few other functions stopped working, a reboot remounts the root and system partitions and it goes back to normal essentially, I haven't noticed any adverse affects after the reboot.
Good luck.
EDIT: If you can't help me, you probably shouldn't attempt any of this.
I want to connect to backtrack over usb from Ubuntu on my laptop instead of from my phone. Is there a good way of doing this?
The thing is, I didn't chroot, I mounted the image, copied the contents of '/etc/*' and '/sbin/*' to the '*/etc' '*/sbin' dirs of the mounted image. and then mounted it's (the image's) contents to Androids rootfs '/' then I set up a little script to set up the environment and execute '/bin/bash -i init.sh' and again reset PATH to include /system/*.
Then in the init.sh script I want to set up a way to 'vnc' through' usb to backt4acks desktop. How would I do this?
EDIT: I started this script blelow, its not complete, feel free to use it however you like.
If anyone is good with bash I need help with loops in Bash or shell, ksh, or ash. So if you change it at all share those changes here. I haven't tested any of the loops, I wrote this here and need to do some reading on shell scripting, peace out.
Just NOTE that I would not execute this script yet, it is NOT YET COMPLETE.
I will be making minor changes as I learn and test things out, Also this was inspired by the autobootscrip (sp?) that the Linux on Android Installer app uses.
mintberrycrunch revision
I need a little help with the mounting part, "is there anybody out there?"
EDIT: Maybe escape '\' characters...
Maybe this will work? 'if [ ! -d "/$d" -a "$d" \!= "dev" -o "$d \!= "mnt" ]; then ' I want it to test whether the directory does not already exists in / and if it is not named dev or named mnt then mount it. Do you think this is a decent way to do it? Any suggestions?
Sorry, I still haven't tested this script yet, so if you brave and see any changes that will make it work I am not resposible. But it is getting close to when I will run it for the first time. The difference between this and the one I wrote for Kali is this should be a one stop shop so to speak for getting into a non chroot enviroment where you can access Bt's tools from Android directly. Apperently about a year ago someone was trying something similar called "debian installer" or something, I haven't tried it out so maybe that actually works, idk, I am happy with this.
LOL
LMFAO!
I just realized I don't think I needed to worry about testing if the variable $d was named 'dev' or 'mnt' because they should get skipped by already being mounted. If not I guess if it works as is, may be extra precaution.
Done! Almost ;{)-
Uhmm.... hope you can see the screenshot...
its over wifi though, I had to edit the init.sh script just eth0 to wlan0 in 2 lines, duh! where is eth0 on phone?
Check out the filesystem
Bada bing, bada doom, dare ya goes`a for ya.
V-0.021
This should support args, if your using different image or location such as external sdcard or want to mount to a different location
Notes: 'ettin.sh' [/IMAGE/LOCATION] [IMAGENAME] [MOUNT/POINT]'
1) Don't add a trailing forward slash for image location, the first argument. Doing so may conflict with the script.
2) Don't add suffix to image name ( second argument), the script uses a wild card period wild card syntax to account for .iso, .raw, or .img aswell as version numbers, so if its backtrack-v-r5.img all you need is 'backtrack'.
3) Default mount is "/data/local/mnt"
for example:
Code:
ettin.sh /storage/extSdCard/ubuntufolder ubuntu /mnt/myLinux
That ^^^ will use a ubuntu image on the external sdcard and mount it to a folder called "myLinux" within the "/mnt" directory.
The script below...
Code:
#!/system/bin/sh
# ettin.sh v-0.021, "Two heads are better than one."
# Written by 'Edge-Case' @ 'forum.xda-developers.com'
# This version is attempting to use symbolic linking to correct some issues.
## The purpose of ettin.sh is to merge a Linux system with Android
## hopefully allowing both systems to run in synch with each other.
## It is probably best to be ran on devices with multi-core processors.
##"""Notes on Backtrack and Kali Linux Distributions:
##"""1) Postgresql needs to be configured in order for metasploit to connect to
##""" the database. This might be possible within the script. Perhaps
##""" it is simply a matter of configuring SSH? I don't know.
##"""2) The Kernel needs to be patched to allow for packet injection and
##""" monitor mode for an external 'wi-fi' card as the factory hardware
##""" does not support monitor mode, at least on Samsung Galaxy SIII.
#########
# Prep ##
#########
mount -wo remount systemfs /system
mount -wo remount rootfs /
imloc=${1:-"/storage/sdcard0/backtrack"}
imname=${2:-"backtrack"}
subset=${3:-"/data/local/mnt"}
#Check for root!
if [ ! -d "$subset" ]; then mkdir "$subset"; fi
busybox mount -wo loop ${imloc}*/${imname}*.* ${subset}
check_mnt="`echo $?`"
if [ ${check_mnt} != 0 ]; then echo "Something is wrong with mounting, check the situation!" && exit; fi
##################################################
# Copy contents of special directories to image ##
##################################################
if [ ! -f "${imloc}/success.txt" ] ; then cp -ai /sbin/* ${subset}/sbin && echo "Files have been copied on `date`." > ${imloc}/success.txt; fi
if [ -e "/root/*" ]; then cp ai /root/* ${subset}/root; fi
######################################################
# Make directories needed and mount the file-system ##
######################################################
cd ${subset}
for d in `ls` ; do if [ ! -d "/${d}" ] ; then mkdir /${d} && busybox mount --rbind ${subset}/${d} /${d} ; fi ; done
busybox mount --rbind ${subset}/root /root
busybox mount --rbind ${subset}/sbin /sbin
busybox cp -rspi ${subset}/etc/* /etc # We'll try making symbolic links from the image to Android's /etc instead.
# Add any directories as needed.
###############################
# be safe before we continue ##
###############################
mount -ro remount systemfs /system
mount -ro remount rootfs /
######################################
# continue building the environment ##
######################################
export PATH="/system/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/system/xbin:/usr/games"
export TERM=linux
export HOME="/root"
#################################
# further down the rabbit hole ##
#################################
/bin/bash -i ~/init.sh
Pretty happy with it now, so far. Touch FIXED
Well, I am tethered from my phone to my laptop, running ubuntu, this is how I am on the internet, so my phone is doing that...
I ran 'ettin.sh /storage/sdcard0/ubuntu ubuntu' using V-0.022 and only had two files that needed overwriting.
The touch is working....check
adb is working...check
Everything is mounted ...check
Apps like browser and dsploit are working on the phone as usual...check
'apt-get update && apt-get upgrade'....check (over adb, no chroot, as [email protected] using bin/bash)
'which nmap' .....check ("
[email protected]:~# which nmap
/usr/bin/nmap
")
Well **** ya'll looks like this might work... I am now going to consider modifying a stock rom to support users and login that meshes with debian and its "shadow" file etc etc, also I need to work out permissions and enviroment variables...
I'm happy...
Also for pentesting distro's "modifying Android kernel" tutorials would be nice, anybody able to point me to one?

[HOWTO] Run Gentoo Linux on the X+ (chroot)

Hi,
Can't really find a tutorial for our phone, so I'll be, well, making a tutorial
Some notes:
- Compiling is really slow, VERY. Probably RasPi speed.
- Putting the chroot in a specific location helps, due to our phone having weird mountpoints (try typing `mount` and see what happens)
- You can ADB shell into the phone, type "stop" so Zygote is stopped (less RAM usage, less CPU usage, basically pure Linux is running)
- ^ Remember to type "start" after finished playing with the chroot, or you get a frozen phone until forced reboot!
You may be able to adapt this guide to other distros too (although unlikely)
REQUIREMENTS
- Enough juice for playing games for a long time
- A WORKING busybox with "tar xvjpf" available
- You are rooted
1. First of all, su and mount root read/write.
Code:
su; mount -o remount,rw /
2. cd into /data/local
Code:
cd /data/local
3. mkdir linux (or other names if you prefer)
Code:
mkdir linux
4. cd into it
Code:
cd linux
5. Download a stage3 tarball USE ARMv7l, our phone isn't hard-floated and put it in current directory.
- If you use an external browser, make sure the permissions isn't set to r--------, chmod 755 to be sure
- If you use wget, you probably don't have to worry about permissions
6. Extract it. Replace blahblahblah with your file name
Code:
tar xvjpf blahblahblah.tar.bz2
7. Make a chroot script which contains all the necessary bind mounts and commands. Make sure it is in the same dir as your chroot!
Code:
#!/system/bin/sh
# Enable network forwarding to the chroot
sysctl -w net.ipv4.ip_forward=1
# Mount proc to "current directory"/proc
mount -t proc proc proc/
# Mount sys, bind
mount -o bind /sys sys/
# Mount dev, bind
mount -o bind /dev dev/
# Symlink proc/self/fd to dev/fd, or portage will fail
ln -s proc/self/fd dev/
# Write resolvconf
echo "8.8.8.8" > etc/resolv.conf
# Make sure the permissions are correct
chmod 755 etc/resolv.conf
# Chroot using /bin/bash as shell
chroot . /bin/bash
Then chmod 755 the script
Code:
chmod 755 chroot.sh
8. All Gentoo users should know this...
Code:
source /etc/profile
9. Edit /etc/portage/make.conf
Code:
nano /etc/portage/make.conf
10. Add these lines to it
Code:
# This will disable userfetch, making name resolution work.
FEATURES="-userfetch"
11. Adjust USE flags and other configs as necessary... save it
12. Enjoy Gentoo on your phone! :laugh::laugh:
13. Just Ctrl+D to exit chroot

[Q] Rooting a Trekstor Surftab breeze 10.1 quad [SOLVED]

Hi, I've recently acquired a Trekstor Surftab breeze 10.1 quad and my first (admittedly inexperienced) attempts at rooting it have failed miserably.
The tablet is a 10.1 inch 8GB device with a Mediatek MT8127 running Android 4.4.2 (Kernel 3.4.67 [email protected] #1). I tried first with Towelroot (including the various advanced modes), which did nothing, not even the temporary root option. Kingo Root and iRoot (former vRoot) are able to connect to the tablet in debug mode, but after trying several scripts and rebooting the device a few times they ultimately failed.
I'd rather not change the recovery without a having a backup, but I tried MTK Tools to at least get some useful information. I couldn't get a scatter file because the button was greyed out (I don't think the program is fully compatible with the MT8127), but the partitioning info was slightly different from other MT8127-based devices (I checked the Cube U27GT MT8127 tablet). Getting a scatter file from an existing ROM (or just modifying a ROM to add the su binary) seems to be out of the question, because I couldn't find one on the Trekstor site and a quick Google search gave me nothing. I also tried to get temporary root but it failed with a suggestion to install CWM recovery.
Also, just in case I was being an idiot and the tablet came with the su binary already installed (other Trekstor devices do), I tried installing SuperSU directly, but I had no such luck.
If I find anything else I'll post it here, but for the time being I've run out of ideas. Any suggestions?
I've finally cracked it and been able to put together some notes. They are intended for the Surftab Quad 10.1, but they might be useful with some modifications for other devices based on a Mediatek SOC that can't be rooted using the usual tools (or if you don't trust the usual tools). I've tried to attach the programs I've used, but I've been having a lot of trouble because some files are too large. You can get everything from these Mega links instead:
ext4_utils_new_cygwin_fixed.tar.gz: https://mega.co.nz/#!YIkhFTRJ!uemCzV5fTlXoyK61Vr3Ib-sPXYlzmrffYG7YwUxXaU0
MT6577 USB VCOM drivers.rar: https://mega.co.nz/#!dcNx2QBC!eHyKtnwbVc2Gj5hCUQXQIlQsv9G3dGXWvPEvrB15mNw
MT8127_Android_scatter_surftab_quad_101.txt: https://mega.co.nz/#!Yd0nnRoL!s5ztQIwwZLa3i89zVU9vFJL0xZXg5LKqIDSkRAdj45k
MtkDroidTools v2.5.3.zip: https://mega.co.nz/#!0FVxjILC!0-FOlPfT_OIRETYj_MsJofmse7zBeRMsSumJLicj5sM
spflash_5.14.16.zip: https://mega.co.nz/#!hcE0HKBJ!mkcdVjXBOUs7W1GhTF_qssgO14GNGs7kSWaOE9FJx2o
UPDATE-SuperSU-v2.45.zip: https://mega.co.nz/#!BUMzRaaR!R7_kGU7UN3SchcaEDCxKW7Oehfoi0PDsD-OeX9gJh0M
1) Make (or in this case check) the scatter file with MTK Droid Tools.
a) Turn on the device.
b) Enable USB debug.
c) Connect it to the PC.
d) Open MTK Droid Tools.
e) Check that the device information is correct, view block map, compare with scatter file and modify if needed.​Alternatively, you can use the ADB terminal (it can be opened from MTK Droid Tools) and use the command “adb pull /proc/dumchar_info”. The resulting text file should contain the same information.
2) Install the VCOM drivers (I provide the Win7 version)
http://forum.xda-developers.com/showthread.php?t=2206421
http://forum.xda-developers.com/general/rooting-roms/guide-mediatek-spflashtool-failure-t2936933
The gist of it is, use USBDeview to remove any old VCOM drivers, install, reboot and plug in the switched off tablet. A new COM port-type device should flash for an instant in the device admin. Some guides recommend to change the preloader driver for DA, but in this case I found it not to be necessary. That said, the connection is a bit finicky and the USB cable that comes with the device and the port in the device itself seem to be pretty crappy, so in later steps it gave repeated COM errors unless I kept pressing on the micro USB connector or used a different cable altogether (the one belonging to my Kindle, to be precise). After a bit of trial and error, I also had a bit of trouble if the COM port assigned to the device was above port 9. That can be set in the device properties dialog, under the “Port configuration” tab and in “Advanced options”.
USBDeview might be necessary.
http://www.nirsoft.net/utils/usb_devices_view.html​
3) Extract the system image (and make a full backup, just in case) with SP Flash Tools.
a) With the device unplugged and turned off, start SP Flash Tool.
b) Load the scatter file.
c) Under the Readback tab, click on “Add” and double click on the new field. I recommend to back up the entire device first, so name the file “full_dump.img” or somesuch and save from 0x00000000 to 0x4db00000, which would be everything but the user data and BMTPOOL. Then we add a second dump, named “system.img” starting on 0x5d00000 and with size 0x40000000. Those values come from the scatter file. They shouldn’t change if the device is the same, but if they do modify them as fit.
c) With the device turned off, plug the micro-usb side of the cable first (it’s more convenient that way), click “read back” and insert the cable into the pc. As mentioned before, the process can fail for many reasons. Sometimes unplugging the device, pressing briefly the tablet’s reset button and trying again helps.​
4) Now prepare to continue working on Linux, a virtual machine like VirtualBox running Ubuntu should be enough. A bit over 2GB of free space will be needed.
a) Create a work directory, copy the system.img, ext4 utils and SuperSU files into it and open a terminal there.
b) If they aren't installed already, install compression and compilation tools (I might have been left out a few packages, I didn't have a clean setup to test it; if something isn't installed by default, finding the package shouldn't be hard). Assuming you are using Ubuntu:
Code:
sudo apt-get install unzip build-essential
c) Extract everything and compile the ext4 utils.
Code:
tar -xf ext4_utils_new_cygwin_fixed.tar.gz
unzip -d supersu UPDATE-SuperSU-v2.45.zip
cd ext4_utils_new; make; cd ..
d) Mount the original system image and copy everything it contains to a new directory.
Code:
mkdir system_old system_root
sudo mount -t ext4 -o loop system.img ./system_old
sudo cp -a system_old/* system_root
4) Install the SuperSU binaries and app.
The package I've included is intended to be installed automatically by the recovery menu, but we are going to do it manually by following the steps described in the setup script (supersu/META-INF/com/google/android/update-binary):
Code:
# API source target chmod chcon required
#
# 7-19 common/Superuser.apk /system/app/Superuser.apk 0644 u:object_r:system_file:s0 gui
# 20+ common/Superuser.apk /system/app/SuperSU/SuperSU.apk 0644 u:object_r:system_file:s0 gui
#
# 17+ common/install-recovery.sh /system/etc/install-recovery.sh 0755 *1 required
# 17+ /system/bin/install-recovery.sh (symlink to /system/etc/...) required
# *1: same as /system/bin/toolbox: u:object_r:system_file:s0 if API < 20, u:object_r:toolbox_exec:s0 if API >= 20
#
# 7+ ARCH/su /system/xbin/su *2 u:object_r:system_file:s0 required
# 7+ /system/bin/.ext/.su *2 u:object_r:system_file:s0 gui
# 17+ /system/xbin/daemonsu 0755 u:object_r:system_file:s0 required
# 17+ /system/xbin/sugote 0755 u:object_r:zygote_exec:s0 required
# *2: 06755 if API < 18, 0755 if API >= 18
#
# 19+ ARCH/supolicy /system/xbin/supolicy 0755 u:object_r:system_file:s0 required
# 19+ ARCH/libsupol.so /system/lib(64)/libsupol.so 0644 u:object_r:system_file:s0 required
#
# 17+ /system/bin/sh or mksh *3 /system/xbin/sugote-mksh 0755 u:object_r:system_file:s0 required
# *3: which one (or both) are available depends on API
#
# 21+ /system/bin/app_process32 *4 /system/bin/app_process32_original 0755 u:object_r:zygote_exec:s0 required
# 21+ /system/bin/app_process64 *4 /system/bin/app_process64_original 0755 u:object_r:zygote_exec:s0 required
# 21+ /system/bin/app_processXX *4 /system/bin/app_process_init 0755 u:object_r:system_file:s0 required
# 21+ /system/bin/app_process (symlink to /system/xbin/daemonsu) required
# 21+ *4 /system/bin/app_process32 (symlink to /system/xbin/daemonsu) required
# 21+ *4 /system/bin/app_process64 (symlink to /system/xbin/daemonsu) required
# *4: Only do this for the relevant bits. On a 64 bits system, leave the 32 bits files alone, or dynamic linker errors
# will prevent the system from fully working in subtle ways. The bits of the su binary must also match!
#
# 17+ common/99SuperSUDaemon *5 /system/etc/init.d/99SuperSUDaemon 0755 u:object_r:system_file:s0 optional
# *5: only place this file if /system/etc/init.d is present
#
# 17+ 'echo 1 >' or 'touch' *6 /system/etc/.installed_su_daemon 0644 u:object_r:system_file:s0 optional
# *6: the file just needs to exist or some recoveries will nag you. Even with it there, it may still happen.
#
# It may seem some files are installed multiple times needlessly, but
# it only seems that way. Installing files differently or symlinking
# instead of copying (unless specified) will lead to issues eventually.
#
# The following su binary versions are included in the full package. Each
# should be installed only if the system has the same or newer API level
# as listed. The script may fall back to a different binary on older API
# levels. supolicy are all ndk/pie/19+ for 32 bit, ndk/pie/20+ for 64 bit.
#
# binary ARCH/path build type API
#
# arm-v5te arm aosp static 7+
# x86 x86 aosp static 7+
#
# arm-v7a armv7 ndk pie 17+
# mips mips ndk pie 17+
#
# arm64-v8a arm64 ndk pie 20+
# mips64 mips64 ndk pie 20+
# x86_64 x64 ndk pie 20+
#
# Note that if SELinux is set to enforcing, the daemonsu binary expects
# to be run at startup (usually from install-recovery.sh, 99SuperSUDaemon,
# or app_process) from u:r:init:s0 or u:r:kernel:s0 contexts. Depending
# on the current policies, it can also deal with u:r:init_shell:s0 and
# u:r:toolbox:s0 contexts. Any other context will lead to issues eventually.
#
# After installation, run '/system/xbin/su --install', which may need to
# perform some additional installation steps. Ideally, at one point,
# a lot of this script will be moved there.
#
# The included chattr(.pie) binaries are used to remove ext2's immutable
# flag on some files. This flag is no longer set by SuperSU's OTA
# survival since API level 18, so there is no need for the 64 bit versions.
# Note that chattr does not need to be installed to the system, it's just
# used by this script, and not supported by the busybox used in older
# recoveries.
#
# Non-static binaries are supported to be PIE (Position Independent
# Executable) from API level 16, and required from API level 20 (which will
# refuse to execute non-static non-PIE).
#
# The script performs serveral actions in various ways, sometimes
# multiple times, due to different recoveries and firmwares behaving
# differently, and it thus being required for the correct result.
What the script is supposed to do depends on the API version, which can be identified by doing:
Code:
cat system_root/build.prop | grep "ro.build.version.sdk="
We should have API version 19, but at one point the instructions are misleading. When adjusting the security context of install-recovery.sh it states that it should match that of toolbox, which is correct, but next gives values for different API versions which do not match our case. We shouldn't trust them and use
Code:
ls -Z system_root/bin/toolbox
to obtain the right value, in our case ubject_r:toolbox_exec:s0 (as in API version higher than 20).
Next I give all the commands, so assuming the directory names are the same I used they can just be copied and pasted into the terminal:
Code:
sudo cp supersu/common/Superuser.apk system_root/app/
sudo chmod 0664 system_root/app/Superuser.apk
sudo chcon u:object_r:system_file:s0 system_root/app/SuperSU/SuperSU.apk
sudo cp supersu/common/install-recovery.sh system_root/etc/
sudo chmod 0755 system_root/etc/install-recovery.sh
#we have to copy the chcon of system_root/bin/toolbox: ls -Z system_root/bin/toolbox, the original script is misleading or our android setup isn't standard.
sudo chcon u:object_r:toolbox_exec:s0 system_root/etc/install-recovery.sh
sudo ln -s /system/etc/install-recovery.sh system_root/bin/install-recovery.sh
sudo cp supersu/armv7/su system_root/xbin/
sudo mkdir system_root/bin/.ext
sudo cp supersu/armv7/su system_root/bin/.ext/.su
sudo chmod 0755 system_root/xbin/su system_root/bin/.ext/.su
sudo chcon u:object_r:system_file:s0 system_root/xbin/su system_root/bin/.ext/.su
sudo cp supersu/armv7/su system_root/xbin/daemonsu
sudo cp supersu/armv7/su system_root/xbin/sugote
sudo chmod 0755 system_root/xbin/daemonsu system_root/xbin/sugote
sudo chcon u:object_r:system_file:s0 system_root/xbin/daemonsu
sudo chcon u:object_r:zygote_exec:s0 system_root/xbin/sugote
sudo cp supersu/armv7/supolicy system_root/xbin/
sudo cp supersu/armv7/libsupol.so system_root/lib/
sudo chmod 755 system_root/xbin/supolicy
sudo chmod 0755 system_root/xbin/supolicy
sudo chmod 0644 system_root/lib/libsupol.so
sudo chcon u:object_r:system_file:s0 system_root/xbin/supolicy
sudo chcon u:object_r:system_file:s0 system_root/lib/libsupol.so
sudo cp system_root/bin/mksh system_root/xbin/sugote-mksh
sudo chmod 0755 system_root/xbin/sugote-mksh
sudo chcon u:object_r:system_file:s0 system_root/xbin/sugote-mksh
6) Generate a new image file with make_ext4fs.
Code:
./ext4_utils_new/make_ext4fs -a system -l 1G system_root.img system_root/
We can now mount it and verify that the files are in place and with the right permissions.
Code:
mkdir system_test
sudo mount -t ext4 -o loop system_root.img ./system_test
ls -la system_test/app/SuperSU.apk
ls -Z system_test/app/SuperSU.apk
ls -la system_test/xbin/su
ls -Z system_test/xbin/su
And finally unmount everything
Code:
sudo umount system_root
sudo umount system_test
7) Return to Windows and flash our rooted system image.
a) Open the flash tool, checking that we have loaded the right scatter file.
b) Select “download only” in the drop-down menu, make sure only “ANDROID” is checked in the list and, double-clicking that entry, pick the system_rooted.img file we have just created.
c) Just as when we extracted the image, we press “Download” and plug in the USB cable with the device turned off. ​Note: If you have been using a virtual machine, at some point mounted the rooted image to check that all the files were in place and forgot to unmount it, the file will be locked and the flash tool can spit out an error message. It took me a few tries to notice and shut down the VM completely. Don’t be me.
8) After it has finished flashing, unplug the device and boot it again. The first time it boots it should show a boot message saying that it’s updating one app, and once it’s finished we should have a working rooted tablet.
Same here with the trekstor surftab breeze 7.0 quad (ST70408-2).
I have tried everything with no results...
did you try rootgenius? (shuame.com/en/root/)
Y es. I have tried with no results.
Sent from my XT1032 using xda premium
I did it the hard way, eventually. I dumped the original rom, mounted it on linux, copied all the SU binaries manually in the right places (following the instructions in the installation script), and flashed it back.
I'm not sure if I can get in trouble for uploading the whole rooted ROM, but as soon as I have some free time I'd like to at least post more detailed instructions, the programs I used and the scatter file for my 10.1 quad in case someone finds it useful.
I would really appreciate if you could find the time to add a description.
I have a Surftab Breeze 7.0 quad and I am struggeling with backing it up and rooting it.
Looking forward to reading your notes.
sdfsdfgdhshxzv said:
I did it the hard way, eventually. I dumped the original rom, mounted it on linux, copied all the SU binaries manually in the right places (following the instructions in the installation script), and flashed it back.
I'm not sure if I can get in trouble for uploading the whole rooted ROM, but as soon as I have some free time I'd like to at least post more detailed instructions, the programs I used and the scatter file for my 10.1 quad in case someone finds it useful.
Click to expand...
Click to collapse
can u attach your scatterfile plz?
mr9to5 said:
can u attach your scatterfile plz?
Click to expand...
Click to collapse
Sure. This is for my MT8127-based Trekstor Surftab Quad 10.1.
Sorry about the rest of my notes, I've just changed jobs and I'm having a few horribly busy weeks so I've had no time to make them presentable. But once you have the utilities to mount the image on linux, it's just a matter of extracting the supersu archive and looking into the setup script to see where every file goes, where to create links and which permissions to set for the right Android version.
I've finally added my step by step notes to the first post. I hope someone finds them useful.
sdfsdfgdhshxzv said:
I've finally added my step by step notes to the first post. I hope someone finds them useful.
Click to expand...
Click to collapse
very useful, but i have a big problem.
Code:
$ sudo chcon u:object_r:toolbox_exec:s0 system_root/etc/install-recovery.sh
chcon: ungültiger Kontext: u:object_r:toolbox_exec:s0: Datei oder Verzeichnis nicht gefunden
can u help?
mr9to5 said:
very useful, but i have a big problem.
Code:
$ sudo chcon u:object_r:toolbox_exec:s0 system_root/etc/install-recovery.sh
chcon: ungültiger Kontext: u:object_r:toolbox_exec:s0: Datei oder Verzeichnis nicht gefunden
can u help?
Click to expand...
Click to collapse
Hum... not sure what happened there. Can you please try this? (assuming you have used the same directory names I did, change them if you haven't)
Code:
ls -Z system_root/etc/install-recovery.sh
ls -Z system_old/bin/toolbox
sdfsdfgdhshxzv said:
Hum... not sure what happened there. Can you please try this? (assuming you have used the same directory names I did, change them if you haven't)
Code:
ls -Z system_root/etc/install-recovery.sh
ls -Z system_old/bin/toolbox
Click to expand...
Click to collapse
it works, but this errormessages are from selinux, the copied files have no content so we can´t change this.
Sucefull startet CWM recovery
not perfect but runs, incl adb root shell in recovery mode.
la solución al root de esta tablet esta aquí w w w . m g y u n . c o m /
100% efectiva.
---------- Post added at 12:47 PM ---------- Previous post was at 12:11 PM ----------
¿algun propietario de la surftab brisa 10.1 quad, me podría enviar las apk de bluetooth ?
es que manipulando un explorador root he borrado por equivocación estos archivos y no me funciona el bluetooth de la tablet.
gracias.

Categories

Resources