Stripping a factory ROM to only run 1 specific app? - Android General

Hi,
I want to use an old Galaxy S3 as a kind of linux server. I saw that gnuroot debian installs a chroot environment. Now I need to advise on three basic things
- Howto strip a factory ROM on the PC
- Howto include the app in the new custom rom
- Howto autostart the linux chroot whenever the android device is rebooted?
Or is there even a way to skip android and boot into a linux rootfs directly?? -> Since I'm looking for no fancy stuff (dont need display, touch, camera, phone, sound) and this will be a headless machine this should be doable??

Related

[tut]complete guide on installing linux on android [dual boot]

So , Hello everyone,
It will not remove or harm Android, it will just run Linux on top of android
This tutorial will guide you through installing Linux on mmx a116 with android side by side..
What is this all about?/Why put this on my device?
This projects aim is to bring a range of linux distros to your android device through a method known as 'chroot', see it has running a linux distro within a virtual machine on your phone (Although its not! its using native ARM ports and the Android kernel) . You can access this virtual machine and run it on your phone without causing any damage to your device, or having to overwrite anything. Why might you want this? well my apps are designed to make the install and set up process as easy as possible while still giving you some flexibility. Once you have the distro up and running then you can pretty much run and install any linux software you like (so long as there is a arm port or it is not architecturally dependent).
Wait this uses VNC why shouldn't I just VNC to a computer?
VNC is used to access the GUI as at the moment I have not yet implemented a native way of viewing the GUI. But the Linux distro itself is running within the phone and can be controlled via the terminal app so if your a seasoned Linux user you may never even want to use the GUI
What is Chroot?/How does this work?
"A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children" - http://en.wikipedia.org/wiki/Chroot
This method of running linux distros with android has been around for some time. I have worked on my scripts to make the process more user friendly and give you far more options from the word go.
The scripts start by mounting the linux image file within the android file system and then mounts the sdcard and if you have it internal memory within the linux file system.
Chroot is then used to change the root directory to that of the mounted linux and a bash shell is then opened to allow you to control linux this is kind of like 'booting' the OS.
The likes of VNC and SSH are then set up when linux is 'booted' to allow you to connect to the GUI if you require it.
Note: This requires a lot of free space on sd cards(any)..atleast 2 GB ..
INSTRUCTIONS:
1-Go to play store and download 'Complete Linux Installer' and install it ..
2-if you have a custom or other kernel , you have to check wether it supports loop or not.So better be on Stock Kernel.
3- Now there are 2 ways to install and run distros(eg-linux,backtrack).One is easier but requires an internet connection on the phone.other is a bit difficult but can be done from PC also .
method 1 ( internet on smartphone )
Go to complete Linux Installer and select install guides and select the distro you want it will download and guide you further.(in the unzipping step , i recommend using a PC for it as its too slow on the phone.)
Method 2 ( using a PC )
Download the version and size of your preferable ubuntu from here -
http://sourceforge.net/projects/linuxonandroid/files/Ubuntu/
After that, download androidVNC and terminal emulator from play store
now extract ubuntu.zip and place it in a folder called ubuntu on root of your SD card.Now you are ready to boot too ubuntu. select the launch menu from complete linux installer.
you will be redirected to terminal emulator . press n if you are asked to check boot.img from md5 as it gets stuck there. set screen size to 1280x720 after few seconds you will see a message [email protected] . this means you are succesful.
go to android vnc type in port option 5900 and password and username as ubuntu an color settings as 24 bit..
congratulations! you have booted to Ubuntu!:highfive:
Hmmmm.
That's not dual boot.:sly:
It runs Linux in VM.
Thanks!
-Dracula
And i don't see why anyone would want to do this, it's just killing your phone by overloading it with a Desktop OS in a VM!
Also perhaps providing credit to the person that did all the hard work might be a good idea .......
Oh and its not a VM guys, it uses chroot which means native ARM linux running with the Android kernel, within Android.

Ubuntu/Debian on X86 Tablet

Hello,
I would like to know where I can get some info about installing Ubuntu / Debian 7 on my X86 tablet device.
Tablet uses an Intel Atom Z2560CPU.
If possible I would like any of the following possibilities:
Possibility one:
Run Android along with Debian (something like chroot)
Possibility two:
Erase Android from the device (currently installed) and make a fresh Debian install.
Possibility three:
Dual Boot with Debian and Android.
The hard part is that the tablet device doesn't have any kind of BIOS (at least one accessible to the user)!
I already tried multiple apps (to run Linux distro's) from the Play Store, but nothing seems to work.
Presently I have the machine with Android 4.0.4 rooted.
What do I need? Where can I find some documentation?
Thank you
It can also be some other Linux distro.
Thank you

Dualboot Android/Linux for Yoga Tab 2 830F

ALARM: the device could be bricked if something will go wrong.
Actually should work for 10' and 13' as well
Introduction
The Yoga Tab 2 devices are built on the Intel Baytrail SOC, which makes them not very different from cheap Intel Atom laptops and idea to make them run something more serious than Android is too tempting to resist. Even more interesting, the Windows version of the devices do exist, so running of the full desktop OS is definitely possible.
Beginning
The easiest method to boot Linux on the Yoga is to unlock bootloader and replace standard EFI loader with GRUB. To do it, use the set of files, available here.. Unzip the file, put the tablet into fastboot mode, connect to PC and use script hack.cmd to flash the ESP with GRUB. Now, the system will be booting the GRUB, which will normally boot Android (if no buttons is pressed). The volume buttons are configured as hotkeys in grub.cfg, so it is possible to load arbitrary system, supported by GRUB.
To modify the grub.cfg from Android, mount the ESP partition:
Code:
su
mkdir /esp
busybox mount /dev/block/by-name/ESP /esp
vi /esp/boot/grub.cfg
Kernel
The device is able to boot mainline Linux kernel in the described way, but due to erroneous ACPI tables majority of hardware won't work. I did my best to repair the tables to make system usable. Still, not everything is working, mainly screen brightness control and sound. The kernel development info is available at https://github.com/Trel725/yoga2linux
System
I've chosen Manjaro Linux as a distro to work with because of my own taste. It shouldn't be a problem to run any other distro with modified kernel, but I provide rootfs only for Manjaro.
How to get it working
1. Flash the modified ESP as desribed above.
2. Download the archive, create folder /factory/manjaro (folder /factory should be already present in the tablet) and unzip archive to that folder. It is necessary because GRUB can't access the external SD, so kernel need to be loaded from internal memory and then find SD card. /factory is just a partition, used for storing tablet configuration, and as it is usually empty for 90-99 % it is convenient to use it to store the kernel and initramfs.
3. Find a good SD card, format it to the ext3 or ext4 FS and unzip RootFS to the SD card. Insert card to the tablet.
4. Reboot and press Volume+ to boot Linux.
Some ideas
1. After tablet has booted Linux and USB is initialized, it keep it's state on reboot. This means that following trick is possible:
boot linux -> reboot -> get to GRUB (by pressing Volume-) -> USB keyboard should work as it was initialized -> go to the GRUB command line (press c) -> type exit, press enter -> should get to BIOS with working keyboard -> if USB flash disk was inserted before entering the BIOS (usb hub is needed as device has only one port) it is possible to boot from it.
2. TODO
Hello, do you have any Linux tutorials installed here?
Wordowg's post failed
Thanks for this, @Trel725.
No problem with 5.2 kernel? isn't it too new for such an old device?
Also -- maybe some stuff from here is relevant? e.g., WM5102.
NaEpoch said:
Hello, do you have any Linux tutorials installed here?
Wordowg's post failed
Click to expand...
Click to collapse
Which tutorials do you mean? Linux usage in general?
raenye said:
Thanks for this, @Trel725.
No problem with 5.2 kernel? isn't it too new for such an old device?
Click to expand...
Click to collapse
Linux is very good in backward compatibility, even support for 80386 (released in 1985) was discontinued only in kernel 3.8. Moreover, I am particularly interested in mainline kernel without need to support ancient code (like for majority of android devices).
raenye said:
Also -- maybe some stuff from here is relevant? e.g., WM5102.
Click to expand...
Click to collapse
Thank you for the suggestion. I didn't try the patch for WM5102 from github, hopefully it will work for mainline kernel. I will try to find some time for it in the future.
sorry,my bad
i mean install linux for yoga tablet2 ' tutorials.
The tutorials in the forums all failed.
If you are free, can you teach me how to install it?
Thanks very much.
Unfortunately I don't have time for complete guidance, but if you have any questions I will readily answer them. The more details you provide the easier to help you.
alright, Thank you all the same.
But if you have time, please help.
My E-mail is [email protected]
Just a simple tutorial.
thank you
I can get Manjaro to boot but it can't load LightDM. I'm on 1050L.
I cant get this to work... All i get is a shell command line. no dual boot. Doesnt default into Android if nothing is imputed.
I tried connecting a keyboard. And cant type anything in.
I feel some steps have been skipped.
Tried this and now can't do anything but sit in empty shell. Can't type, volume buttons do nothing

Linx 1020 Tablet install Linux

I have an issue installing any OS other than windows on a Linx 1020 Tablet. It is locked with secure boot which is I am unable to disable and insall anything. I want to install Linux on to it. Can someone help me out. Thanks
Look inside here:
8 Lightweight Linux Distros Ideal for Intel Atom Processor PCs
Don't let your Atom-powered laptop gather dust. Install a lightweight Linux distro and enjoy mobile computing once again!
www.makeuseof.com
How to install Linux on the tablet is explained here:
HOWTO: Install Linux on a Linx 1010B Tablet
What’s Working? Equipment Required Considering Dual-Boot Ensuring you can go Back to Windows Later Preparing for the Install Installing Fedora Reverting your USB Stick to Normal Post-Install Notes Other Setups Other Desktop Environments Ubuntu Ubuntu 20.04.3 Later Versions: Ubuntu 20.04.4—22.10...
ianrenton.com
I have, but i still cannot disable secure boot.
With the tablet connected to the keyboard change the settings you require in the secure boot screen then press F10 on the keyboard. This allows the new settings to be saved. I have already tried MXLinux and Lubuntu with no joy so far. mainly autorotation not working or wifi. Good luck.

Extract (dump) all partition images from Huawei e8372h under GNU/Linux

Hi there everyone, how would one go about checking what partitions are present on devices such as Huawei e3372h or e8372h and how to dump them using gnu/linux. I am OK with terminal/shell scripting, I've done some basic Arduino/Raspberry projects, but I want to get more into firmware (binwalk, repackaging, etc). Where would one start? What tools shall I look to familiarize myself with? I very much want to avoid using blobs like pre-compiled windows tools that are difficult to inspect. Is it possible to dump firmware (incl. boot partitions) using standard gnu/linux toolset (like dd) or at least tools that have source code available?
I have been looking for resources both here and on Russian/German fora, unfortunately most of posted solutions are based on Windows *.exe files and knowing a bit about Linux I am 100% sure that whatever these programs are doing is also possible to be done on Linux in a cleaner more transparent and reproducible manner (that is better for educating oneself).
Any hints much appreciated
If device's Android is rooted, if Android is version 6 and higher, then you can dd the partitions in question.
Thank you for your response! Is there an Android running on USB modems/routers such as Huawei e8372h? I am looking to dump all partitions from such device and to be able to restore them before I start any modifications. This way I should be able to restore devices to their original "factory" state if anything goes sideways (except if I hard-brick them).
I have a number of e3372h(-153) and e8372h(-153) devices that I can experiment with (they have different versions of firmware on them and the very-very first thing I want to do is to extract all images (including boot partition if possible) and test if I can restore from these backups). Only then I want to start modding them or checking other people's modifications...
So far I have managed to switch modes of these devices. For example for e8372 I can have it on the host machine (Ubuntu GNU/Linux laptop) visible as
virtual CD-ROM (/dev/sr0)
hi-link device (accessible from 192.168.8.1)
3 x TTY device (one of which can execute AT commands)
emergency boot mode with one TTY device
With the last one i have executed
balong-usbdload -p /dev/ttyUSB0 usblsafe-8372.bin (following https://gist.github.com/ValdikSS/323bcdfceb2f09d9c6ef02db1bc573e2 and https://github.com/forth32/balong-usbdload.git)
expecting to gain telnet acces to device and possibly dump the remaining partitions to the microDS card (using nanddump) but for some reason I still cannot log in using telnet
BTW Using Windows based tools that I have no source code for is pointless for me as my main goal is to learn the structure and functioning of these devices and be able to modify them myself.
If successful I intend to publish these images and tutorialize my notes on how to backup/restore, but for now I need a direction myself
IMO all tools, either compiled for Windows OS or Mac OS or Linux OS, in background simply run Android shell scripts.

Categories

Resources