[DEV] AoL - Android ON Linux - GM-T810 Edition [CLOSED]

Status
Not open for further replies.

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
This project is closed due to lack of interest. I'm leaving the files and instructions here for any that want it...


One last present.... See here for a working Arch-AoL MircoSD rootfs.... Just extract it to the ext4 partition of the MicroSD (Step 1) and install the modified kernel (Step 3).

AoL - Android ON Linux - GM-T810 Edition - MicroSD





Background
This project was started on the Lenovo Yoga Tab 2 by @ionioni. Over the past couple months he managed to unlock the bootloader and get Linux running natively with Android in the chroot. See his thread here for more details and the real reasons why we would want this. Having Linux in charge makes for a much nicer environment for me. Also having REAL Linux on the go helps with my day to day work.

MicroSD Install of:
AoL - Android ON Linux - GM-T810 Edition

You must be rooted, and have TWRP and Busybox installed
1) Format MicroSD using Linux gparted:
--MAKE SURE IT IS YOUR MICROSD CARD(/dev/mmcblk..) YOU ARE WORKING WITH!!
--Delete all partitions of MicroSD
--Device>>Create partition table - Select ms-dos
--Partition>>New - Select fat32 and the size you want
--Partition>>New - Select ext4 and the rest of the card (suggest ~4-8GB)
--Click the checkmark...
2) Install the rootfs on Partition 2 of the MicroSD:
(The following is for an Arch AoL install. Someone else will need to do other Distro's)
**The following is run as root not sudo in a terminal on your Linux PC**
--"su"
--Create and cd into a temp directory
--Download - "wget http://archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz"
--Download - "wget https://busybox.net/downloads/binaries/latest/busybox-armv7l"
--Download and extract - aol_inits.7z
--Download aol_cold_initramfs.cpio.gz
--cd to root_of_MicroSD_partition2
--"tar -xpvf /path/to/temp_directory/ArchLinuxARM-armv7-latest.tar.gz ."
--"cp /path/to/temp_directory/busybox-armv7l usr/bin/busybox"
--"cp /path/to/temp_directory/aol_inits/init.stage* etc/"
--"chmod a+x usr/bin/busybox etc/init.stage*"
-- "mkdir -p android android/hot android/cold"
--"cd android/cold"
--"gzip -dc /path/to/temp_directory/aol_cold_initramfs.cpio.gz | cpio -idv"
--"cd ../../" (Root of sdcard)
--"rm etc/resolv*"
--"echo "nameserver 8.8.8.8" > resolv.conf"
--"echo "nameserver 8.8.4.4" >> resolv.conf"
--"echo "inet:x:3003:root" >> etc/group"
--"echo "net_raw:x:3004:root" >> etc/group"
--"echo "PermitRootLogin Yes" >> etc/ssh/sshd_config"
--cd out of the MicroSD and do a sync
--Remove MicroSD and place into your tablet
3) Installing the aol_kernel:
***YOU MUST DO THIS FIRST***
***Goto SuperSU app and do a "cleanup for reinstall from Playstore"
***Reboot
***DO NOT REINSTALL SuperSU app (or be ready to flash a stock image in ODIN and start all over)

--
--Extract aol_external_sm-t810.7z to /sdcard
--Reboot to TWRP (backup if you wish)
--Install>>Image file
--Select aol_external_sm-t810.img and flash
--Reboot and profit.
After AoL boots you will need to log in to ssh localhost, port 22 (Arch install user:alarm pass:alarm) and run the following as root(pass:root):
--"su"
--"gpasswd -a alarm inet"

To go back just need to reflash your old kernel...

If you would like a X11 Desktop (LXDE, XFCE4...) see this thread.... Either use the user alarm or create a new one...


I will be crediting all sources here:
@ionioni - Master Linux/Android chef
@BigBot96 - Rooting tutorial
@ashyx - GTS2 Root, permissive kernel and Recovery Threads, also the permissive custom kernel
Blog @ http://whiteboard.ping.se/Android/Debian - Great hints
@osm0sis - For his AIK
 
Last edited:

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
Dev Updates

01/17/2016
- Data corruption
At this point the internal installer does its job resizing and creating the needed new partitions. The issue now is the same one I encountered on my first install. The data partition (even if wiped) ends up corrupted. TWRP can't even mount it or fix it. The only solution to fix the error and finish the install process has been to flash the stock recovery. This extra step is not what I want to release to the "public". Until I find a solution I will not be releasing this.
Anyone that "has" to have this installed and doesn't mind the extra 5 minutes of work can PM me and I'll fill you in on the details....
I will release the MicroSD install as it doesn't require any internal partitioning. I will only support Arch at the moment because that is my distro of choice....

12/22/2015
- SUCCESS!!!! AGAIN!!!
After much testing and then a total fail (partitions got corrupted), I now have a working internal AoL install on my tablet. I resized /data (mmcblk0p22) and added 2 new partitions (mmcblk0p23 + 24).
After I work out the kinks in the installer I'll post it. The internal installer will also need a fresh rootfs but I will help with that via a menu driven script similar to my AKBI-TF700 project. It will be better to do the two separately, especially if someone just needs to split their /data partition ( @moonbutt74).

12/16/2015
- SUCCESS!!!!
Apparently AIK was the ticket!!! I also had a bad rootfs (someone somewhere had said to use GPT for the sdcard... GRRR). Arch linux is now in charge and "letting" Android run on my tablet! I have to get the internet working from Linux (systemd issue...) but Android works flawlessly as before. Stay tuned!
EDIT:
- Ok, so I have a working rootfs and a working kernel (thanks to @ashyx (permissive kernel), @moonbutt74 for pointing me to AIK and @osm0sis for making AIK!!!!). I'll be packing up the rootfs as is (simple root and 1 regular user) and anyone who would like to try it shoot me a PM.
I'll run some testing but I'm confident this is a good build. I'll post a rootfs and kernel once at least 2 people PM me and try it... Also eventually my rootfs builder and kernel init's...
My new priority is repartitioning mmcblk0 to add 2 new partitions for Linux to be installed.
EDIT2:
- Posted the install instructions but no files until someone steps up to do a confirming test... Also I decided not to supply any rootfs as it is better (and easy) to build your own fresh.

12/11/2015
- Here is where I am at on the project. I am now setup to compile, pack and unpack successfully the kernel for the SM-T810. Unfortunately (I hate to keep saying that...), any time I modify or replace the ramdisk, it fails to boot. This is what I had thought would be the "easy" way using an externalsd install. All permissions and binaries check out. Grrr.
So, on the advice of my "Master Chef", I'm going to focus on an internal install. This requires taking some space from the /data partition to make 2 new internal partitions. This worked flawlessly on the YT2 and we think that will solve the init issue.
I am going to keep this on hold until @CTXz finishes his port of CM 12.1 to the SM-T710 and he ports CM 12.1 and more importantly CWM-recovery the SM-T810. I need adb access from recovery to do some "safe" initial formatting and the current TWRP does not support adb. Also CM will be a more generic install and will, I think, be more linux friendly...
So to the 350+ observers so far of this project... Stay tuned!

12/8/2015
-I've tried many ways but can't get a kernel to even try to boot. I even tried unpacking ashyx's permissive kernel and repacking it and it won't boot either. I don't have any experience building (or apparently modifying) kernels and no one has stepped up or shown interest. So regretfully this project is on hold. If someone wants to take over feel free to PM me I'll give you everything you need to get an sdcard install running, you just need the "secret" to packing this kernel.

12/7/2015
- So got all my Linux rootfs ducks in a row (binaries and scripts in place). Still can't get the kernel to boot past the first splash... I'm not a kernel man but I guess I'll need to hit the books and see what I can do...
 
Last edited:

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
I went ahead and got an sd install setup. I can't get the kernel to flash in ODIN though. I'm trying to look for information about the kernel build, are they still signed even though the bootloader is unlocked... Probably. I'll have to ask around and find how to sign it...
 

ashyx

Recognized Contributor
Oct 14, 2012
15,110
9,823
0
I went ahead and got an sd install setup. I can't get the kernel to flash in ODIN though. I'm trying to look for information about the kernel build, are they still signed even though the bootloader is unlocked... Probably. I'll have to ask around and find how to sign it...
Unsigned images can be flashed with odin if the bootloader is unlocked.
It's more likely to be something with the way it's been packaged.
How did you repack the boot.img, what is the error in Odin?
Wouldn't it be easier to flash the boot.img with recovery?
 
  • Like
Reactions: workdowg

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
Unsigned images can be flashed with odin if the bootloader is unlocked.
It's more likely to be something with the way it's been packaged.
How did you repack the boot.img, what is the error in Odin?
Wouldn't it be easier to flash the boot.img with recovery?
Yes I realize that. There was some there was something wrong with the way I repacked it. It flashed this time but didn't boot. And I do plan on flashing recovery I am just testing and playing around right now. Thank you!

From my LG-G4, Rooted running Stock 5.1
 
  • Like
Reactions: ashyx

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
Dev Update

12/7/2015 - So got all my Linux rootfs ducks in a row (binaries and scripts in place). Still can't get the kernel to boot past the first splash... I'm not a kernel man but I guess I'll need to hit the books and see what I can do...

All updates HERE
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
12/7/2015 - So got all my Linux rootfs ducks in a row (binaries and scripts in place). Still can't get the kernel to boot past the first splash... I'm not a kernel man but I guess I'll need to hit the books and see what I can do...

All updates HERE
@ashyx - Didn't want to bother you with a PM... I tried unpacking and immediately repacking your kernel to test my mod and it doesn't boot either. How is the kernel packed for this device? Thanks.
Edit: I'm thinking it may be the ram base address? Umkbootimg doesn't spit out that on this kernel...

Sent from my SM-T810 using Tapatalk
 
Last edited:

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
I've tried many ways but can't get a kernel to even try to boot. I even tried unpacking ashyx's permissive kernel and repacking it and it won't boot either. I don't have any experience building (or apparently modifying) kernels and no one has stepped up or shown interest. So regretfully this project is on hold. If someone wants to take over feel free to PM me I'll give you everything you need to get an sdcard install running, you just need the "secret" to packing this kernel.
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
Update - 12/11/2015

12/11/2015 - Here is where I am at on the project. I am now setup to compile, pack and unpack successfully the kernel for the SM-T810. Unfortunately (I hate to keep saying that...), any time I modify or replace the ramdisk, it fails to boot. This is what I had thought would be the "easy" way using an externalsd install. All permissions and binaries check out. Grrr.
So, on the advice of my "Master Chef", I'm going to focus on an internal install. This requires taking some space from the /data partition to make 2 new internal partitions. This worked flawlessly on the YT2 and we think that will solve the init issue.
I am going to keep this on hold until @CTXz finishes his port of CM 12.1 to the SM-T710 and he ports CM 12.1 and more importantly CWM-recovery the SM-T810. I need adb access from recovery to do some "safe" initial formatting and the current TWRP does not support adb. Also CM will be a more generic install and will, I think, be more linux friendly...
So to the 350+ observers so far of this project... Stay tuned!
 

CTXz

Inactive Recognized Developer
Apr 11, 2015
1,002
2,217
0
Prague
12/11/2015 - Here is where I am at on the project. I am now setup to compile, pack and unpack successfully the kernel for the SM-T810. Unfortunately (I hate to keep saying that...), any time I modify or replace the ramdisk, it fails to boot. This is what I had thought would be the "easy" way using an externalsd install. All permissions and binaries check out. Grrr.
So, on the advice of my "Master Chef", I'm going to focus on an internal install. This requires taking some space from the /data partition to make 2 new internal partitions. This worked flawlessly on the YT2 and we think that will solve the init issue.
I am going to keep this on hold until @CTXz finishes his port of CM 12.1 to the SM-T710 and he ports CM 12.1 and more importantly CWM-recovery the SM-T810. I need adb access from recovery to do some "safe" initial formatting and the current TWRP does not support adb. Also CM will be a more generic install and will, I think, be more linux friendly...
So to the 350+ observers so far of this project... Stay tuned!
How do you repack the boot.img. Usually the kitchen is fault. Try carliv image kitchen. Works almost always.
 
  • Like
Reactions: workdowg

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
How do you repack the boot.img. Usually the kitchen is fault. Try carliv image kitchen. Works almost always.
I'll definitely try it...
But I'm almost positive because I'm able to pack and then repack any working kernel it is my changes that aren't being liked... The ramdisk init is actually a shell script and it makes calls for /dev/mmcblk1p2 which may be called something else at boot before Android starts (Android names it /dev/block/mmcblk1p2).
 

CTXz

Inactive Recognized Developer
Apr 11, 2015
1,002
2,217
0
Prague
I'll definitely try it...
But I'm almost positive because I'm able to pack and then repack any working kernel it is my changes that aren't being liked... The ramdisk init is actually a shell script and it makes calls for /dev/mmcblk1p2 which may be called something else at boot before Android starts (Android names it /dev/block/mmcblk1p2).
Maybe multirom would be usefull for such cases. If I remember right you can decide what partition to boot from multirom itself. Anyways, i am building CM recovery now to see if I have root access.
 
  • Like
Reactions: workdowg

CTXz

Inactive Recognized Developer
Apr 11, 2015
1,002
2,217
0
Prague
Hmm CM recovery still saying
33005960dd4672df offline

Guess i'll have to build another recovery then.

I was hoping that selinux was the fault. I will still check the kmsg if it is kernel related.

By the way, realized this right now. I remember getting adb in LPM mode. So while the rom didn't work, instead of reflashing all, I just booted into LPM and from there I had adb. You need to set your default.prop for that.

---------- Post added 12-12-2015 at 12:10 AM ---------- Previous post was 11-12-2015 at 11:52 PM ----------

Ok little update here. I got adb working on the stock recovery. There still no root access tough. I'll replace it with a rooted kernel.
 
Last edited:
  • Like
Reactions: workdowg

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
Hmm CM recovery still saying
33005960dd4672df offline

Guess i'll have to build another recovery then.

I was hoping that selinux was the fault. I will still check the kmsg if it is kernel related.

By the way, realized this right now. I remember getting adb in LPM mode. So while the rom didn't work, instead of reflashing all, I just booted into LPM and from there I had adb. You need to set your default.prop for that.
The only info I could fine on LPM mode is for mobile sim cards.... What exactly is this you are refering to...
Ok little update here. I got adb working on the stock recovery. There still no root access tough. I'll replace it with a rooted kernel.
Sounds like progress... Not for me... well a little bit. I'm not having any issues modifying the default.prop or any .rc script in the ramdisk and repacking so the kitchen is fine. Although they all boot, none of my changes did anything though.
 

CTXz

Inactive Recognized Developer
Apr 11, 2015
1,002
2,217
0
Prague
The only info I could fine on LPM mode is for mobile sim cards.... What exactly is this you are refering to...Sounds like progress... Not for me... well a little bit. I'm not having any issues modifying the default.prop or any .rc script in the ramdisk and repacking so the kitchen is fine. Although they all boot, none of my changes did anything though.
With LPM I mean charging mode, with the big battery. Usually it would gain me full adb access but it would take about a min until adb started.
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
0
Seneca Falls
Hmm CM recovery still saying
33005960dd4672df offline

Guess i'll have to build another recovery then.

I was hoping that selinux was the fault. I will still check the kmsg if it is kernel related.
Well I edited the ramdisk on ashax twrp (based on the nexus 9) and before it couldn't find adb devices at all. Now I get the same error you are:
Code:
3300123a6b6982cd	offline
Maybe something in the kernel build stopping it from working???
 

CTXz

Inactive Recognized Developer
Apr 11, 2015
1,002
2,217
0
Prague
Well I edited the ramdisk on ashax twrp (based on the nexus 9) and before it couldn't find adb devices at all. Now I get the same error you are:
Code:
3300123a6b6982cd	offline
Maybe something in the kernel build stopping it from working???
I thought the same. Strangely enough stock recovery seems to wnter adb fine if the flags are set unsecure in the default prop.
 
Status
Not open for further replies.