[Q] GEN9 / GEN8 Is it possible to start/add/include adb with initramfs.cpio.gz - Gen9 Android Development

Hi guys,
I prefer post this question here, there are more active dev.
I have successfully boot the kernel Gen9 on my A70S2 (froyo-gen8).
I can boot kernel and run initramfs.cpio.gz, but partitions seems to be different than on my tab. (mmcblk1p1 not found)
Is there any possibility to include and run adb (adbd deamon) in the initramfs only?
What is necessary to have it working? (which driver must be call)
Each times that i try to include it, my initramfs won't start? (it's not the method to uncompress the archive, it works when i change a little thing)
Thanks for your help!!
Bizcuite

bizcuite said:
Is there any possibility to include and run adb (adbd deamon) in the initramfs only?
Click to expand...
Click to collapse
It should be possible, I've done this on Samsung i5700 ( to debug buildroot linux image)
bizcuite said:
What is necessary to have it working? (which driver must be call)
Click to expand...
Click to collapse
You need:
-adbd binary
-/system/bin/sh (or was it bash?) binary- this path is hardcoded into the adbd itself, you'd have to include it in initramfs
-start adbd in init script
Notes
-since I don't own Gen9 for quite some time I don't remeber if there's a size limit for initramfs, anyway I'd use a custom build of busybox- sh (in /system/bin) for sure is required
-starting adb service/daemon does not require to use android's init binary
Hope this helps

Related

[DEV][BRAINSTORM] Fully-working CWM Recovery

While the recovery we have at the moment, fruit of the hard work of xantaro, unclecracker and digitalfrost, is enough for most operations there are some things bugging me that is in our interest to fix with the ultimate aim of adding it to ROM Manager and thus get official support.
Current issues:
1. It isn't the latest version of CWM and isn't official.
2. It doesn't have USB mount working.
3. It doesn't have ADB working.
4. It doesn't support EXT4.
Now, I have tried to fix these but recoveries are a new domain for me and at a first attempt I couldn't bring some of these to work. Compiling the latest version was easy and an important first step towards official; however, all others I couldn't do it and I don't think we should talk with koush before fixing all this.
Here are my short attempts:
- For USB mount I defined on the BoardConfig the path for UMS lun0 file. The path seems to be correct and there's no other file in /platform/ as I've found out by running a ls -R. I have no idea why it's not working.
- For ADB, I made sure the persist.adb.service is set to 1 and the init.rc is starting it. This being said, I don't know what's missing. Perhaps this is of interest?
- For EXT4 support I thought it was just a matter of adding alternative FS to recovery.fstab. Seems I was wrong though.
So, does anyone want to join in and help?
This is really new territory to me and I have a quite faint idea of what I'm doing.
A few guidelines:
- Read this to get an idea.
- You'll need CM sources (repo init... repo sync...)
- The CWM recovery source is in /bootable/recovery
- Here is my device source and a patch file for some changes on recovery src *
- Run build commands (. build/envsetup.sh, lunch full_p970-eng, make -j4 recoveryimage)
* If you don't change what I did on the recovery source you won't have a key to select.
Also, I have CWM 4.x at the moment on my OB but since it does the same as the already posted 3.x I don't deem necessary to share it; but if anyone wants, I'll upload it.
I'll join the party when I come from the mini-vacations, hope there'll be some progress meanwhile!
Great
i'll try to do some help,maybe little
If anyone wants you can request a pull from my source.
Also, here's a flashing CWM 4.x. I renamed it Nova recovery for the lulz.
http://www.multiupload.com/R7WGNYTL7G
Changes on the Source to get selectbutton to work shouldn´t be necessary. Adding "BOARD_HAS_NO_SELECT_BUTTON := true" to boardconfig.mk suffices to get selectbutton to work.
EXT4 Backup and Restore worked for me after editing the fstab file.
For the ADB and USB mount problem i have no Idea what is missing. Like you said, adb daemon should get started througt the initscript.
BTW. seems like the Progressbar isn´t working on the newer Versions of CWM
xantaro said:
EXT4 Backup and Restore worked for me after editing the fstab file.
Click to expand...
Click to collapse
Could you release a new version or tell us how to do it? Thanks
To get EXT4 working in my O2X builds my /data line looks like this:
Code:
/data ext3 /dev/block/mmcblk0p9 NULL auto
xantaro said:
Changes on the Source to get selectbutton to work shouldn´t be necessary. Adding "BOARD_HAS_NO_SELECT_BUTTON := true" to boardconfig.mk suffices to get selectbutton to work.
Click to expand...
Click to collapse
I thought the flag wasn't suffice. Thanks.
Rusty! said:
To get EXT4 working in my O2X builds my /data line looks like this:
Code:
/data ext3 /dev/block/mmcblk0p9 NULL auto
Click to expand...
Click to collapse
Nice tip, I'll try.
knzo said:
While the recovery we have at the moment, fruit of the hard work of xantaro, unclecracker and digitalfrost, is enough for most operations there are some things bugging me that is in our interest to fix with the ultimate aim of adding it to ROM Manager and thus get official support.
Current issues:
1. It isn't the latest version of CWM and isn't official.
2. It doesn't have USB mount working.
3. It doesn't have ADB working.
4. It doesn't support EXT4.
Click to expand...
Click to collapse
Hey,
I know this is an old thread but still if u have not resolved the problem with ADB and USB follow these instruction:
Before we start:
My mobile is Spice Mi-410 (Qualcomm made), also known as Cherrymobile magnum, Wellcomm, Motorola triumph in different countries. So may be these tweak will not work with your device. (But you can give it a try )
I hope you know how to unpack recovery.img of your device (or boot.img if your recovery ramdisk is stored in boot.img like Xperia Arc) if not then follow this guide to unpack recovery.img and extract recovery ramdisk into a folder.
Tweak
For ADB: Open init.rc file from recovery ramdisk/initram using any editor of your choice
Put this line at the end of "on init" section
Code:
write /sys/module/g_android/parameters/product_id ####
where #### should be replaced by your device's product id.
(if you dont know what it is then connect your mobile to PC and issue "lsusb" command in ubuntu terminal, you should see something like this
Bus 001 Device 027: ID 0489:c000 Foxconn / Hon Hai
Here c000 is my devices product id and Foxconn is my device's manufacturer)
Though /sys/module/g_android is not present in our device but this worked for me.
Please note that the device id is case sensitive, so write what you see on PC
For USB: For this add following line at the end of "on boot" section in init.rc file
Code:
echo 1 > /sys/class/usb_composite/usb_mass_storage/enable
For your device first confirm the location of /sys/class/ ###### / ####/usb_mass_storage/enable
Since this location vary from device to device.
This should enable usb storage mounting from recovery.
Best of luck!!
One option for load rootfs image in native mode is necesary
enviado

[Dev] Modify stock image script

In case someone would like to build an own image based on the stock firmware,
I wrote a script that performs the neccessary steps (which where mostly described at the xda-forums) automatically on a linux based system.
It is very raw, and is not well optimized. It also is using many sudo calls for creating and modifying the image. Maybe someone has another, better solution.
Usage:
Download and unpack the ExtractAOS archive:
Code:
tar xfj ExtractAOS.tar.bz2
At first you need to place a AOS update file (firmware_archos_it4.aos) into the "dl" folder.
Then copy a busybox.tar.bz2 file, which contains the statically linked binaries of busybox (no subdirectories) inside the archive:
Code:
ash
busybox
cat
chgrp
...
Also make sure that following tools are installed on your system:
unsquash
unzip
tar
Then start the main script:
Code:
./unpackAOS
You will see a menu like this:
Code:
---------- Unpack and Modify Archos image -----------
1 Cleanup: Umount all mounted devices and delete all created files.
2 Download needed packages
3 Setup build directory
4 Create new Ext4 loop image and mount it to MOUNT_DIR
5 Extract AOS image
6 Copy AOS image contens into /data/ExtractAOS/archos_update_folder
7 Modify image in /data/ExtractAOS/archos_update_folder
8 Finish image and unmount it
88 Perform step 3-8 automatically
99 Exit
Then download needed tools via menu item "2".
If the download are successfully done, then you can enter "88"
to build your own archos.ext4.update image file.
Notes:
I'm on a 64 bit system. Letama seems to provide binaries also for 32 bit sytems. In that case, you can modify and set the correct binary within the script file.
This script is intended to provide a base for developers which want their own customisations
Special thanks to:
letama
surdu_petru
Thanks i will try it next weekend
Gesendet von meinem HTC Desire mit Tapatalk 2
Quallenauge said:
Also make sure that following tools are installed on your system:
unsquash
unzip
tar
Click to expand...
Click to collapse
On which firmwares did you test this script?
There was an error in squashfs header in 4.0.5-4.0.6 FW (including test releases)- androidmerged.squashfs.secure could be mounted as loop but not extracted
Hi,
I builded my image based on the current 4.0.7 aos-update file.
I'm using archlinux 64 bit.
Which arch are you using? Can you please verify that the correct extractAOS binaries are downloaded within the script?
The script doesn't mount the androidmerged.squashfs.secure as loop device, but copies all the data from androidmerged.squashfs to a temporary folder named "output_folder".
Can you please provide a console output? Maybe there is some more information?...
Quallenauge said:
Hi,
I builded my image based on the current 4.0.7 aos-update file.
I'm using archlinux 64 bit.
Which arch are you using? Can you please verify that the correct extractAOS binaries are downloaded within the script?
The script doesn't mount the androidmerged.squashfs.secure as loop device, but copies all the data from androidmerged.squashfs to a temporary folder named "output_folder".
Can you please provide a console output? Maybe there is some more information?...
Click to expand...
Click to collapse
I didn't test the script (I stick to 3.2.80).
For modifying I use LeTamas' "manual" method- correct binaries are present (linux 32bit). Unpacking .aos file works fine but I had problems with unsquashfs (header error in =<4.0.6 fw) so the only option was mount -o loop.
If it works for 4.0.7= Archos corrected the error
Hi!
I've just downloaded the 4.0.6 version from archos servers.
Code:
h**p:// update.archos.com/9/gen9/gen9_4.0.6/firmware_archos_it4.aos
Unpacking of the squashfs still works here...
Maybe you missed the needed steps:
Code:
cd $BASEPATH/firmware_archos_it4/root/data
dd if=androidmerged.squashfs.secure of=androidmerged.squashfs bs=256 skip=1
if [ -d output_folder ]; then
rm -f output_folder
fi
unsquashfs -d output_folder androidmerged.squashfs
Maybe stupid question but why we need this busybox ( this archive actually is missing)? I think there is busybox already from the archive is that archive is rooted or give us something more?
Hi,
I saw that another customized roms contains an updated busybox, which can provide more features.
(Honestly, I don't know which feature is it worth to replace the builtin busybox... . :angel
If you want to build an image without this step, just comment out the busybox call.
The busybox archive is missing, because I don't know If I have the permission to include a compiled (from other people) busybox by default.
[Dev] CM9 Mod Extension
Help!
I can't wait to try out the final build from Anybody interested in testing a CM9 super-alpha build in a week or so?, so I decided to try out a modification of the stock rom with CM9 by myself. And yes, today zygote has startet and I got a screen =)
I would like to share with you, what I did and I hope that you can give some code extensions to build a better mod script.
So, let's go:
1) Compile cyanogen mod
Install prerequisites
(I used Ubuntu Precise 32bit in a chrooted environment)
Then perform like suggested a repo init/sync:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
Then perform a compile action:
Code:
. build/envsetup.sh
lunch full_panda-eng
mka
PS: I had to modify the cyanogen_root/external/webkit/Android.mk
because there where build errors:
Code:
# Build the performance command line tool.
#include $(WEBKIT_PATH)/android/benchmark/Android.mk
Get some coffee I full build will take about an hour (on my system).
2) Unpack Archos stock image
You can use my tool at #1 of this thread!
PS: I used 407 stock image...
3) Create a loop image and mount it into a folder
You can use my script for that.
4) Get my new archive and unpack it.
Go into that folder and modify the bash script Porting.sh to match the folder paths:
Code:
export CYANOGEN=/cynogen_mod/out/target/product/panda
export STOCK=/ExtractAOS/firmware_archos_it4/root/data/output_folder/
export OUT=/Android/Development/mount
Run the script as root!
Code:
sudo ./Porting.sh
You get a file system contents in $OUT. Unmount the loop directory and
load it into the media update path as usual:
Code:
adb push archos.ext4.update /data/media/ && adb reboot
That's it! You should get a CM9 desktop.
------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
That was the good news! The bad:
The current state is a proof of concept.
I'm really hope that you can contribute to the modding script: I'm not an android expert!
Dirty technical details:
I had to use the existing vendor libraries especially the graphics drivers (I tried to use the panda binaries, with no luck :-/ ).
I moved them into the /system/vendor/lib folder and symlinked the libraries to /system/lib. This way it seems to much cleaner.
I modify the init.rc script to mount the data directory into /data2 to not interfere with existing archos installation. Later we should be able to point to that directory again. (Hint: to update the development you must use a adapted adb update command:
Code:
adb push archos.ext4.update /data2/media/ && adb reboot
From the first test, I saw that I have no real touchscreen, it worked like a "mouse" controlled environment. Maybe because the panda board has an mouse as input device.
Thanks.
PS: I'm curious how JackpotCalvin has solved the CM9 integration, It sounds way better than my solution...
Nice one
Some thoughts:
-why do you copy $STOCK/usr/bin/[binary name] when later all $STOCK/usr dir is copied?
-there should be no need to place PowerVR in /system/vendor/lib/[...], /system/lib/[...] should work fine
-check prelinks for existing libs and adjust prelink map for [repo path]/device/ (this may not be necessary, last system I compiled was Froyo)
I'm stopping my efford because I'm at a point, where I learned that just replacing the files between both sources (Panda Board CM9 builded binaries and Archos Stock ROM) is not a 100% solution.
I resolved my input devices setup, by copying the corresponding icd (and other) foles to the output folder. Then I had unresolved issues by getting WLAN to work. I found out, that in libandroid.so and libandroid_legacy.so are coded the modules which are needed for WIFI. Panda board is compiled w/o WIFI, so there are no
wifi modules loaded. (After I load wl12xx_sdio.ko manually by using insmod, the wlan was functional!).
The solution IMHO must be, to compile an adapted CM9 with all hardware specific settings. Maybe the customized files can also moved inside the device configuration directory so that the merge script is obsolete (my hope).
So I decided to either to wait until JackpotClavin is posting his CM9 configuration files
Code:
http://forum.xda-developers.com/showpost.php?p=28439197&postcount=80
or to learn how to make a new device on CM which maches our Archos device. (Maybe someone else can give me some archos specific instructions).
Update: Great! JackpoClavin has provided sources =)

[TOOL] Optimus Toolkit 6 in 1 v1.1.1 | P990-Linux|Root-Flash-Backup-Ap/KDZ Toolkit

Optimus Toolkit 6 in 1 v-1.1.1 - Linux
​
After a few month programming here you have this 6 in 1, we say that it is the counterpart in Linux of the "All in one", though it seems.
In you program have included 6 applications essential for the day-to-day management of Optimus, partitions with the new LG-ICS configuration or the former LG-GB.
Backup/restore of the whole system, and also of the SDs, both internal and external, and stores them in ZIP format.
The program includes:
Uncompress KDZ
Unpacking AP
Backup
Restore
Flash ROM (NVflash)
Rooted
Three languages, Spanish, English and German, I hope that it will soon translate into French, Italian and Portuguese
Click to expand...
Click to collapse
An example of use:
You have a ROM format KDZ and does not the Windows program rather than failing, because well, you copy the kdz within the kdz_folder folder, run the Optimus_Toolkit 6 in 1 and choose option 1- UnPack KDZ.
After a few seconds you have the AP and CP files to Flash with Smartflash. Oh, that doesn't want to boot windows?, no problem, use option 2.- UnPack AP, and then option 4.-Flash ROM for flashing by NVflash ROM KDZ just unpack.
But before Flash want do a backup of the system, as with the 3.- Backup/Restore option, this is in Optitool 2, backup/restore DATA, SYSTEM, etc.
Click to expand...
Click to collapse
The operation is very intuitive, just follow the instructions on screen.
The program does many things, and others will in the future.
I hope that you go reporting if you detect a fault.
Changelog
V-1.1.1
- Support for German language, thanks to Cupacabra - in this version you can change language from the main menu
V-1.1.0
- Support for any language. I have included a language file that you can go adding translations to other languages - error correction. -Added you fixing of current route to run on MAC (by drag0njoe) - the only language menu exits the first runs, the language selected is memorised.
V-1.0.2 R
- UnPack KDZ - now is can copy more than one KDZ within kdz_folder/, the program will create a menu with the KDZ that is inside the folder. - Added limits so that an opcionque can not be pressed does not exist. - Automatically adapts to options with one or two figures.
- Flash ROM - remodelling of the Flash ROM menu and correction of minor errors
V-1.0.2
- Menu flasher - Two new options, [5] Flash RECOVERs and [9] Flash KERNELs. - Alternative kernels copied them to kernel folder / and the recoverys to the recovery folder. - The program will detect the kernels and recoverys withi
V-1.0.1
- Correction on menu flashing, by drag0njoe
- Added flashing Kernel, by drag0njoe
V-1.0 stable
- Fixed bug when unpacking AP
- Fixed bug when unpacking KDZ
- Fixed bug in detection of ROM
- English version, corrected spelling errors.
- Revamped graphic look.
Click to expand...
Click to collapse
CREDITS
• [email protected] introduced the 'LGExtract.exe'. the encrypyted/compressed kdz can be extracted/decrypted to AP.bin/CP.fls by LGExtract.exe
• AP.bin extractor (win32/linux)
• xonar_ made BIN/FLS extractor
and release source
• (original Java version by xonar_)
• (win32 C port by navossoc)
• [TOOL] LGExtract 0.2.1 by navossoc
Click to expand...
Click to collapse
DOWNLOAD
Optimus_Toolkit_6-in-1_V-1.1.1.tar.gz - 25.64 MB
Nice bro,
It's good to have another alternative toolkit for linux users.
New version corrected, improved and stable
Thanks for your work and collection, as a regular linux user it's very useful for me.
I have some recommendations which are might be improve the linux users experience.
I suggest you to use some kind of compression which is takes care about the extended *nix attributes, like the executable bit. For example, the 7zip and the tar.gz will be perfect.
But if you feel better, that's no problem using the proprietary rar format, in this case I have to execute these commands:
Code:
chmod +x scripts/*.sh
chmod +x tools/7za
chmod +x tools/adb_linux
chmod +x tools/adb_mac
chmod +x tools/cabextract
chmod +x tools/extract
chmod +x tools/nvflash
Or, if you think you can implement such a thing like these into your menu.
Not a big problem, just an idea how to make your work more user friendly.
The other, which is also just a minor thing, in the tools/flash_en.sh I found that in the Opti nvflash command line there is a tools/fastboot.bin, which is not corrected to the fastbootICS.bin file, so the nvflash of course does not work with.
Lastly, please consider about integrate the recovery from pengus (CWM non-touch) and tonyp (CWM touch and TWRP soon), and to implement the kernel flashing only (ex. for the kernel testers). I attached my version of your flash_en.sh with Flash ROM option 8 (because I am successfully stucked on boot with a new kernel ).
Thank you for your work!
excellent useful tool!
drag0njoe said:
Thanks for your work and collection, as a regular linux user it's very useful for me.
I have some recommendations which are might be improve the linux users experience.
I suggest you to use some kind of compression which is takes care about the extended *nix attributes, like the executable bit. For example, the 7zip and the tar.gz will be perfect.
But if you feel better, that's no problem using the proprietary rar format, in this case I have to execute these commands:
Code:
chmod +x scripts/*.sh
chmod +x tools/7za
chmod +x tools/adb_linux
chmod +x tools/adb_mac
chmod +x tools/cabextract
chmod +x tools/extract
chmod +x tools/nvflash
Or, if you think you can implement such a thing like these into your menu.
Not a big problem, just an idea how to make your work more user friendly.
The other, which is also just a minor thing, in the tools/flash_en.sh I found that in the Opti nvflash command line there is a tools/fastboot.bin, which is not corrected to the fastbootICS.bin file, so the nvflash of course does not work with.
Lastly, please consider about integrate the recovery from pengus (CWM non-touch) and tonyp (CWM touch and TWRP soon), and to implement the kernel flashing only (ex. for the kernel testers). I attached my version of your flash_en.sh with Flash ROM option 8 (because I am successfully stucked on boot with a new kernel ).
Thank you for your work!
Click to expand...
Click to collapse
I will take into account the compression, I will use the native tar.gz.
On line 101 of your flash_en.sh it refers to tools/recovery_ics-20121230.img
That recovery is that?
I'm hoping to TWRP, is a recovery which I like very much, I tried to adapt it to ICS based on modifications made by Stefan in the CWM, but I only got a tremendous brick ), is that something different from CWM works
If you think of any suggestions, they will be well received.
Stefan Gündhör said:
excellent useful tool!
Click to expand...
Click to collapse
Blessed are the eyes that you read
Homero2 said:
I will take into account the compression, I will use the native tar.gz.
Click to expand...
Click to collapse
Thank you! Maybe the newer Linux users also like it.
Homero2 said:
On line 101 of your flash_en.sh it refers to tools/recovery_ics-20121230.img
That recovery is that?
Click to expand...
Click to collapse
Yes, this is the latest recovery from pengus77, I am using his ROM, so I think this one is better for me.
Homero2 said:
I'm hoping to TWRP, is a recovery which I like very much, I tried to adapt it to ICS based on modifications made by Stefan in the CWM, but I only got a tremendous brick ), is that something different from CWM works
If you think of any suggestions, they will be well received.
Click to expand...
Click to collapse
I tried it too, the result was useless, so I really understand you
Maybe sooner or later somebody has some time to make it for the ICS layout too.
Thank you again for your excellent work, it is really useful for me!
NEW V-1.0.2
- Menu flasher - Two new options, [5] Flash RECOVERs and [9] Flash KERNELs. - Alternative kernels copied them to kernel folder / and the recoverys to the recovery folder. - The program will detect the kernels and recoverys withi
Can't get it working.
Tried running it on a mac but it ends with an End of process after selecting a language:
Escoja una opción/Type an option: [1-2,X]2/Users/ruslanmirsalihov/Desktop/Toolkit_ICS-Root_Stock-v-1.0_by_Homero/root: line 18: tools/en.sh: No such file or directory
logout
On ubuntu it says it was unable to determine my phone.
Any help?
If the "unable to determine my phone" means that when you start the flashing process you get "Nvflash started" "USB device not found" in Ubuntu, I think the problem is that you using wrong cable, or you not plug the phone into the USB while both of the volume keys pressed. Please provide exact error message and the exact menu option you used in order to get your problem solved.
About the mac you need to start Terminal from Utilities and start the script from here.
Or, alternatively, I attached a fixed menu which is working with double-click, just download and replace it your menu file with the attached one (there is a new function which doing the same thing, cd'ing into the script directory, so I just made nearly nothing, but working in linux and mac, and should working in cygwin too.)
But note that, in mac you cannot use the flashing options because of AFAIK there is no nvflash for mac. But you can use the others, such as the rooting and the back up with ADB is working.
This function (fixpath). Should we put it in the script, or just on the menu?
New version 1.1.0, with support for multiple languages, the languages are included in a separate script file.
The program memorizes the selected language, and the language menu will not appear any more
New version, with new options and I think and hope that all errors are corrected.
THanks
At last playing with my android P990 without boot Windows thanks !!!
Does this work with the P880 (Optimus 4X) as well, or is it specific to the P990?
nevermind.......
Phew, search how to nvflash!!!
Sent from my LG-E610 using xda premium
SuperSkill said:
Phew, search how to nvflash!!!
Sent from my LG-E610 using xda premium
Click to expand...
Click to collapse
Newbie here trying to flash my o2x however I am not able to enter APX mode I guess. I've removed the battery and I hold down the volume up/down and plug into USB but nothing appears.. it just says no USB devices were found? Anyone else have this issue, not sure what I am missing here but pretty hard to do anything if device is not recognized. thanks.
archish said:
Newbie here trying to flash my o2x however I am not able to enter APX mode I guess. I've removed the battery and I hold down the volume up/down and plug into USB but nothing appears.. it just says no USB devices were found? Anyone else have this issue, not sure what I am missing here but pretty hard to do anything if device is not recognized. thanks.
Click to expand...
Click to collapse
Try the all in one tool kit by spyrosk
It has the menu for installing the drivers which you need
Install the apx drivers
Sent from my LG-P990 using xda premium

[Installer] SMACKME 2.1 (kexec or moboot, native Linux or Android - with recovery!)

SmackMe 2.1 Installer
Read the whole post before doing anything.
Sorry this has been so long in the making. It underwent several rewrites and design changes.
SmackMe now supports recovery - individual recoveries will be installed along with kexec kernels - don't worry about the graphical corruption.
Supported Android Files:
Android 2.2: Froyo-*.zip|froyo-*.zip
Android 2.3 / CM7.1: update-cm-7*.zip|update-cm7*.zip|cm-7*.zip
Android 4.0 / CM9: update-cm-9*.zip|cm-9*.zip|update-cm9*.zip
Android 4.1 / CM10: cm-10*.zip|update-cm-10*.zip|update-cm10*.zip
Android 4.2: Evervolv-*.zip|evervolv-*.zip
Google Apps for Android: gapps-*.zip
Supported native-Linux Files:
Ubuntu: TouchPadBuntuRootfs*.tar.gz|TouchPadBuntuRootfs*.tgz
Split Ubuntu: TouchPadBuntuRootfs1210*.tar.gz.[123]|TouchPadBuntuRootfs1210*.tgz.[123]
Arch Linux ARM (untested but should work): ArchLinuxARM-touchpad*.tar.gz|ArchLinuxARM-touchpad*.tgz
Split Arch Linux: ArchLinuxARM-touchpad*.tar.gz.[1-4]|ArchLinuxARM-touchpad*.tgz.[1-4]
Debian (which fell off the face of the Earth, apparently, so also might not work): bodhi-touchpad-*.tar.gz|bodhi-touchpad-*.tgz
Split Debian: bodhi-touchpad-*.tar.gz.[123]|bodhi-touchpad-*.tgz.[123]
Fedora (ported by me, will release this month): HPTPFedora*.tar.gz|HPTPFedora*.tar.gz
Split Fedora: HPTPFedora*.tar.gz.[123]|HPTPFedora*.tar.gz.[123]
Slackware (ported by me): HPTPSlackware*.tar.gz|HPTPSlackware*.tar.gz
Split Slackware: HPTPSlackware*.tar.gz.[123]|HPTPSlackware*.tar.gz.[123]
Supported Miscellaneous Files:
uImage files: uImage.*
kexec kernel tarchives: kexec-*.tar
moboot (0.3.5, 0.3.8 tested only): moboot*.zip
You will need:
Computer with the HP webOS SDK installed, including Novacom and Novaterm.
A TouchPad (which I will refer to as HPTP)
All your files to install.
Patience. An install of the whole shebang on my 32GB test unit took almost 40 minutes.
Instructions for use:
Create a directory in the USB storage of your HPTP with the name "sminstall".
Copy all the files you want to install from your PC (refer to the lists above) into that directory.
Boot your HPTP into recovery mode.
Run the following command in your Terminal or Command Prompt:
Code:
novacom boot mem:// < uImage.SmackMe2
You should see the USB logo get replaced by the HP logo, then two Tuxes (Linux's mascot, the penguin - one for each CPU coer on the SoC) and scrolling text. Wait for the tablet to reboot to moboot. If you encounter any issues, please remember that I AM NOT RESPONSIBLE FOR YOUR ACTIONS, but I will certainly do my utmost to fix anything that I made. It is unlikely to brick your TouchPad using either this installer or ACME Installer. The worst that can theoretically happen is the "www.palm.com/ROM" screen, which IS NOT a brick, and IS EASILY FIXABLE.
DOWNLOADS
The main installer (what you feed into Novacom):
uImage.SmackMe2 - https://docs.google.com/file/d/0B4WUjKii92l2T1k5THhKNmNPVEk/edit?usp=sharing
Buiidables for the main installer: http://www.mediafire.com/?it96af7fvp39l9c
To use kexec for any OS, you need both "uImage.kexec" and the "kexec-<OSNAME>.tar" files.
MAIN FILE (uImage.kexec): https://docs.google.com/file/d/0B4WUjKii92l2RHJoNE93c2dVRlU/edit?usp=sharing
Android 2.2: https://docs.google.com/file/d/0B4WUjKii92l2d2cwQlBtVVd4aGM/edit?usp=sharing
Android 2.3: https://docs.google.com/file/d/0B4WUjKii92l2UGtETzBwNnNvckU/edit?usp=sharing
Android 4.0: https://docs.google.com/file/d/0B4WUjKii92l2UDc2cVZ2TjBWM2s/edit?usp=sharing
Android 4.1: https://docs.google.com/file/d/0B4WUjKii92l2d3g0U3p6c0l4NFk/edit?usp=sharing
Android 4.2: https://docs.google.com/file/d/0B4WUjKii92l2dlFzcFBacThSVXc/edit?usp=sharing
Ubuntu 12.10 final: http://www.mediafire.com/?uowhfd1sx1pppoa
Ubuntu 13.04: kexec kernel already included in the rootfs, DO NOT try to extract the 12.10 one on top!
Arch Linux: coming soon
Slackware: http://www.mediafire.com/?8kow2lrwnamuui1
Fedora: coming soon
dude amazing work really love to get all of this working
:crying:
Arch Linux: coming soon
Slackware: coming soon
Fedora: coming soon
netkillercat said:
:crying:
Arch Linux: coming soon
Slackware: coming soon
Fedora: coming soon
Click to expand...
Click to collapse
Detailed status:
Arch Linux should be easy once I fit the (LZMA'd) kernel+ramdisk under the 4MB limit.
Slackware is practically done-de-done-done but I have to remove some personal settings and make X launch by default.
Fedora is the farthest back, I haven't even yet compiled ts_srv for it.
So this installer creates the kexec<OS>files.tar from the roms that you supply it? Or are you simply stuck with the ones you provided?
sounds great man i have 32gig tp for testing let me know
castrwilliam;37601915]Detailed status:
Arch Linux should be easy once I fit the (LZMA'd) kernel+ramdisk under the 4MB limit.
Slackware is practically done-de-done-done but I have to remove some personal settings and make X launch by default.
Fedora is the farthest back, I haven't even yet compiled ts_srv for it.
The kexec-<OS> files are documented inside the ramdisk on the init script, I forgot to copy that documentation here. Nothing really strange has to be done to make them, but since it requires the might of a desktop PC to compile the kernel, I thought it'd be good to include the ones I've made so far.
(from /etc/scripts/kernel.sh of the ramdisk of SmackMe)
# install_kexec:
# $1: kexec tarchive
#
# these tarchives are always uncompressed and contain the following files:
# vmlinuz-<name> = the zImage to boot
# initrd.img-<name> = the initrd to boot
# boot.cfg = kexecboot boot.cfg file.
# smackme.cfg = installation parameters:
# - ROOTDEV=/dev/store/<lvname> the root device to install this on.
Click to expand...
Click to collapse
Basically, you need to recompile the (2.6.35 only) kernel with the patch from my kexec post, and use the zImage (NOT THE uImage) as vmlinuz-whatever. Then, you need to extract the old uImage from the same OS with uimage-extract from the moboot distribution. Use the "ramdisk.img" that is created in your current directory as "initrd.img-<name.>
Then, create a kexecboot config file of the form:
Code:
LABEL=<what shows up on the boot menu>
KERNEL=<what you named the kernel>
INITRD=<what you named the initrd>
APPEND=root=/dev/ram0
and save it as "boot.cfg".
Lastly, make a one-line smackme config file named smackme.cfg. ROOTDEV depends on what LVM volume you want SmackMe to store the kernel on. List:
Android 2.2: /dev/store/android22-system
Android 2.3: /dev/store/android23-system
Android 4.0: /dev/store/android40-system
Android 4.1: /dev/store/android41-system
Android 4.2*: /dev/store/android42-system
Ubuntu: /dev/store/ubuntu-root
Slackware*: /dev/store/slackware-root
Fedora*: /dev/store/fedora-root
Arch*: /dev/store/arch-root
Debian*: /dev/store/debian-root (or possibly bodhi-root, idk)
* means the tarchive for that OS hasn't been posted on my first post yet.
Lastly, put the four files (vmlinuz, initrd, boot.cfg and smackme.cfg) in an empty folder and do:
tar -czf ../kexec-<name>.tar *
Move it to the sminstall dir on the HPTP and run SmackMe to test.
Summary (ubuntu 12.10 host AND guest with the CodeSourcery toolchain in $PATH used as an example):
Code:
#setup
mkdir work
mv <PATH_TO_KEXEC_PATCH> work
mv <NORMAL_UBUNTU_KERNEL_UIMAGE> work
cd work
# compile kernel
git clone git://github.com/BodenM/ubuntu-kernel-tenderloin
cd ubuntu-kernel-tenderloin
patch -p2 < ../decomp-copy-atags.diff
export ARCH=arm
export CC=arm-eabi-gcc
make tenderloin_defconfig
make -j8 zImage
cd .
# extract ramdisk
git clone git://github.com/jcsullins/moboot
cd moboot/tools
gcc -lz -o uimage-extract uimage-extract.c
cd ../..
uimage-extract uImage.Ubuntu
#make boot.cfg file
echo 'LABEL=Ubuntu 12.10 final' > boot.cfg
echo 'KERNEL=vmlinuz-2.6.35-ubuntu' >> boot.cfg
echo 'INITRD=initrd.img-2.6.35-ubuntu' >> boot.cfg
echo 'APPEND=root=/dev/ram0' >> boot.cfg
#make smackme.cfg file
echo 'ROOTDEV=/dev/store/ubuntu-root' > smackme.cfg
#generate kexec tarchive
mkdir kexec
mv hp-kernel-tenderloin-ubuntu/arch/arm/boot/zImage kexec/vmlinuz-2.6.35-ubuntu
mv ramdisk.img kexec/initrd.img-2.6.35-ubuntu
mv *.cfg kexec/
cd kexec
tar -czf ../kexec-ubuntu.tar *
BTW, the kexec package is only half the story, you still need to copy the rootfs tarfile (native) or zip file and gapps (Android).
It worked but....when I get to Kexecboot I can't select anything? The up/down vol key works but the home button will not....
n/m....figured it out its the power button instead of home..... working good!
Re: [Installer] SMACKME 2.0 (kexec or moboot, native Linux or Android)
Does your version of Ubuntu contain the same bugs as the Ubuntu already posted in the forums?, and if I may ask what bugs are in your other Linux ports?
Sent from my Nexus 10 using xda app-developers app
My version of Ubuntu has audio and usability enhancements, as well as being lean/mean and faster due to the armhf architecture.
It's available near the end of the Ubuntu thread, make sure you get 12.10, "Final" and not "Beta".
In fact, I haven't tested my Ubuntu kexec tarchive with anyone else's implementation. Feel free to try and respond back with 11.10 or 12.04, or even my 12.10 beta.
Everyone, Slackware should be up by the time you read this post.
Little help please just in case is this right
just to make it clear for us dummies out here
novacom boot mem:// < uImage.SmackMe2 thats it right?
Re: [Installer] SMACKME 2.0 (kexec or moboot, native Linux or Android)
Hey castrwilliam nice job
I have a question. I already have cm10 and webos installed and want to get ubuntu 12.10. But i always had a problem with kernel panic error. So i came across your recent post. Can i just follow your instructins for ubuntu or do i have to install the rest too? I already have the moboot installed. Thanks for your response
sent from my hp touchpad 32gb dual boot CM10
just in case Waiting for some help
:silly::silly::silly::silly:
netkillercat
This is how I did it and it worked just fine:
In my sminstall folder on the TP I had: moboot_0.3.5.zip, uImage.kexec, kexec-ubuntu.tar, and TouchPadBuntuRootfs1210v2.tar.gz.
I ran novacom boot mem:// < uImage.SmackMe2, and let it run. Took probably 15 mins at least.
Rebooted, chose kexec, chose Ubuntu, all working ok....
i did move kexec and ubunt uimage to boot
viper3two said:
netkillercat
This is how I did it and it worked just fine:
In my sminstall folder on the TP I had: moboot_0.3.5.zip, uImage.kexec, kexec-ubuntu.tar, and TouchPadBuntuRootfs1210v2.tar.gz.
I ran novacom boot mem:// < uImage.SmackMe2, and let it run. Took probably 15 mins at least.
Rebooted, chose kexec, chose Ubuntu, all working ok....
Click to expand...
Click to collapse
thank you for you for answer
You're adding files that aren't concatenated yet. (hence the .1, .2. and .3 extensions.) This is what you need to do. I'm assuming you're going to be doing this on the same, Windows computer...
Code:
copy TouchPadBuntuRootfs1210v2.tar.gz.1+TouchPadBuntuRootfs1210v2.tar.gz.2+TouchPadBuntuRootfs1210v2.tar.gz.3 TouchPadBuntuRootfs1210v2.tar.gz
copy HPTPSlackware14test1.tar.gz.1+HPTPSlackware14test1.tar.gz.2+HPTPSlackware14test1.tar.gz.3 HPTPSlackware14test1.tar.gz
Transfer the HPTPSlackware14test1.tar.gz and TouchPadBuntuRootfs1210v2.tar.gz files to the TouchPad's sminstall folder, and delete the .1, .2, and .3 files.
Re-run SmackMe. You shouldn't need to redoctor your TP, assuming you didn't create any cm-* LVMs (e.g. by running normal ACME).
By the way, a few hints about my installer:
It saves a log in the sminstall folder if you want to find out what went right or wrong
It NEVER deletes original installation files. It will move them to either "invalid" or "finished" under the sminstall folder, and after you are satisfied with your installation, you can delete them.
It will soon be updated with support for concatenating archives during installation (which would make it work when you put in the .1,.2,.3 files.
I will also add recovery kernels to the kexec packages, and once I have the method for modding them, I will document it. It is likely to be more involved than what can be done by the installer itself, but if it isn't, I will add hotpatch support for uImage recoveries like it does with Android normal uImages.
roger that i see lol
castrwilliam said:
You're adding files that aren't concatenated yet. (hence the .1, .2. and .3 extensions.) This is what you need to do. I'm assuming you're going to be doing this on the same, Windows computer...
Code:
copy TouchPadBuntuRootfs1210v2.tar.gz.1+TouchPadBuntuRootfs1210v2.tar.gz.2+TouchPadBuntuRootfs1210v2.tar.gz.3 TouchPadBuntuRootfs1210v2.tar.gz
copy HPTPSlackware14test1.tar.gz.1+HPTPSlackware14test1.tar.gz.2+HPTPSlackware14test1.tar.gz.3 HPTPSlackware14test1.tar.gz
Transfer the HPTPSlackware14test1.tar.gz and TouchPadBuntuRootfs1210v2.tar.gz files to the TouchPad's sminstall folder, and delete the .1, .2, and .3 files.
Re-run SmackMe. You shouldn't need to redoctor your TP, assuming you didn't create any cm-* LVMs (e.g. by running normal ACME).
By the way, a few hints about my installer:
It saves a log in the sminstall folder if you want to find out what went right or wrong
It NEVER deletes original installation files. It will move them to either "invalid" or "finished" under the sminstall folder, and after you are satisfied with your installation, you can delete them.
It will soon be updated with support for concatenating archives during installation (which would make it work when you put in the .1,.2,.3 files.
I will also add recovery kernels to the kexec packages, and once I have the method for modding them, I will document it. It is likely to be more involved than what can be done by the installer itself, but if it isn't, I will add hotpatch support for uImage recoveries like it does with Android normal uImages.
Click to expand...
Click to collapse
thank you for all your work and your patient with dummies like me asking duh questions lol
well i tried again and got slack installed did not install but it did take up space and i see cm9 in moboot wont boot
cm10 dos not show up in moboot and ubuntu dont show in kexec menu
so thats it after runing it several time all i got was moboot kexce and slack on kexce menu
i get this when i want to use novacom /bin/sh: can't open uImage.SmackMe2: no such file
dam it
got ubuntu and slack installed android is on moboot but wont boot still happy to have slack and ubuntu working kexec is working now for me but no android
i did a lvm lvscan and i see it did not make partitions for android so i guess no harm was done
i removed android from boot folder
ACTIVE '/dev/store/root' [568.00 MB] inherit
ACTIVE '/dev/store/var' [64.00 MB] inherit
ACTIVE '/dev/store/update' [16.00 MB] inherit
ACTIVE '/dev/store/log' [24.00 MB] inherit
ACTIVE '/dev/store/mojodb' [256.00 MB] inherit
ACTIVE '/dev/store/filecache' [136.00 MB] inherit
ACTIVE '/dev/store/media' [22.52 GB] inherit
ACTIVE '/dev/store/swap' [512.00 MB] inherit
ACTIVE '/dev/store/slackware-root' [2.00 GB] inherit
ACTIVE '/dev/store/ubuntu-root' [3.00 GB] inherit
now that i have ubuntu and slack
im good till a get back to a pc
so ubuntu and slack are installed and working
alex1301 said:
i get this when i want to use novacom /bin/sh: can't open uImage.SmackMe2: no such file
Click to expand...
Click to collapse
You need to copy uImage.SmackMe2 to the locations of your novacom driver installation.

compiling kernel for N920C. boot.img won't work

Hey guys,
I have been trying to compile the N920C 6.0.1 from the source. Just one time the kernel worked but only when I didn't change anything in menuconfig. If I change even a word in kernel it wont boot up. What am I doing wrong?
My source file : SM-N920C_SEA_MM_Opensource.zip
My firmware file : SM-N920C_N920CXXU2BPB6_CAM_HiepGia_Samsungviet.zip
I was using NDK for toolchain and Linaro. May there be something missing like a tool or may the toolchain be wrong??
"gcc-linaro-4.9-2015.02-3-x86_64_aarch64-linux-gnu.tar.xz" && "android-ndk-r11b-linux-x86_64.zip"
My Makefile setting was like:
Code:
ARCH ?= arm64
CROSS_COMPILE ?= /root/Desktop/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
After make cmd the output file comes non-compressed called "Image" which is in "arch/arm64/boot/" . Does it make any difference since its not compressed like zImages ?
What is the correct process for converting Image file to boot.img. I have tried both "mkbootimage" and "abootimage" any other way to make boot.img ? Which one is more suitable for my situation?
The process I'm doing is:
Code:
1-)Copy toolchain and source to Kali
2-)Extract kernel source and edit Makefile(for cross_compile)
3-)make ARCH=arm64 ******.defconfig
4-)make menuconfig && save && exit
5-)make ARCH=arm64
6-)Copy "arch/arm64/boot/Image" to another directory
7-)Extract original boot.img from firmware file and then "./split_boot boot.img" with mkbootimg tool
8-)Replace the old kernel file from the boot.img with the new one
9-)Edit /ramdisk/default.prop ====> ro.secure=0 and save
10-)compress ramdisk to gzip
11-) ./mkbootimg --kernel /boot.img-kernel --ramdisk /boot.img-ramdisk.cpio.gz --board SYSMAGIC000KU --base 0x10000000 --pagesize 2048 --ramdiskaddr 0x11000000 -o newboot.img
12-)Tar the newbootimg to flashable zip
13-)Flash it with odin.... Voilaaaa phone won't boot up. Stuck at Samsung Galaxy Note 5 screen:)
What is wrong here?
Please don't tell me to search in forum I have read all of the threads about building kernel. Each one is different from the other so I wanna know what is more suitable in my situation
I know I have asked to many questions but I would appreciate if someone could help me through IRC or some instant messaging service
noone knows ?
Come on guys I have still been waiting for an answer. There are already kernels made by other people in this forum so it must be possible
dewctr said:
Come on guys I have still been waiting for an answer. There are already kernels made by other people in this forum so it must be possible
Click to expand...
Click to collapse
in my opinion it s a problem related to the 'initrd' file..i m diving into chime for now and stucking ; let s converge our efforts to fix all issues with kernel compilation, if u r intressted just pm me.
for info:
initrd provides the capability to load a RAM disk by the boot loader.
This RAM disk can then be mounted as the root file system and programs
can be run from it. Afterwards, a new root file system can be mounted
from a different device. The previous root (from initrd) is then moved
to a directory and can be subsequently unmounted.
initrd is mainly designed to allow system startup to occur in two phases,
where the kernel comes up with a minimum set of compiled-in drivers, and
where additional modules are loaded from initrd.
This document gives a brief overview of the use of initrd. A more detailed
discussion of the boot process can be found in [1].
Operation
---------
When using initrd, the system typically boots as follows:
1) the boot loader loads the kernel and the initial RAM disk
2) the kernel converts initrd into a "normal" RAM disk and
frees the memory used by initrd
3) if the root device is not /dev/ram0, the old (deprecated)
change_root procedure is followed. see the "Obsolete root change
mechanism" section below.
4) root device is mounted. if it is /dev/ram0, the initrd image is
then mounted as root
5) /sbin/init is executed (this can be any valid executable, including
shell scripts; it is run with uid 0 and can do basically everything
init can do).
6) init mounts the "real" root file system
7) init places the root file system at the root directory using the
pivot_root system call
8) init execs the /sbin/init on the new root filesystem, performing
the usual boot sequence
9) the initrd file system is removed
Note that changing the root directory does not involve unmounting it.
It is therefore possible to leave processes running on initrd during that
procedure. Also note that file systems mounted under initrd continue to
be accessible.
---------- Post added at 12:26 PM ---------- Previous post was at 12:18 PM ----------
did u try with latest ubertc toolchain with latest gcc 5.3 compiler?
pm me for info
it is nice to see that someone has also been interested in this thing. Even though Im interested in it, unfortunately, my knowledge is not even a half of yours. I'm not sure how I can be helpful for you but if you ask me things to do, I am ready to apply them. I can try to be helpful with your assistance
Do you want me to try with the toolchain and GCC you mentioned above?
BTW I got it working once without doing any change in defconfig but I don't remember which toolchain I compiled it with. I don't get why it doesn't work when I do changes.

Categories

Resources