[Q] mksdcard hang in Win7 x64 - Android Software Development

I'm using Eclipse to do Android development. Having an issue creating AVDs under Windows 7 x64. I did not experience this under Vista x64. I can create AVDs without problem if I do not specify an SD card size.
I've traced this to the mksdcard.exe program which takes forever to generate the card image. Anyone else experience this and have a solution?

To Anyone Seeking Resolution.....
I came across this "unanswered" post before finding my answer, so I figured I'd come back and answer it. Most problems will be user error, as mine was.
A proper command should look something like this...
Code:
mksdcard -l SD750M 750M D:\android-sdk-windows\sd750m.img
Code:
mksdcard: create a blank FAT32 image to be used with the Android emulator
usage: mksdcard [-l label] <size> <file>
if <size> is a simple integer, it specifies a size in bytes
if <size> is an integer followed by 'K', it specifies a size in KiB
if <size> is an integer followed by 'M', it specifies a size in MiB
If your using Vista or Windows 7, be sure you've started CMD with Administrative privliges. To do this click the "Start Button" - "Accessories" - and right click "Command Prompt", and choose "Run as administrator".
In my experience, you must also be working from the same drive that you plan on creating the img too. So if your working from "D:\android-sdk-windows\tools" the following command would NOT work.
Code:
mksdcard -l SD750M 750M E:\android-sdk-windows\sd750m.img
Be sure that your running mksdcard from your "Android tools directory". If your tools are located at "D:\android-sdk-windows\tools" you would input the following commands to navigate to that directory.
Code:
cd\
d:
cd android-sdk-windows\tools
Hit the thanks button if it was helpful.

Related

[GUIDE] Beginner guide how to install new kernel from linux OS !!!

Let`s start from beginning...
First download attached file New kernell install.7z and unpack it on your desktop.
Then go to ADB install procedure...
Open Terminal and you will see something like this...
HINT:
The best way to install is to run on Root Terminal. This is placed on Applications -> System Tools.
On Ubuntu it is invisible by default and you must to enable it on System -> Preferences -> Main menu and make it visible.
That`t it... lets go to work...
Open terminal and you will see this...
[email protected]_name:~$
Then type this in your Terminal window. Only BOLD text must be typed... Don`t forget to press ENTER after type the command in Terminal.
And don`t forget to type your root password after sudo command.
[email protected]_name:~$ cd Desktop
[email protected]_name:~/Desktop$ cd ADB_install
[email protected]_name:~/Desktop/ADB_install$ sudo cp adb /usr/bin
[email protected]_name:~/Desktop/ADB_install$ sudo chmod +x /usr/bin/adb
Don`t forget that USB Debugging MUST be enabled on your phone !!!
Connect your phone via USB cable and type this...
[email protected]_name:~$ adb devices
After that you can see that is your device properly connected to your computer and will see this...
List of devices attached
0123456789ABCDEF device
Close Terminal window.
Now, the ADB is finished to install on your linux OS and your phone is visible on computer.
Now we can go to update kernel...
Download kernel as you wish. I`m usin a MDJ kernel but if you can, you may use any other kernel.
Create new folder on your desktop and place all files from archive into this folder.
Rename folder to some simple name. In my case this folder is named newkernel
In MDJ kernel files is this...
zImage
bcm4329.ko
tun.ko
cifs.ko
fuse.ko
msm_rmnet.ko
nls_utf8.ko
Copy attached install_kernel.sh script and place it into the newkernel folder.
After that, all kernel files, modules and install_kernel.sh script must be in root of newkernel folder.
Open Terminal window and see something like this...
[email protected]_name:~$
Type...
[email protected]_name:~$ cd Desktop
[email protected]_name:~/Desktop$ cd newkernel
[email protected]_name:~/Desktop/newkernel$ sh install_kernel.sh
After finish and after see All Done!!! massage, you must to reboot yor phone and your new kernel is up.
Or just type in existing Terminal window...
[email protected]_name:~$ adb reboot
Enyoy !!!
FileFixer.
Hello I have a question. Is it possible to do this from teminal inside Android and after installing the new kernel to reboot? Thanks.
Sticky please
very usefull should be a sticky!
ogoglass said:
Hello I have a question. Is it possible to do this from teminal inside Android and after installing the new kernel to reboot? Thanks.
Click to expand...
Click to collapse
You need to mount and remoun your boot.img from NAND to SD card. Yaffs2 must be installed on android but i have not found anywher yaffs2 for ARM processor.
Maybe some other want to help with this. Rework the sh cript is not a major problem.
ADB was installed correctly... but the installation kernel not work for me:
~$ cd Desktop
~/Desktop$ cd newkernel
~/Desktop/newkernel$ sh install_kernel.sh
install_kernel.sh: 1: @echo: not found
Creating directory and mounting /boot...
mkdir failed for /data/boot, File exists
Pushing zImage...
1427 KB/s (2401156 bytes in 1.642s)
Remounting system and pushing modules...
remount succeeded
310 KB/s (272851 bytes in 0.857s)
1459 KB/s (185916 bytes in 0.124s)
failed to copy 'cifs.ko' to '/system/lib/modules/cifs.ko': No space left on device
1579 KB/s (635894 bytes in 0.393s)
1294 KB/s (120735 bytes in 0.091s)
619 KB/s (28764 bytes in 0.045s)
Cleaning up...
rmdir failed for /data/boot, Directory not empty
All done!
~/Desktop/newkernel$
FileFixer said:
You need to mount and remoun your boot.img from NAND to SD card. Yaffs2 must be installed on android but i have not found anywher yaffs2 for ARM processor.
Maybe some other want to help with this. Rework the sh cript is not a major problem.
Click to expand...
Click to collapse
mkyaffs2image command comes on most builds of android that are rooted
really cannot understand, please, advise for noob:
is this manual for Linux OS PC or Windows PC?
which exact Terminal you mean?
Excellent Job! Sticky for noobs!
dimdimdim said:
really cannot understand, please, advise for noob:
is this manual for Linux OS PC or Windows PC?
Click to expand...
Click to collapse
primarily for Linux,
I have run it under OSX
but ADB can run under everything.
internauta2000 said:
ADB was installed correctly... but the installation kernel not work for me:
~$ cd Desktop
~/Desktop$ cd newkernel
~/Desktop/newkernel$ sh install_kernel.sh
install_kernel.sh: 1: @echo: not found
Creating directory and mounting /boot...
mkdir failed for /data/boot, File exists
Pushing zImage...
1427 KB/s (2401156 bytes in 1.642s)
Remounting system and pushing modules...
remount succeeded
310 KB/s (272851 bytes in 0.857s)
1459 KB/s (185916 bytes in 0.124s)
failed to copy 'cifs.ko' to '/system/lib/modules/cifs.ko': No space left on device
1579 KB/s (635894 bytes in 0.393s)
1294 KB/s (120735 bytes in 0.091s)
619 KB/s (28764 bytes in 0.045s)
Cleaning up...
rmdir failed for /data/boot, Directory not empty
All done!
~/Desktop/newkernel$
Click to expand...
Click to collapse
This is correct on my PC...
~/Desktop/newkernel$ sh install_kernel.sh
install_kernel.sh: 1: @echo: not found
Creating directory and mounting /boot...
Pushing zImage...
1994 KB/s (2401156 bytes in 1.175s)
Remounting system and pushing modules...
remount succeeded
1809 KB/s (272851 bytes in 0.147s)
1775 KB/s (185916 bytes in 0.102s)
1951 KB/s (3056268 bytes in 1.529s)
1964 KB/s (635894 bytes in 0.316s)
1643 KB/s (120735 bytes in 0.071s)
663 KB/s (28764 bytes in 0.042s)
Cleaning up...
All done!
Do you have a rooted phone or you not have more free space on your phone?
Look at this line when start sh script...
mkdir failed for /data/boot, File exists
and this...
failed to copy 'cifs.ko' to '/system/lib/modules/cifs.ko': No space left on device
g30rg10u said:
primarily for Linux,
I have run it under OSX
but ADB can run under everything.
Click to expand...
Click to collapse
which are requirements for adb and how to run if I already have on my windows7 android sdk?
g30rg10u said:
primarily for Linux,
I have run it under OSX
but ADB can run under everything.
Click to expand...
Click to collapse
actually, adb.exe's window I'm trying to run under platform-tools disappears after a second.
what's my problem? (besides "invalid user", of course)
Ok...
The build is Gauner HD-FI 0.3 and understand that is routed by default ... Correct me if not...
With respect to free space on the phone, is a TMUS with 1024 Mb in ROM... shown that limited ... I do not know because it shows to have 431 Mb free...
This is what marks my last attempt:
...
install.sh: 1: @echo: not found
Creating directory and mounting /boot...
mkdir failed for /data/boot, File exists
Pushing zImage...
1653 KB/s (1708764 bytes in 1.009s)
Remounting system and pushing modules...
remount succeeded
1508 KB/s (272303 bytes in 0.176s)
1404 KB/s (184956 bytes in 0.128s)
failed to copy 'cifs.ko' to '/system/lib/modules/cifs.ko': No space left on device
1577 KB/s (633598 bytes in 0.392s)
1312 KB/s (117451 bytes in 0.087s)
654 KB/s (27800 bytes in 0.041s)
Cleaning up...
rmdir failed for /data/boot, Directory not empty
All done!
What confuses me even more you can look into the following screenshorts
It has installed the new kernel?
phoenixtraveller said:
FOR ALL THOSE WANTING UBUNTU/LINUX:
You just use DAF.EXE and DFT-Android (Desire original release with Magldr) partition layout.
Unyaffs BOOT.IMG and copy initrd.gz
Copy over ALL ubuntu \linux\ files to sdcard root (not \linux).
rename main adb_htc_leo_zimage to just zImage.
do not rename initrd.cpio.gz as ppl are doing: use initrd.gz from DFT' Android BOOT.IMG (unyaffs).
Now you can copy over all rootfs.ext2 to the appropriate partitions in NAND and Run.
Any suggestions on how to improve this?
Proper layout settings for flash.cfg?
I get to keyboard etc then cant use it (no usb connected - no touch).
But point is: IT WORKS AS LONG:
1) INITRD.GZ is Magldr compatible and matches flash.cfg/AD-NAND-partion (why I did this proof-of-concept with DFT's initrd)
2) rootfs.ext2 must now be mounted.
3) usb keyboard etc? internet? POWER?
self notes: for future ref: install magldr, do dft-droid-daf.exe, copy linux: ren htc_adb_zimage to just zImage. then. USE THE INITRD.GZ from inside DFT's BOOT.IMG. !!!
make magldr/ubuntu work: ad hardreset, install dft-android by daf.exe, copy all \linux\ files to root. rename files like so: (above)
Magldr and Ubuntu working: ok... You need to make sure your initrd.gz initial ramdisk is in sync with the nand partitioning by daf.exe so...
---
Update:
Hmmm.. Looks like--> It is mounting rootfs.ext2 --> by itself in - NAND? SDCARD? Will update but seems to have booted properly !!! Takes a LONG time and black screen etc for ages before "desktop" - mentions "adb" and other things in verbose output during "boot". Someone please let me know thoughts as I am nt kernel developer (drivers etc) and new to Linux. Thankyou. This is my first day on XDA. My first intro to all of this so sorry if over-posting or in wrong spot.
---
Update2:
Linux penguin screen verbose:
ANDROID unable to open persistent property directory
init: cannot find /system/...
(a lot of them)
then: enabling adb, adb open, et etc etc, host does not support read-only switch assuming write-enable...
mmc1: new high speed sdhc card at address b504
then a lot of lines with numbers microp set bkl(9) and ACR= FL= RAAC=
power button works as in screensaver/lock... this all leads up to keyboard and desktop eventually !!!
any ideas ?
Click to expand...
Click to collapse
It takes forever: but it is till going and ALIVE.
Can anyone please help getting Ubuntu/Linux up over Magldr-NAND/SD ***properly***?
Happy (as explained above) to make donation $$$.
Can you post a simple step by step guide for us Windows users?
I really dont know how to make it work.
Thanks.
i am getting a strange error after i connect the phone.
[email protected]:~/Desktop$ cd
ADB_install/ Backup/ Rom Android/
[email protected]:~/Desktop$ cd
ADB_install/ Backup/ Rom Android/
[email protected]:~/Desktop$ cd ADB_install/
[email protected]:~/Desktop/ADB_install$ sudo cp adb /usr/bin
[sudo] password for ionut:
[email protected]:~/Desktop/ADB_install$ sudo chmod +x /usr/bin/adb
[email protected]:~/Desktop/ADB_install$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions
[email protected]:~/Desktop/ADB_install$ adb devices
List of devices attached
???????????? no permissions
i am using on the phone this nand build: [03 Jan][NAND][data.img with copy from phone]LEO "Stock Desire" MOD
thanx
solved.
service MUST be started as root. if you are getting this error try this:
[email protected]:~$ sudo su -
[sudo] password for ionut: <<type root password >>
[email protected]:~# adb kill-server
[email protected]:~# adb start-server
[email protected]:~# adb devices
List of devices attached
0123456789ABCDEF device
seems it's working
The best way to install is to run on Root Terminal. This is placed on Applications -> System Tools.
On Ubuntu it is invisible and you must to enable it on System -> Preferences -> Main menu and make it visible.

[How to] Linux (Backtrack5) and OpenOffice3

Backtrack5 and OpenOffice3.0
xMemphisx said:
Backtrack (http://www.backtrack-linux.org)
Backtrack-Linux.org, home of the highest rated and acclaimed Linux security distribution to date. BackTrack is a Linux-based penetration testing arsenal that aids security professionals in the ability to perform assessments in a purely native environment dedicated to hacking. Regardless if you’re making BackTrack you Install BackTrack, boot it from a Live DVD or thumbdrive, the penetration distribution has been customized down to every package, kernel configuration, script and patch solely for the purpose of the penetration tester.
Here is a guide to getting ARM Backtrack Running on the Iconia A500 (tested on Wifi Only Version, running 3.0.1)
After much frustration I have gotten the GUI part of the backtrack 5 arm release working with the Motorola Xoom.
This has only been tested to work on the Iconia A500 . But it should work just fine with any other device that supports linux, and should work especially well on anything with a dual-core processor (G2X, Atrix, etc.)
Pre-requisites:
- Rooted Iconia A500
- Busybox installed (Find on market Busybox installer)
- androidVNC from the Android Market
- Terminal Emulator from the Android Market (which you should already have)
- Backtrack 5 for ARM with Gnome downloaded and setup (check the README file, and follow the instructions.)
Link: Backtrack 5 http://www.backtrack-linux.org/downloads/. This tutorial will assume you put Backtrack 5 in the folder /sdcard/BT5 like the README says.
Code:
Extract the zip file to your internal SDCARD folder (/SDCARD/BT5)
Open Terminal emulator and type
su
cd /sdcard/BT5
gunzip bt5.img.gz (take about 7-10mins)
sh bootbt
Code:
cd /sdcard/BT5
su
sh bootbt
BackTrack will start up in shell. You will get a red line that says "[email protected]:". To verify if you type:
Code:
ls pentest
It should echo back the folders in pentest, stuff like 'backdoors','database',etc.
At this point enter the following commands:
Code:
export USER=root
vncpasswd
When you type in 'vncpasswd' this is to the the password for the tightvncserver. Since I only connect locally I just use 'qwerty' for my password, and then confirm the password. [Edit] Apparently you can skip this step, as the default password for vnc is simply, 'toortoor' (root backwards, twice).
When it asks if you want to create a view only password just type 'n' and hit enter. After you have your password setup for vnc start the server up.
Code:
[COLOR="Red"]startvnc 1280x800[/COLOR]
When this happens you will get a message confirming that "New 'X' Desktop is localhost:1" and a bunch of other random stuff below it (it isn't important unless there are errors listed).
At this point, press the "HOME" button and then open the application "androidVNC".
-In the "Nickname" box, you can name it whatever you like.
-In the "password" entry, use your password (mine is 'qwerty').
-In the "Address" box you can type in localhost (or leave it blank).
****Change the port from 5900 to 5901.
I also recommend setting the color-depth to 24-bit. After that press the "connect" button, and bam! You're rocking Backtrack 5 on your Iconia A500!!
Code:
In order to exit:
- Go back to Terminal
- Type [B]stopvnc[/B]
- Type [B]exit[/B]
you are back to android terminal environment and ur androidvncviewer will get disconnected.
Click to expand...
Click to collapse
p-ille said:
I tested openoffice 3 and it works like a charm. It is not present in the original backtrack repository, so I had to add another source. I used the Debian repository. From the backtrack terminal I typed:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Click to expand...
Click to collapse
For those who want to access SDCard/USBDrive from within BB5, please follow this:
p-ille said:
I did it!
To mount sdcard, external sd and usb storage in backtrack, you have to modify the bootbt script like this (changes in red):
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/BT5
export bin=/system/bin
export mnt=/data/local/mnt
[B][COLOR="Red"]export stor=$mnt/root/storage
export sdcard=$stor/sdcard
export extsd=$stor/external_sd
export usb=$stor/usb_storage[/COLOR][/B]
mkdir -p $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root[I]
[COLOR="Blue"]export USER=root[/COLOR][/I]
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
mount -o loop,rw,noatime -t ext2 $kit/bt5.img $mnt[B][COLOR="Red"]
echo "mounting storage devices in $stor..."
mkdir -p $sdcard
mkdir -p $extsd
mkdir -p $usb
busybox mount --bind /mnt/sdcard $sdcard
busybox mount --bind /mnt/external_sd $extsd
busybox mount --bind /mnt/usb_storage $usb[/COLOR][/B]
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 "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM for Iconia A500"
[B][COLOR="Red"]umount $sdcard
umount $extsd
umount $usb[/COLOR][/B]
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Click to expand...
Click to collapse
Very nice indeed, will try it out very soon.............
Awesome, just what I have been looking for. I will try this when I get home tonight!
Thanks
lpachuong said:
Here is a guide to getting ARM Backtrack Running on the Iconia A500 (tested on Wifi Only Version, running 3.1)
Click to expand...
Click to collapse
3.1? maybe you means 3.0.1?
After
export USER=root
Click to expand...
Click to collapse
You/can type
startvnc
Click to expand...
Click to collapse
without the need to -geometry 1280x800, and afterward after your session type
stopvnc
Click to expand...
Click to collapse
for a clean disconnect.
Just a faster easier way.
I got I/O errors while mounting devpts and sysfs (bootbt script)
peyotll said:
I got I/O errors while mounting devpts and sysfs (bootbt script)
Click to expand...
Click to collapse
I had the same errors when i had ubuntu installed/and was trying to do this along side.. what I had to do was factory reset (I did so to get rid of ubuntu, there's probably an easier way) then tried backtrack again with no problem
Agosh13 said:
3.1? maybe you means 3.0.1?
Click to expand...
Click to collapse
Hahahaha...I wish =)
Btw, please let me know if you have any special script/suggestion about this topic. I will update the original one so that everyone can get updated.
I'm trying to get OpenOffice running...sadly the ARM version is not that stable. Anyone has any resource on it?
Works perfectly! Thanks for this!
Thanks very much for this guide!
I'm having a strange issue though, hopefully someone can help. When I press the "m" key, rather than type the letter "m", it opens up the mail icon in the tool bar. Every other letter works fine, and I can't seem to find a way to edit this keyboard shortcut.
Anyone else have this issue, or now how to correct this?
thanks a lot - it will work for me without any error or something else
i use the latest update from acer (A500_1.141.01_EMEA_CUS7)
hmm, is there any trick to log off an turn off the system ? when i exit everthing an try to start again i will only see the backtrack wallpaper...
also i got an error in term-emu when i type in "exit".
I added the OP for how to exit.
Thanks for the guide, I have been waiting for something like this!
koprofile said:
Thanks very much for this guide!
I'm having a strange issue though, hopefully someone can help. When I press the "m" key, rather than type the letter "m", it opens up the mail icon in the tool bar. Every other letter works fine, and I can't seem to find a way to edit this keyboard shortcut.
Anyone else have this issue, or now how to correct this?
Click to expand...
Click to collapse
doble-tap (right click) the mail icon in the tool bar and choose to remove it from panel. It should remove the keyboard shortcut also.
lpachuong said:
Hahahaha...I wish =)
I'm trying to get OpenOffice running...sadly the ARM version is not that stable. Anyone has any resource on it?
Click to expand...
Click to collapse
I tested openoffice 3 and it works like a charm. It is not present in the original backtrack repository, so I had to add another source. I used the Debian repository. From the backtrack terminal I typed:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Thank you very much for this guide.
It works like a charm.
Just one question.
I suppose you use a bluetooth keyboard, because the virtual one doesn't seem to work with Backtrack. But is it possible to use a mouse ? Because my big fingers don't match the tiny icons and menu choices !!!
Thanks again.
p-ille said:
Code:
add-apt-repository deb *repository address* stable main contrib non-free
apt-get update
apt-get install openoffice.org
You can find the debian mirror for your country at
Code:
debian.org/mirror/list
Click to expand...
Click to collapse
Thank you for ur script. I haven't had time to play with it due to exams.Anyway, I added them to the original post so that everyone can find it easier.
Regarding to the keyboard...i tried with usb keyboard and it worked fine. I have a BT keyboard but haven't tried it yet. I don't think the mouse will work bcz it is restricted by the VNCViewer
Hi
Tanks for tour tutorial, but i'm having some issue running backtrack:
Code:
# sh bootbt
Loop device exists
ioctl LOOP_SET_FD failed: Bad file number
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bootbt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bootbt: cannot create /data/local/mnt/etc/hosts: directory nonexistent
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM For Xoom
failed.
failed.
failed.
failed.
#
I did check the md5sum of the archive,ok. Busybox ok.
Tanks for your help.
When it asks if you want to create a view only password just type 'n' and hit enter. After you have your password setup for vnc start the server up.
Code:
Code:
startvnc 1280x800
When this happens you will get a message confirming that "New 'X' Desktop is localhost:1" and a bunch of other random stuff below it (it isn't important unless there are errors listed).
Click to expand...
Click to collapse
is it possible to use a different resolution? I tried to use 1280x768 (WXGA read on Wikipedia) but it didn't work.
Hi, Alberto
edit:
Now it works fine! thank you!
Sorry for my first post.
I just realize that I had confused the downloaded archive (.7 z, wich contain all stuff) and the compressed image (. gz), so I did not unpack image before running bootbt.
Unfortunately, the extraction of master archive did not work due to the soft used to extract .7z.
As i mentionned before I've checked the whole archive md5sum but did not check the extracted files.
bt5.img.gz was only 12.59 MB, extracted with androzip. (don't use it, at least for .7z!!)
interesting....
is the wifi adapter working in monitor mode???

[HowTo] homebrew your custom Ubuntu image for Iconia A500

I'm posting this in a new thread as requested...
There is a simple way to preapare a custom Ubuntu image file compiled for ARMEL with only the packages and functionalities you need.
For this procedure you will need
- a linux machine with working ADB (I tried it on a x64 ubuntu machine)
- a rooted Iconia A500 with busybox installed
- a little knowledge about what you're doing, but just a little.
1. Install Rootstock
on your linux machine, open up the terminal and type
Code:
sudo apt-get install rootstock
If you use at least Ubuntu Karmic, it should automatically pull all the dependencies, otherwise you'll have to manually install Qemu and a newer debootstrap.
2. Create the tarball
you're ready to download the packages and prepare the tarball.
Remember: rootstock doesn't automatically include a kernel, so you'll have to manually include it in the package list
Here's the syntax for a basic run (run "man rootstock" for all the parameters):
Code:
sudo rootstock \
--fqdn [COLOR="Red"]<YOUR_CHOSEN_HOSTNAME>[/COLOR] \
--login [COLOR="Red"]<YOUR_CHOSEN_USERNAME>[/COLOR] \
--password [COLOR="Red"]<YOUR_CHOSEN_PASSWORD>[/COLOR] \
--imagesize [COLOR="Red"]<IMAGE_SIZE_IN_GB>[/COLOR]G \
--seed [COLOR="Red"]<LIST_OF_PACKAGES_SEPARATED_BY_COMMAS>[/COLOR]
Here's an example for a 2GB image with OMAP kernel and a complete Kubuntu-desktop distribution:
Code:
sudo rootstock \
--fqdn ubuntu \
--login ubuntu \
--password ubuntu \
--imagesize 2G \
--seed linux-image-omap,kubuntu-desktop
In --seed you can specify whatever package you want. You could start with just the kernel and build-essential, then add whatever you need. A good start could be like this:
Code:
--seed linux-image-omap,build-essential,lxde,tightvncserver,openssh-server
This will give you a running ubuntu with a very light, performance-oriented desktop environment (lxde) with ssh and vnc.
Remember: It's still possible to add new packages with apt-get from chroot whenever you want.
Once you have chosen the packages you want, you just have to press enter and rootstock will automatic download the packages and prepare the tarball.
You'll end up with a file named "armel-rootfs-<TIMESTAMP>.tgz"
3. Prepare the img file
This is very easy and quick:
Code:
dd if=/dev/zero of=arm_ubuntu.img bs=1MB count=0 seek=[COLOR="Red"]<SIZE_IN_MB>[/COLOR]
The seek parameter defines the size in MB of your image. make it as large as you want, it should at least be as big as the size you selected for the tarball (2G in my example).
Remember: 1 GB = 1024 MB
Now we format the image. Since the Iconia supports ext4 file system, we can use it!
Code:
mkfs.ext4 -F arm_ubuntu.img
You may want to pass other flags to define advanced options, labels and reserved blocks, but this is the least you need to make it work.
4. Decompress
Now we have to mount the img file in a loop:
Code:
sudo mount -o loop arm_ubuntu.img /mnt
and decompress the tarball into it.
Code:
sudo tar -C /mnt -zxf armel-rootfs-<TIMESTAMP>.tgz
It's done!
[OPTIONAL]
This is the right time to put custom scripts in /mnt/usr/bin like this one to start the vnc server with the correct geometry for the A500:
Code:
#!/bin/bash
rm -fr /tmp/.X1*
vncserver -geometry 1280x752
NB: the A500 screen is 1280x800, but the honeycomb statusbar (1280x48px) is always on top. To avoid panning to show the ubuntu menu bar, we just subtract those 48 pixels from the ubuntu vertical resolution.
Now we just umount it.
Code:
sudo umount /mnt
5. Load on the tablet and get it running
The script to mount and boot is derived from the one in the Backtrack 5 Thread.
Load the img file on the tablet with
Code:
adb push arm_ubuntu.img /sdcard/ubuntu/arm_ubuntu.img
It will take a loooong time and there's no progress bar, so just have faith.
Next, we prepare the boot script. The only thing you need to do is to put your username in (the one you chose in rootstock).
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
mkdir -p $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export USER=[B][COLOR="Red"]<THE_USERNAME_YOU_CHOSE_BEFORE>[/COLOR][/B]
export HOME=/home/$USER
export stor=$mnt/home/$USER/storage
export sdcard=$stor/sdcard
export extsd=$stor/external_sd
export usb=$stor/USB_storage
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
mount -o loop,rw,noatime -t ext4 $kit/arm_ubuntu.img $mnt
echo "mounting storage devices in $stor..."
mkdir -p $sdcard
mkdir -p $extsd
mkdir -p $usb
busybox mount --bind /mnt/sdcard $sdcard
busybox mount --bind /mnt/external_sd $extsd
busybox mount --bind /mnt/usb_storage $usb
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 "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "127.0.0.1 localhost ubuntu" > $mnt/etc/hosts
busybox chroot $mnt /bin/bash
echo "Shutting down Ubuntu ARM for Iconia A500"
umount $sdcard
umount $extsd
umount $usb
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Once done, we can save the file as startubuntu and adb push it to the tab. (the same folder as the img is fine)
Done! We run it by invoking the startubuntu script from the android terminal emulator (must be in superuser mode)
I hope you found this how-to useful.
And we use this distro via our tablets ssh client?
EDIT: sorry my bad Never read code while tired
Hi,
i am running ubuntu natty.
and i got this error:
...
Setting up wireless-crda (1.13) ...
Setting up linux-image-2.6.38-8-omap (2.6.38-8.42) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.38-8-omap
/bin/df: Warning: cannot read table of mounted file systems: No such file or directory
Not sure if it is fatal. rootstock has created successful the rootfs
reida010 said:
Hi,
i am running ubuntu natty.
and i got this error:
...
Setting up wireless-crda (1.13) ...
Setting up linux-image-2.6.38-8-omap (2.6.38-8.42) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.38-8-omap
/bin/df: Warning: cannot read table of mounted file systems: No such file or directory
Not sure if it is fatal. rootstock has created successful the rootfs
Click to expand...
Click to collapse
Same happened to me. Totally not fatal. the tarball is good.
For everyone out there:
I would like your help with testing. I have a crash on start problem with firefox in all the images I tried. Does any of you have the same issue?
Hi,
i get
Code:
Loop device exists
then i did
Code:
echo "$kit/arm_ubuntu.img"
and i get
Code:
/sdcard/ubuntu/arm_ubuntu.img
but then i get
Code:
mount: cannot setup loop device: No such file or directory
any ideas?
Because of firefox.
i read a while ago a tweet about a bug in meego and ubuntu in firefox for arm.
when it is this bug then you should try firefox trunk because it is fixed.
but i cannot refind it :-(
edit:
bugzilla.mozilla.org/show_bug.cgi?id=634594
I was searching for that today, thanks mate. Nice Tutorial =D
reida010 said:
Hi,
but then i get
Code:
mount: cannot setup loop device: No such file or directory
any ideas?
edit:
bugzilla.mozilla.org/show_bug.cgi?id=634594
Click to expand...
Click to collapse
i have the same problem. You should make loop file not in /mnt/sdcard, but in /mnt/external_sd.
Kh_Shad said:
i have the same problem. You should make loop file not in /mnt/sdcard, but in /mnt/external_sd.
Click to expand...
Click to collapse
That would apply only if you put the image file in the external MicroSD, if you have put it in the internal memory (as described in the tutorial) the path is /mnt/sdcard. Also, the speed of the internal memory is better.
Hi,
i found out how i can make it work
but it's strange.
i don't works when i do
Code:
sh ./startubuntu
but with this it works fine:
Code:
/system/bin/sh ./startubuntu
Is this maybe because i didn't use adb.
Someone told me that copy paste might change the permissions (what the ****! really?)
on my tablet startubuntu is not executable.
And it doesn't change anything when i do chmod 755 startubuntu
but after moving it to /system/bin chmod works fine.
After then i can always just run
Code:
su
startubuntu
and ubuntu is up and running.
(many thanks by the way :-D)
Sorry guys, will this method produce a native Ubuntu install similair to how Wubi works? Or is this like the chroot methods were we have to VNC into the distro from within Android?
It is native!!!
but you need vnc to access the xserver
On my n900 i used xephyr but i don't think this is working for android because afaik they don't use X. (n900 is so cool for linux geeks ;-D)
edit:
if you mean with 'native' that it will replace android -> no -> it is a chroot
Yeah that answered my question. Thank you
I'm not going to bother until there is a native distro running with full system resources. I guess with the current bootloader situation that day may never come :-(
It failed in creating the image for me... and it seems like a error in the package linux-image-2.6.38-8-omap
[TRIM]
Need to get 37.4 MB of archives.
After this operation, 98.3 MB of additional disk space will be used.
Get:1 //ports.ubuntu.com/ubuntu-ports/ natty/main wireless-crda armel 1.13 [15.0 kB]
Get:2 //ports.ubuntu.com/ubuntu-ports/ natty/main linux-image-2.6.38-8-omap armel 2.6.38-8.42 [19.8 MB]
Get:3 //ports.ubuntu.com/ubuntu-ports/ natty/main devio armel 1.2-1build1 [16.9 kB]
Get:4 //ports.ubuntu.com/ubuntu-ports/ natty/main flash-kernel armel 2.28ubuntu19 [13.1 kB]
Get:5 //ports.ubuntu.com/ubuntu-ports/ natty/universe kubuntu-mobile armel 1.218 [2720 B]
Get:6 //ports.ubuntu.com/ubuntu-ports/ natty/main linux-firmware all 1.52 [17.5 MB]
Get:7 //ports.ubuntu.com/ubuntu-ports/ natty/main linux-image-omap armel 2.6.38.8.22 [2394 B]
Fetched 37.4 MB in 5min 29s (113 kB/s)
Selecting previously deselected package wireless-crda.
(Reading database ... 9309 files and directories currently installed.)
Unpacking wireless-crda (from .../wireless-crda_1.13_armel.deb) ...
Selecting previously deselected package linux-image-2.6.38-8-omap.
Unpacking linux-image-2.6.38-8-omap (from .../linux-image-2.6.38-8-omap_2.6.38-8.42_armel.deb) ...
Done.
Selecting previously deselected package devio.
Unpacking devio (from .../devio_1.2-1build1_armel.deb) ...
Selecting previously deselected package flash-kernel.
Unpacking flash-kernel (from .../flash-kernel_2.28ubuntu19_armel.deb) ...
Selecting previously deselected package kubuntu-mobile.
Unpacking kubuntu-mobile (from .../kubuntu-mobile_1.218_armel.deb) ...
Selecting previously deselected package linux-firmware.
Unpacking linux-firmware (from .../linux-firmware_1.52_all.deb) ...
Selecting previously deselected package linux-image-omap.
Unpacking linux-image-omap (from .../linux-image-omap_2.6.38.8.22_armel.deb) ...
Setting up wireless-crda (1.13) ...
Setting up linux-image-2.6.38-8-omap (2.6.38-8.42) ...
Running depmod.
Failed to run depmod
dpkg: error processing linux-image-2.6.38-8-omap (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up devio (1.2-1build1) ...
No apport report written because MaxReports is reached already
Setting up flash-kernel (2.28ubuntu19) ...
Setting up kubuntu-mobile (1.218) ...
E: Second stage build in chroot failed !
E: Please see the log to see what went wrong.
Setting up linux-firmware (1.52) ...
I: Cleaning up...
dpkg: dependency problems prevent configuration of linux-image-omap:
linux-image-omap depends on linux-image-2.6.38-8-omap; however:
Package linux-image-2.6.38-8-omap is not configured yet.
dpkg: error processing linux-image-omap (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-2.6.38-8-omap
linux-image-omap
E: Sub-process /usr/bin/dpkg returned an error code (1)
I: Umounting temporary Image
I keep getting a failure also!
Ceck out both of my log files below.
tholmewood said:
Sorry guys, will this method produce a native Ubuntu install similair to how Wubi works? Or is this like the chroot methods were we have to VNC into the distro from within Android?
Click to expand...
Click to collapse
It is a chroot/vnc method, currently the only method available to run linux on this device, because of the locked bootloader... I seriously hope for a chance to dual boot in the future.
i was wondering what packages are needed in order to create an ubuntu netbook Edition? Is the A500 powerful enough for that kind of interface?
Thought you guys might be interested in this post.
http://forum.xda-developers.com/showpost.php?p=15156543&postcount=64
Have fun!
@p-ille
Have you tried firefox daily?
Did it work?
reida010 said:
@p-ille
Have you tried firefox daily?
Did it work?
Click to expand...
Click to collapse
Not really, my job is killing me these days... I'll try it asap!
sent from my Iconia A500
p-ille said:
Not really, my job is killing me these days... I'll try it asap!
sent from my Iconia A500
Click to expand...
Click to collapse
You realize what a pain that tutorial is to follow? Could you please provide a pre built image at least if asking for scripts is probably way too much?

Set Maximum CPU frequency on any Android ROM for the HP TOUCHPAD

The maximum and minimum cpu frequencies allow by the Kernel can be set to all the Android ROM ever made for the HP TOUCHPAD until now and forever!
This is apply as a native setting ( as shipped from the factory, we could say )
The ROM will not be modify, no need for ROOT access or install SuperSu or any Apps.
It can be done to an existing installed ROM, no need to re-flash, is safe and will not damage your installation or prevent you from using your TP. Even if you do not do it right, you will get your TP running as always.
This is only done in a Linux OS, I am using ubuntu, which it can also be run under a Virtual Machine in any other OS.
1. Get the boot.img from the zip ROM or the current uImage from the TP boot directory.
(The boot.img must be copy to the root/hpboot directory of the PC, not on the tablet)
2. Run each of this commands separately in terminal in the directory the boot.img is.
dumpimage -i boot.img kernel.uImage
dumpimage -i boot.img -p 1 ram
dd if=ram of=ramdisk.img.gz bs=64 skip=1
gunzip ramdisk.img.gz
mkdir ramdisk; cd ramdisk
cpio -i < ../ramdisk.img
3. Go to the ramdisk direcoty and open this file in a text editor:
init.tenderloin.power.rc
Copy and Paste under # CPU Scaling and # CPU boost the following:
Note: You can add different settings to each cpu0 or cpu1.
Different frequencies to each and also assigned different Governors to each cpu.
You have total and individual control.
# CPU Scaling
# Replace the numbers at the first two lines at the end with the frequencies your TP can handle.
# Replace the numbers at the last two lines at the end with the frequencies your TP can handle.
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 192000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 192000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1782000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1782000
# Configure Performance Governor
# This is optional, but it will speed boot time using both CPU at maximum frequencies.
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance"
# CPU boost
# Set your desire speed can not be higher than your maximum frequencies.
write /sys/module/cpu_boost/parameters/boost_ms 20
write /sys/module/cpu_boost/parameters/sync_threshold 1782000
write /sys/module/cpu_boost/parameters/input_boost_freq 1782000
You can configure the type of governor after the system finished booting on this line. Is all up to the Kernel and your choice, but interactive is good.
# Configure Interactive
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive"
4. Save the changes and repack the ramdisk with kernel.
Open Terminal in the ramdisk folder and paste:
find . | cpio --create --format='newc' | gzip > ../ramdisk_Pack.img
5. Go to the folder where the original boot.img file is and you should have a file ( ramdisk_Pack.img )
Paste the following two commands:
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n "TENDERLOIN MAX CPU" -d ./ramdisk_Pack.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n "Tenderloin Android MAX CPU" -d kernel.uImage:ramdisk.uImage uImage.Android_MAX_CPU
6. There is a file name uImage.Android_MAX_CPU in the same folder as your original boot.img, copy it to your TP boot directory and reboot.
If you enter a wrong frequency and it did not finished then do a hard reset and select the other boot image and use it as always. If it finished booting then you are running faster than ever!
To take in consideration:
The Kernel in the ROM has the frequencies that supports, most of the ROM comes with a top frequencies of 1782000. The SKZ kernel allows for a maximum frequency of 1890000.
The HP Touchpad where made with different suppliers of components. Due to this differences not all supports the same maximum frequencies. Very few can work under 1890000 or 18360000. But you can get lucky and have one. You should know and test the maximum speed that it will take, you can do that with Kernels apps before making modifications to the Boot Image, also the minimum frequencies are important as well.
The advantages of creating your own personal Maximum Speed Boot Image:
1 You will get faster boot time as the CPUs are set to work after the system starts the booting process and do not have to wait until the GUI starts and the Kernel app applies the settings.
2. Keep your ROM secure, no ROOT and no Super User, use it as is.
3. Less apps to install to take space and waste of Memory. Kernel apps and Super User have background services that are all time running just to give you the extra speed. Other apps can get the extra Ram for more processing.
4. There is more benefits of running the device at a higher frequency with no extra processing power, than have multiple apps to fine tune your CPU and governors but use resources.
View attachment 4613960
I don't know how to do with this, please help.
[email protected]:/mnt/g/devices/tenderloin/12.5.1/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rak_Pack.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
Try 'cpio --help' or 'cpio --usage' for more information.
In this post I did a detail explanation on how to unpack the boot image.
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
Create a directory on root ( hpboot ) copy and paste the command on terminal as is on the post and it should work.
View attachment 4614596
[email protected]:/mnt/g/devices/tenderloin$ cd ./hpboot/
[email protected]:/mnt/g/devices/tenderloin/hpboot$ ls
boot.img
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dumpimage -i boot.img kernel.uImage
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dumpimage -i boot.img -p 1 ram
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dd if=ram of=ramdisk.img.gz bs=64 skip=1
28781+1 records in
28781+1 records out
1842017 bytes (1.8 MB, 1.8 MiB) copied, 0.431285 s, 4.3 MB/s
[email protected]:/mnt/g/devices/tenderloin/hpboot$ gunzip ramdisk.img.gz
[email protected]:/mnt/g/devices/tenderloin/hpboot$ mkdir ramdisk; cd ramdisk
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ cpio -i < ../ramdisk.img
6819 blocks
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rakRW.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
Try 'cpio --help' or 'cpio --usage' for more information.
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$
I did it due to https://forum.xda-developers.com/hp-...te-to-t3846567 , but it stuck just like last time I did it.
What does this mean?
cpio: You must specify one of -oipt options.
I can not see the picture you attached and the link does not work.
Are you doing all the commands inside a Linux machine?
zcarrt said:
--SNIP--
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rakRW.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
--SNIP--
Click to expand...
Click to collapse
It may be copied wrong. It should be: cpio --create -–format=’newc’ (not one dash but two, i.e. not -create, -format, but --create, --format)
The working path shows: [email protected]:/mnt/g/devices/tenderloin/hpboot$
I am not a Linux guru, but it look the boot.img is on the root of the tablet and not the PC.
The commands will only work properly if the directory is created in the root of the PC no where else.
((correction))
Yes, you are correct, is something about pasting a double dash that it turns into a hyphen (single dash). When editing the post it shows as intended, double dash. When publish, shows as a single dash, unless the font size is change on here and type again.
How I did it:
Enter the command in ubuntu terminal ( worked ) then copy and paste into LibreOffice Writer.
Write the guide, then copy and paste into the forum, to avoid any mistakes.
Then surprise ! a double dash is change to a hyphen and I am not even aware of it..!
Thanks for correcting!
HP_TOUCHPAD said:
The working path shows: [email protected]:/mnt/g/devices/tenderloin/hpboot$
I am not a Linux guru, but it look the boot.img is on the root of the tablet and not the PC.
The commands will only work properly if the directory is created in the root of the PC no where else.
Click to expand...
Click to collapse
I thought that, too, but there wouldn't be enough room for the dd command to work, and the error message wouldn't have been a cpio error.
my path:
[email protected]:~/hpboot$
There should not be any mounted device anywhere.
HP_TOUCHPAD said:
I can not see the picture you attached and the link does not work.
Are you doing all the commands inside a Linux machine?
Click to expand...
Click to collapse
I did it in windows 10 Ubuntu bash last time , I will try it properly in a Linux machine again. Thanks.
zcarrt said:
I did it in windows 10 Ubuntu bash last time , I will try it properly in a Linux machine again. Thanks.
Click to expand...
Click to collapse
The problem was on the formatting on my post. When I paste the guide for some reason it shows as a hyphen instead of a double dash.
I corrected the error. This is how it should be, also should work in the windows10 linux subsystem.
find . | cpio --create --format='newc' | gzip > ../ramdisk_Pack.img
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
Usage: mkimage -l image
-l ==> list image header information
mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
mkimage [-D dtc_options] [-f fit-image.its|-F] fit-image
-D => set all options for device tree compiler
-f => input filename for FIT source
Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)
mkimage -V ==> print version information and exit
Use -T to see a list of available image types
Any help please?
Thanks.
kojam said:
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
go to this post and run the script, if all work on your system then you have everything to build it.
https://forum.xda-developers.com/showpost.php?p=78028080&postcount=4
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
5. Go to the folder where the original boot.img file is and you should have a file ( ramdisk_Pack.img )
Paste the following two commands:
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n “TENDERLOIN MAX CPU” -d ./ramdisk_Pack.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n “Tenderloin Android MAX CPU” -d kernel.uImage:ramdisk.uImage uImage.Android_MAX_CPU
go to this post and run the script, if all work on your system then you have everything to build it.
https://forum.xda-developers.com/showpost.php?p=78028080&postcount=4
Click to expand...
Click to collapse
Thanks for your reply.
I was in that folder (where ramdisk_Pack.img is) in terminal, then I entered/pasted those commands in terminal...
What am I doing wrong? Explain it to me like I'm 5yrs old please. LOL :laugh::silly:
Thanks a million!
Click to expand...
Click to collapse
kojam said:
HP_TOUCHPAD said:
Thanks for your reply.
I was in that folder (where ramdisk_Pack.img is) in terminal, then I entered/pasted those commands in terminal...
What am I doing wrong? Explain it to me like I'm 5yrs old please. LOL :laugh::silly:
Thanks a million!
Click to expand...
Click to collapse
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
Quite alright friend.
It is I who thanks you for this.
I was able to get create the file after following your update/corrected instructions.
Thanks again!
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
Thanks!
Worked!
Click to expand...
Click to collapse

How To Guide How To Install Windows Or Linux ISOs on your Android Devices - Windows 10 Nox Lab + Working Arm Distros for your phone using Termux

Update: A new thread is created to house "premade" linux distros. The first premade environment is an Ubuntu distro, installed using proot-distro in termux, Takes only a few minutes to restore the backup, else instructions are provided to build the environment yourself from scratch.
[GUIDE][NO-ROOT] How to install Ubuntu and other Linux Distros on Your Phone or Android TV Box, using Termux
NOTICE: THIS METHOD IS ONLY FOR NON ROOTED DEVICES PROOT-DISTRO GITHUB PAGE Hello Friends! Today I wanted to start a thread that will house prebuilt Linux environments, as well as instructions for building the Linux environments yourself...
forum.xda-developers.com
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Or you can visit this thread and use method 2 to remote connect to your phone using windows RDC and have a much easier time programing vms in termux's qemu. A warning the windows arm editions break xrdp at least for me. It may be user error, I am unsure. Let me know if you have trouble too or success
[GUIDE][NO-ROOT] How to Remotely Connect to Your Phone, or Any Android Device, Using Termux and a PC
Hello Friends~! Today I wanted to teach you how to remotely connect to your phone, or any android device, using Termux and a PC. This example assumes your android device is on the same wireless network as your pc. In order to remote into our...
forum.xda-developers.com
Spoiler: UBUNTU ARM 64 FOR PHONE IN TERMUX
This machine seems to be working fine out of the box
How To Install Windows Or Linux ISOs on your Android Devices - Windows 10 Nox Lab + Working Arm Distros for your phone using Termux
Update: A new thread is created to house "premade" linux distros. The first premade environment is an Ubuntu distro, installed using proot-distro in termux, Takes only a few minutes to restore the backup, else instructions are provided to build...
forum.xda-developers.com
Spoiler: KALI LINUX NETHUNTER FOR PHONE IN TERMUX
This machine runs amazing once you do all the troubleshooting steps included in the comments
How To Install Windows Or Linux ISOs on your Android Devices - Windows 10 Nox Lab + Working Arm Distros for your phone using Termux
Update: A new thread is created to house "premade" linux distros. The first premade environment is an Ubuntu distro, installed using proot-distro in termux, Takes only a few minutes to restore the backup, else instructions are provided to build...
forum.xda-developers.com
Spoiler: WINDOWS 10 ARM
This one can really use some work, maybe someone can figure out what is wrong with it
How To Install Windows Or Linux ISOs on your Android Devices - Windows 10 Nox Lab + Working Arm Distros for your phone using Termux
Update: A new thread is created to house "premade" linux distros. The first premade environment is an Ubuntu distro, installed using proot-distro in termux, Takes only a few minutes to restore the backup, else instructions are provided to build...
forum.xda-developers.com
You can do the same for win11, get the image off archive.org but it wont work well unless your phone supports KVM or you have a work around
Spoiler: THE ORIGINAL GUIDE / NOX LAB FOR KNOWLEDGE PURPOSES --OUTDATED
As an edit and an update, the method listed below uses x86_64 version of qemu which will not run well on our phones. This guide also uses an android emulator to teach basics of building a virtual machine in qemu, but in practice on a phone it will be much different, when we use an Arm version of qemu. I am leaving this guide up though as it was fundamental in helping myself personally to even begin to understand qemu and the architectures and how to use the code.
This guide uses a modded nox android emulator which can be found HERE
Hello Friends~!
Today I will be walking you through using Termux, QEMU, and a VNC server to Run Windows or Linux isos on Your Android Devices as well as Android Emulators like Nox on Windows 10.
Spoiler: QEMU-SYSTEM-X86_64-HEADLESS SETUP
DOWNLOAD TERMU:
TERMU.zip
drive.google.com
Paste your iso and termu's apps in Barenox/bin, then install them in Nox.
Spoiler: PIC
Then install the apks by using the apk button on nox
BUILDING QEMU
In Termux, type:
Code:
pkg install x11-repo
apt-get upgrade -y
pkg install qemu-utils -y
pkg install qemu-system-x86-64-headless -y
BUILDING THE VIRTUAL MACHINE'S ENVIRONMENT
In Termux, type:
Code:
mkdir win7
cd win7
qemu-img create -f qcow2 win7.img 100G
A note here is that the name or command "win7" can be any iso you want to install.
For instance, you have an Ubuntu iso you want to install, use:
Code:
mkdir ubuntu
cd ubuntu
qemu-img create -f qcow2 ubuntu.img 100G
Then change the name of your iso to "ubuntu.iso" and so forth
100G can be edited as well. If you are worried about hard drive space, no need.
It is saved in qemu's take on sparse image format, "qcow2 files" (QEMU Copy On Write) thus only taking up space as you use it.
USING ADB TO PUSH THE ISO
In Barenox/bin
Open command prompt from the toolbar and run:
Code:
adb push win7.iso /data/data/com.termux/files/home/win7
Take note that /data/data/com.termux/... etc is where termux stores everything
Spoiler: PIC
BUILDING THE VIRTUAL MACHINE
In termux type:
Code:
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:7 -cdrom win7.iso -hda win7.img
Take note that the port of "7" after our local server ip of 127.0.0.1 can be edited. I set this to 7 since this is windows 7
This is in reference to the "5900" port number asked for with VNC.
Install your vnc app. I used "vnc viewer"
The server ip will be 127.0.0.1 if asked and the port is 5907
or
127.0.0.1:5907
Spoiler: PIC
tadah~!
RUNNING THE MACHINE LATER
In termux
Code:
cd win7
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:7 -hda win7.img
Then reopen the VNC App
These steps have all been automated, see the EXECUTABLE SCRIPTS section
IF YOU LEARN BETTER VISUALLY HERE IS A VIDEO OF THE STEPS
Spoiler: REFS
Termux Direct Apk DL:
https://f-droid.org/repo/com.termux_117.apk
VNC:
Download VNC Viewer | VNC® Connect
Control VNC® enabled computers with VNC® Viewer.
www.realvnc.com
This Guide Helped Me Get Started:
GitHub - blanckth/qemuTermux: Use QEMU in Termux as a full virtual machine and Deploy Any OS and iso
Use QEMU in Termux as a full virtual machine and Deploy Any OS and iso - GitHub - blanckth/qemuTermux: Use QEMU in Termux as a full virtual machine and Deploy Any OS and iso
github.com
This Guide Helped Me To Understand How To "Run a Batch" in Linux (.sh)
How to create batch files on Windows & Linux to automate small and complex tasks
While working on our computers we sometimes need to do repetitive tasks almost every single day. However, there is a simple way you can automate those tasks by
www.how2shout.com
What is a VNC?
What is a VCN? Benefits and Providers of Virtual Network Computing
Helped Me To Reprogram Parameters
QEMU documentation - QEMU
www.qemu.org
QCOW2 File - What is a .qcow2 file and how do I open it?
Learn about .QCOW2 files and view a list of programs that open them.
fileinfo.com
Difference Between Qemu and KVM – The Geek Diary
www.thegeekdiary.com
Spoiler: Outdated QTemu Tool history
INSTALL.md · master · QtEmu / gui · GitLab
Front-end for qemu emulator
gitlab.com
## Development
Urs Wolfer started QtEmu as school project. Ben Klopfenstein began adding some features that he wanted.
And in 2009 the project stoped its development.
In 2017 Sergio Carlavilla started from scrach the development of the 2.0 version. The new UI has based on
VirtualBox OSE and Virt-manager.
QtEmu / gui · GitLab
Front-end for qemu emulator
gitlab.com
original repo
GitHub - uwolfer/qtemu: This project is UNMAINTAINED. QtEmu is a graphical user interface for QEMU written in Qt4. Active fork: https://gitlab.com/qtemu
This project is UNMAINTAINED. QtEmu is a graphical user interface for QEMU written in Qt4. Active fork: https://gitlab.com/qtemu - GitHub - uwolfer/qtemu: This project is UNMAINTAINED. QtEmu is a g...
github.com
Building Android for Qemu: A Step-by-Step Guide
Developing Linux for Android on Qemu allows you to do some things that are not necessarily possible using the stock emulator.
www.collabora.com
AArch64 - Wikipedia
en.wikipedia.org
How to launch ARM aarch64 VM with QEMU from scratch.
The below instructions will allow for bringing up an ARM VM from scratch.
futurewei-cloud.github.io
Ubuntu – Error
Run u-boot in qemu
GitHub - qemu/u-boot: Mirror of git.qemu.org/u-boot.git
Mirror of git.qemu.org/u-boot.git. Contribute to qemu/u-boot development by creating an account on GitHub.
github.com
How to Use DD Show Progress Command in Linux? {2 Options Explained}
Use the dd command to show progress in the Linux terminal. Add the status attribute to see progress output or run dd with the pv command.
phoenixnap.com
/dev/zero - Wikipedia
en.wikipedia.org
Purpose of /dev/zero?
I tried to cat /dev/zero, and it didn't seem to do anything. I googled /dev/zero, and it says it's basically a blank file with infinite size. Is cat printing an infinite number of non-existent char...
unix.stackexchange.com
Features/PC System Flash - QEMU
wiki.qemu.org
https://forum.xda-developers.com/attachments/dd-png.5593745/
dd: different unit for bs, skip and count?
I am trying to copy a partition from an entire disk image. This command is working: dd if=image.iso of=test bs=512 skip=1161215 count=32768 In order to increase the speed, I'd like to set a bigge...
askubuntu.com
Android On Windows, With Windows~!
Looks great, will give it a try later. Thanks for the time & effort!
========================
SOURCES
==========
==================​
Spoiler: QEMU-SYSTEM-X86_64 SOURCES
Spoiler: REQUIRED APPS
TERMU.zip
drive.google.com
(112M)
Spoiler: WINDOWS 7 SOURCE
Spoiler: PREREQUISITES
A Rooted Device
You need to have Qemu Built already, have made your directory, and changed to it for the scripts to work
I.E hand type this part in Termux
Code:
pkg install x11-repo
apt-get upgrade -y
pkg install qemu-utils -y
pkg install qemu-system-x86-64-headless -y
mkdir win7
cd win7
qemu-img create -f qcow2 win7.img 100G
Spoiler: DOWNLOAD
WIN7SOURCE.zip
drive.google.com
(2.9G)
Spoiler: HOW TO USE ALL FEATURES
Copy the source files and paste them into barenox/bin, then execute the .push-all.bat script. When the adb push has completed, you can now run this code.
In Termux:
Code:
./hinstall.sh
After you have completed the installation, the parameters attaching a disk drive are no longer needed, hence the "hrun.sh" script. This script allows you to easily boot your new machine after changing to the machine's folder in Termux.
In Termux:
Code:
./hrun.sh
Then open your vnc app. IP and PORT info: 127.0.0.1:5907
The source files contain pre-built scripts for your convenience. If you would rather build your own, or understand fully what these are, please see the EXECUTABLE SCRIPTS comment below.
Spoiler: PREMADE INFO
Hello, for your convenience, a pre-installed hdd has been uploaded for this machine. What does that mean? You can bypass the Windows installation and all the steps required to do the setup, by simply pushing the Premade files and running ./hrun.sh
SEE PREMADES SECTION IN COMMENTS
Spoiler: HEADLESS SOURCE CODE
Code:
install:
mkdir win7
cd win7
qemu-img create -f qcow2 win7.img 100G
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:7 -cdrom win7.iso -hda win7.img
run later:
cd win7
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:7 -hda win7.img
iso obtained from:
My google Drive Vault
vnc ip and port:
127.0.0.1:7
127.0.0.1:5907
adb push path:
adb push win7.iso /data/data/com.termux/files/home/win7
adb push hinstall.sh /data/data/com.termux/files/home/win7
adb push hrun.sh /data/data/com.termux/files/home/win7
chmod path:
adb shell chmod 777 /data/data/com.termux/files/home/win7/hinstall.sh
adb shell chmod 777 /data/data/com.termux/files/home/win7/hrun.sh
commands:
./hinstall.sh
./hrun.sh
Spoiler: TINY7 SOURCE
Spoiler: PREREQUISITES
A Rooted Device
You need to have Qemu Built already, have made your directory, and changed to it for the scripts to work
I.E hand type this part in Termux
Code:
pkg install x11-repo
apt-get upgrade -y
pkg install qemu-utils -y
pkg install qemu-system-x86-64-headless -y
mkdir tiny7
cd tiny7
qemu-img create -f qcow2 tiny7.img 100G
Spoiler: DOWNLOAD
TINY7SOURCE.zip
drive.google.com
(691M)
Spoiler: HOW TO USE ALL FEATURES
First half of video is using the Premade, second half is SOURCES
Copy the source files and paste them into barenox/bin, then execute the .push-all.bat script. When the adb push has completed, you can now run this code.
In Termux:
Code:
./hinstall.sh
After you have completed the installation, the parameters attaching a disk drive are no longer needed, hence the "hrun.sh" script. This script allows you to easily boot your new machine after changing to the machine's folder in Termux.
In Termux:
Code:
./hrun.sh
Then open your vnc app. IP and PORT info: 127.0.0.1:5903
The source files contain pre-built scripts for your convenience. If you would rather build your own, or understand fully what these are, please see the EXECUTABLE SCRIPTS comment below.
Spoiler: PREMADE INFO
Hello, for your convenience, a pre-installed hdd has been uploaded for this machine. What does that mean? You can bypass the Windows installation and all the steps required to do the setup, by simply pushing the Premade files and running ./hrun.sh
SEE PREMADES SECTION IN COMMENTS
Spoiler: PROGRAMMER'S NOTES
Remember that Windows 7 is ancient now and takes (took) forever to setup, even as small as this is.
With this machine, first select "CUSTOM Install", then just set it and forget it. Tiny 7 has a built in script that executes after the initial setup completes, so when you get to this part, you are done, despite what the window says. The script hangs, as it is way outdated, we need to remove it. Close the window and delete the experience folder and delete enable quick launcher
Then we need to delete the actual script
Open task manager, find the PROCESS activate.exe, click on it once to select it, and at the top of vnc viewer, select the mouse icon to activate the left click option. at the bottom right if you click, it will allow you to open the side menu to open the file location. So, open the file location first, then select end task. Delete the install folder
alternatively, you can go into C:\Windows and delete the install folder
You'll notice that this is going to break the internet explorer and file manager shortcuts on your desktop. Just remove the shortcuts, and open the windows menu, search for internet, then right click and copy internet explorer. Go to your desktop and paste a short cut
Spoiler: HEADLESS SOURCE CODE
Code:
install:
mkdir tiny7
cd tiny7
qemu-img create -f qcow2 tiny7.img 100G
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:3 -cdrom tiny7.iso -hda tiny7.img
run later:
cd tiny7
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:3 -hda tiny7.img
iso obtained from:
https://archive.org/download/tiny-7/Tiny7.iso
vnc ip and port:
127.0.0.1:3
127.0.0.1:5903
adb push path:
adb push win7.iso /data/data/com.termux/files/home/tiny7
adb push hinstall.sh /data/data/com.termux/files/home/tiny7
adb push hrun.sh /data/data/com.termux/files/home/tiny7
chmod path:
adb shell chmod 777 /data/data/com.termux/files/home/tiny7/hinstall.sh
adb shell chmod 777 /data/data/com.termux/files/home/tiny7/hrun.sh
commands:
./hinstall.sh
./hrun.sh
========================
PREMADES
==========
==================​
Spoiler: QEMU-SYSTEM-X86_64 PREMADE IMAGES
Spoiler: REQUIRED APPS
TERMU.zip
drive.google.com
(112M)
Spoiler: WINDOWS 7
Spoiler: STOCK: WINDOWS 7 ULTIMATE SP1 (64 BIT) PREMADE
Spoiler: PREREQUISITES
A Rooted Device
You need to have Qemu Built already, have made your directory, and changed to it for the scripts to work
I.E hand type this part in Termux
Code:
pkg install x11-repo
apt-get upgrade -y
pkg install qemu-utils -y
pkg install qemu-system-x86-64-headless -y
mkdir win7
cd win7
Spoiler: DOWNLOAD
WIN7ULTSP1STOCKHDD.zip
drive.google.com
(3.1G)
Spoiler: HOW TO USE
It says Tiny7 but the steps are the same. First half is a PREMADE installation demo, second half is a SOURCES demo
This premade hard drive image saves us the time of installing windows. It is fully setup and ready to play with.
To use it, copy all the files to barenox/bin and run the .push-all.bat script.
If using your own device, paste the files into your adb folder or just execute the script if you have your adb permissions wrapped.
When it has completed, in Termux type:
Code:
./hrun.sh
Open your vnc app. IP and PORT info: 127.0.0.1:5907
And that will load the premade machine for you. It will simply boot into windows
Nothing has been added here, so if you want to run games and what not, there may be dependencies required. I will build a box that is game ready in the future with the 64bit edition.
Spoiler: MOD: WINDOWS 7, TINY 7 (32 BIT) PREMADE
Spoiler: PREREQUISITES
A Rooted Device
You need to have Qemu Built already, have made your directory, and changed to it for the scripts to work
I.E hand type this part in Termux
Code:
pkg install x11-repo
apt-get upgrade -y
pkg install qemu-utils -y
pkg install qemu-system-x86-64-headless -y
mkdir tiny7
cd tiny7
Spoiler: DOWNLOAD
TINY7HDD.zip
drive.google.com
(615M)
Spoiler: HOW TO USE
First half is a PREMADE installation demo, second half is a SOURCES demo
This premade hard drive image saves us the time of installing windows. It is fully setup and ready to play with.
To use it, copy all the files to barenox/bin and run the .push-all.bat script.
If using your own device, paste the files into your adb folder or just execute the script if you have your adb permissions wrapped.
When it has completed, in Termux type:
Code:
./hrun.sh
Open your vnc app. IP and PORT info: 127.0.0.1:5903
And that will load the premade machine for you. It will simply boot into windows
Nothing has been added here, so if you want to run games and what not, there may be dependencies required. I will build a box that is game ready in the future with the 64bit edition.
See Tiny7's Tree Under SOURCES. The PROGRAMMER'S NOTES Tree contains detailed instructions for how this was Programmed. I had to figure out how to remove the old script that came with this iso, and documented the steps there for others. Note that the preinstalled machine has been cleaned of the problematic INSTALL folder and the internet explorer shortcut corrected for you.
More MODS will be added as they are built
TERMUX AND REPO KNOWLEDGE​
Spoiler: TERMUX PROPERTIES AND USER BINARIES
Spoiler: CODE
The following code was used to pull Termux's properties File
Code:
adb pull /data/data/com.termux/files/home/.termux/termux.properties
Spoiler: FILE
Code:
### After making changes and saving you need to run `termux-reload-settings`
### to update the terminal. All information here can also be found on the
### wiki: https://wiki.termux.com/wiki/Terminal_Settings
###############
# General
###############
### Allow external applications to execute arbitrary commands within Termux.
### This potentially could be a security issue, so option is disabled by
### default. Uncomment to enable.
# allow-external-apps = true
### Default working directory that will be used when launching the app.
# default-working-directory = /data/data/com.termux/files/home
### Uncomment to disable toasts shown on terminal session change.
# disable-terminal-session-change-toast = true
### Uncomment to not show soft keyboard on application start.
# hide-soft-keyboard-on-startup = true
### Uncomment to let keyboard toggle button to enable or disable software
### keyboard instead of showing/hiding it.
# soft-keyboard-toggle-behaviour = enable/disable
### Adjust terminal scrollback buffer. Max is 50000. May have negative
### impact on performance.
# terminal-transcript-rows = 2000
### Uncomment to use volume keys for adjusting volume and not for the
### extra keys functionality.
# volume-keys = volume
###############
# Fullscreen mode
###############
### Uncomment to let Termux start in full screen mode.
# fullscreen = true
### Uncomment to attempt workaround layout issues when running in
### full screen mode.
# use-fullscreen-workaround = true
###############
# Cursor
###############
### Cursor blink rate. Values 0, 100 - 2000.
# terminal-cursor-blink-rate = 0
### Cursor style: block, bar, underline.
# terminal-cursor-style = block
###############
# Extra keys
###############
### Settings for choosing which set of symbols to use for illustrating keys.
### Choose between default, arrows-only, arrows-all, all and none
# extra-keys-style = default
### Force capitalize all text in extra keys row button labels.
# extra-keys-text-all-caps = true
### Default extra-key configuration
# extra-keys = [[ESC, TAB, CTRL, ALT, {key: '-', popup: '|'}, DOWN, UP]]
### Two rows with more keys
# extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'], \
# ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
### Configuration with additional popup keys (swipe up from an extra key)
# extra-keys = [[ \
# {key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}}, \
# {key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \
# {key: ALT, popup: {macro: "CTRL f TAB", display: "tmux →"}}, \
# {key: TAB, popup: {macro: "ALT a", display: A-a}}, \
# {key: LEFT, popup: HOME}, \
# {key: DOWN, popup: PGDN}, \
# {key: UP, popup: PGUP}, \
# {key: RIGHT, popup: END}, \
# {macro: "ALT j", display: A-j, popup: {macro: "ALT g", display: A-g}}, \
# {key: KEYBOARD, popup: {macro: "CTRL d", display: exit}} \
# ]]
###############
# Colors/themes
###############
### Force black colors for drawer and dialogs
# use-black-ui = true
###############
# HW keyboard shortcuts
###############
### Disable hardware keyboard shortcuts.
# disable-hardware-keyboard-shortcuts = true
### Open a new terminal with ctrl + t (volume down + t)
# shortcut.create-session = ctrl + t
### Go one session down with (for example) ctrl + 2
# shortcut.next-session = ctrl + 2
### Go one session up with (for example) ctrl + 1
# shortcut.previous-session = ctrl + 1
### Rename a session with (for example) ctrl + n
# shortcut.rename-session = ctrl + n
###############
# Bell key
###############
### Vibrate device (default).
# bell-character = vibrate
### Beep with a sound.
# bell-character = beep
### Ignore bell character.
# bell-character = ignore
###############
# Back key
###############
### Send the Escape key.
# back-key=escape
### Hide keyboard or leave app (default).
# back-key=back
###############
# Keyboard issue workarounds
###############
### Letters might not appear until enter is pressed on Samsung devices
# enforce-char-based-input = true
### ctrl+space (for marking text in emacs) does not work on some devices
# ctrl-space-workaround = true
Spoiler: MORE TERMUX KNOWLEDGE
Internal and external storage - Termux Wiki
wiki.termux.com
Spoiler: BUILT IN BINARIES
Spoiler: QEMU X11 REPOS
QEMU-SYSTEM-X86_64 7.0 USER MANUAL PART 1​
Spoiler: SHOW
X86_64 USER MANUAL PART 2​
Spoiler: SHOW
EXECUTABLE SCRIPTS​
Spoiler: SHOW
Spoiler: HEADLESS INSTALL SCRIPT
This script simply saves us the time of retyping the virtual's machine's installation parameters by running "./hinstall.sh"
Spoiler: PREREQUISITES
A Rooted Device To Be Able To Modify and Execute Your New Scripts
You need to have Qemu Built already, have made your directory, and changed to it for the scripts to work
I.E hand type this part
Code:
pkg install x11-repo
apt-get upgrade -y
pkg install qemu-utils -y
pkg install qemu-system-x86-64-headless -y
mkdir win7
cd win7
qemu-img create -f qcow2 win7.img 100G
Make a new text file on your desktop. Call it hinstall
Open the text file and paste in:
Code:
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:7 -cdrom win7.iso -hda win7.img
Spoiler: PIC
Save the file, change the extension to .sh, and paste it into barenox/bin.
Open command prompt from the toolbar and paste:
Code:
adb push hinstall.sh /data/data/com.termux/files/home/win7
adb root
adb shell chmod 777 /data/data/com.termux/files/home/win7.hinstall.sh
./hinstall.sh
Spoiler: PIC
Now run this in Termux: (In the win7 directory, per this example, minus the top picture xD)
Code:
./hinstall.sh
and that will start the virtual machine for us, without us needing to type in the steps. I have automated all this further, It will be added to the SOURCE section eventually
Spoiler: HEADLESS RUN SCRIPT
This script simply saves us the time of retyping the virtual's machine's parameters by running "./hrun.sh"
Make a new text file on your desktop. Call it hrun
Open the text file and paste in:
Code:
qemu-system-x86_64 -smp 2 -net nic -net user -device AC97 -m 2048 -vnc 127.0.0.1:7 -hda win7.img
Save the file, change the extension to .sh, and paste it into barenox/bin.
Open command prompt from the toolbar and paste:
Code:
adb push hrun.sh /data/data/com.termux/files/home/win7
adb root
adb shell chmod 777 /data/data/com.termux/files/home/win7.hrun.sh
You are now able to start your windows 7 vm in Termux by changing to the win7 directory and typing
Code:
./hrun.sh
Then open your vnc or spice app
Spoiler: ADB PUSH ALL SCRIPT
This is a simple script to automate pushing the windows iso, the hinstall.sh file. and hrun.sh file.
Simply paste the text in a new document and name it something like ".PUSHALL.bat"
We add the period at the beginning so the script will appear at the top of file list when added to the bin folder.
Spoiler: PIC
Code:
adb push win7.iso /data/data/com.termux/files/home/win7
adb push hinstall.sh /data/data/com.termux/files/home/win7
adb push hrun.sh /data/data/com.termux/files/home/win7
adb root
adb shell chmod 777 /data/data/com.termux/files/home/win7/hinstall.sh
adb shell chmod 777 /data/data/com.termux/files/home/win7/hrun.sh
The final commands in the script, adb root and chmod, allow us to modify the scripts we sent over, so they are allowed to be executed in Termux by using ./ and then the file name, like: ./hinstall.sh
You would then paste all these files into barenox/bin (or your adb directory if working on your own device) and run the .push-all.bat file, it will go through and automatically push over the iso and files, and chmod them for us. (You would need root permissions for this sort of automation)
See Windows 7 SOURCE for further documentation. (Work In Progress)
Spoiler: PULL VIRTUAL MACHINE'S HDD
You can make a batch file to easily pull the machine's hdd
Code:
adb pull /data/data/com.termux/files/home/win7/win7.img
Spoiler: HOW TO EDIT SCRIPTS IN WINDOWS
Right click and edit the batch and sh files
press ctrl plus h and replace as needed
To Edit the .sh without need of other program just change it to ".txt" and edit in there, then change back
Spoiler: HOW TO EDIT SCRIPTS IN TERMUX
In Termux, you can use the command "nano" then your file name, to edit the file in the shell
Make your edits here
Then press ctrl + x and then ENTER to save and close the file. You need to use Termux's built in ctrl button and then press X
Spoiler: SU HOME CODE
When you go into superuser mode in Termux, it forces you into the Root directory on your android device. You can create a script called home.sh
with code:
Code:
cd /data/data/com.termux/files/home/
and adb push and chmod the script, so now after you type su,
you can type ./home.sh and be rerouted to your termux home with all your machines
Will add more as I make them
PROGRAMMER'S NOTES​
Spoiler: SHOW
Spoiler: WINDOWS7
There's no additional programming notes here, other than to select custom install when you first run the disk in the emulator, else it will cause a loop.
Win7 is such a sweet baby <3 at least for the initial setup. Now we can finness the creation by adding certain dependencies to play windows games like .net framework, haxm and more but I will do that another day
Spoiler: TINY7
This is the only entry that is actually located in it's SOURCES tree, I am unable to move it bc it has a lot of images
Spoiler: WINDOWS 11 ARM
Spoiler: OBTAINING THE ISO
Spoiler: UUPDUMP
If you're not familiar with using UUPDUMP, I'll walk you through using them to get the Windows 11 ARM iso. You could use this site for other Windows Related ISOs and products but that will not be covered here.
UUP dump
UUP dump lets you download Unified Update Platform files, like Windows Insider updates, directly from Windows Update.
uupdump.net
Select the arm64 version for latest public build
Select only Windows Home (Unless you need pro for its built in tools)
Uncheck include updates
Unzip the package and run the uup download windows cmd
When the dl finishes, you can identify your iso's name by this line in cmd prompt. You can then rename it to what you like
Spoiler: DOWNLOAD WIN11 ARM
If you don't want to have to do the uupdump steps, I have uploaded my copy of windows 11 arm from them, to gdrive for us <3
DOWNLOAD:
win11arm.iso
drive.google.com
(4.16GB)
Spoiler: QEMU-IMG HACK, MAY BE USEFUL WITH OTHER PROGRAMS
To even be able to view the help file for qemu-img in Termux, I had to use Root explorer to copy the binary from data/data/com.termux/files/usr/bin
and paste it to data/data/com.termux/files/home
That allowed me to be able to call the help command and not get a packaging error. Even when using su to break out of the terminal's sandbox, I was unable to run the command.
Evidently the way termux stores usr added packages, breaks the logic when executing certain functionality, so this is a good "hack" if you need to see a certain tool's help file
Spoiler: AARCH64 EFI DRIVER
Download the driver from here:
Ubuntu – Error
Unzip the package, and open the folder until you get here:
Then copy the efi driver and adb push it to your arm system folder, in this case I am working on windows 11 arm so the path will be
Code:
adb push QEMU_EFI.fd /data/data/com.termux/files/home/win11arm
We have to add the efi driver to our machine's build directory, as opposed to the usr/share folder as shown in an example i listed earlier, due to us building in Termux.
PROGRAMMER'S NOTES​
QEMU-IMG (QEMU UTILITIES)​
Spoiler: SHOW
QEMU-SYSTEM-X86_64 CPU LIST​
Spoiler: SHOW
QEMU-SYSTEM-ARM 7.0 USER MANUAL PART 1​
Spoiler: SHOW
ARM USER MANUAL PART 2​
Spoiler: SHOW
ARM SYSTEM CPU LIST
QEMU-SYSTEM-AARCH64(ARM64)USER MANUAL ​
Spoiler: SHOW
​
AARCH64 USER MANUAL PART 2​
Spoiler: SHOW
​available cpus
Working on this build now. The very first step involves us using an efi driver. This has been added to the programming notes. The beginner code I am building with has been added to the SOURCES tree. Starting with figuring out WIN11ARM then we build android
If anyone makes anything cool feel free to share, it can be any of the qemu systems.
Spoiler: notes
This will eventually be moved into more relevant areas, as per usual. Just jotting down notes so I don't have to start from scratch.
I'm building based off a guide from here https://futurewei-cloud.github.io/ARM-Datacenter/qemu/how-to-launch-aarch64-vm/
There's been new REFS added to the OP to support knowledge gained from this man's Wonderful post. The programming and code is going to differ based on QEMU being at 7.0 at this point in time.
In order to properly flash the memory sets to the pflash file we are going to create, we will use a system binary called "zero". This can be located on any android device in the dev folder.
These articles are great illustrators of the usefulness (and age!) of this file system, to better understand what we are asking the dd program to do with it
/dev/zero - Wikipedia
en.wikipedia.org
Purpose of /dev/zero?
I tried to cat /dev/zero, and it didn't seem to do anything. I googled /dev/zero, and it says it's basically a blank file with infinite size. Is cat printing an infinite number of non-existent char...
unix.stackexchange.com
Im having troubles understanding what a pflash exactly is besides the qemu documentation https://wiki.qemu.org/Features/PC_System_Flash
Qemu won't load images if they aren't formatted RAW and the semantics in doing so with a pflash in qemu 7.0 are different. This is such an obscure area, it's hard to find everything... so kinda making it up as we go haha
The install code is having this error
https://forum.xda-developers.com/attachments/dd-png.5593745/
dd: different unit for bs, skip and count?
I am trying to copy a partition from an entire disk image. This command is working: dd if=image.iso of=test bs=512 skip=1161215 count=32768 In order to increase the speed, I'd like to set a bigge...
askubuntu.com
I have no idea what I am doing, so if there is someone smarter that can help enlighten us on how to do things properly that would be awesome. Otherwise I will continue to poke, prod, break, and remake until something works xD
taking a break on this for a few days to focus on the shield again. will be back~! <3
David Bombal has a good guide up how to get Kali Linux Nethunter on any android device (no root needed) using termux, and in it he showcases a different vnc app. I will investigate this share in the future. Just saving it and sharing it <3 https://davidbombal.com/kali-linux-nethunter-android-install-in-5-minutes-rootless/
Have been looking for a proper guide to actually emulate x86-based Windows on modern ARM64 Snapdragon chips for years, and somehow you descended from xda heaven. Thank you, I'll be having a fun few weeks of spare time now. I will report any progress or issues I encounter down the road.
Hi. I'm trying to find the guide to use a pre-made image (Tiny7.img) instead of creating a new for starters to get a grip on stuff, but I can't find it.
Could you help me? @jenneh
@tehdomic sorry it got buried in everything. the direct google link is here https://drive.google.com/file/d/12uP_rIEoPzqHqh0UqbsLDw6IqYbtNY4K/view
the comment the info is under here with the instructions, they are in the download area.
How To Install Windows Or Linux ISOs on your Android Devices - Windows 10 Nox Lab + Working Arm Distros for your phone using Termux
Update: A new thread is created to house "premade" linux distros. The first premade environment is an Ubuntu distro, installed using proot-distro in termux, Takes only a few minutes to restore the backup, else instructions are provided to build...
forum.xda-developers.com
Spoiler: show

Categories

Resources