Difficulty flashing an End of Life Android-based Wall Panel (Kramer KT-1010SC) - Android Q&A, Help & Troubleshooting

So I have a few of these Kramer Panels which aren't supported anymore (The official webpage doesn't have them anymore but the same product here) and I want to wipe out the Kronomeet Software they got going on and install some other flavor of Android (I'm thinking Lineage OS).
To start I got adb and fastboot up and running with Aptitude.
Code:
$ adb --version
Android Debug Bridge version 1.0.41
Version 28.0.2-debian
$ fastboot --version
fastboot version 28.0.2-debian
Connecting fine with adb, and using lsusb we see
Bus 001 Device 037: ID 2207:0011 Fuzhou Rockchip Electronics Company SmartTab
Googling around that name led me to the Rockchip Wiki, which had an article on Fastboot and a bunch of open source repos
https://opensource.rock-chips.com/wiki_Fastboot
Which states: "Rockchip uses 0x2207 as its USB vendor ID. This VID is not in Google's original fastboot code. So every fastboot command has to use "-i" parameter to specify vid to fastboot."
However, running -i on fastboot gives me an invalid option error:
Code:
$ sudo fastboot -i 0x2207 devices
fastboot: invalid option -- 'i'
I also tried downloading the most recent version of the android platform tools with fastboot version 33.0.3-8952118, which gave the same results.
Doing any other fastboot command without the -i just has < waiting for any device >
So essentially, I'm trying to figure out how to load a custom rom onto it, and what my next steps try are.
Other Misc Info I've tried:
In the Developer Settings on the tablet, there's no option to enable "OEM Unlocking"
Tablet doesn't have a power button, just a switch, so no pressing power and volume at the same time.
Rockchip seems to have a TWRP image available to build, which I would like to be able to fastboot flash (https://github.com/rockchip-software/TWRP/tree/android-9.0)
There's also a development tool (https://opensource.rock-chips.com/wiki_Rkdeveloptool) that also lets you load firmware.
Using adb reboot bootloader reboots the tablet to a black empty screen, which I can then communicate with the rkdeveloptool.
In this mode, lsusb returns a new name:
Code:
$ lsusb
Bus 001 Device 038: ID 2207:320a Fuzhou Rockchip Electronics Company RK3288 in Mask ROM mode
$ ./rkdeveloptool ld
DevNo=1 Vid=0x2207,Pid=0x320a,LocationID=106 Loader
$ ./rkdeveloptool ppt
**********Partition Info(parameter)**********
NO LBA Name
00 00002000 uboot
01 00004000 misc
02 00006000 resource
03 0000E000 kernel
04 00016000 boot
05 00026000 recovery
06 00036000 backup
07 00050000 cache
08 00090000 kpanic
09 00092000 system
10 00392000 metadata
11 0039A000 radical_update
12 003BA000 userdata

Found some more useful thread, and am trying to use rkflashkit. But still struggling to find out what .img to use.
Firmware Upgrade Guide For RK3188 RK3288 RK3368 Devices
UPD: Rreflashing guide for linux Host PC added. BEFORE START What you need: 1. Image file 2. Host PC (Windows) 3. USB OTG Cable Supported host OS: 1. Windows XP (32/64bit) 2. Windows 7 (32/64bit) 3. Windows 8 (32/64bit) All manipulations I...
forum.xda-developers.com
[Q] has anyone had success flashing a RK3126 based tablet?
Hello, I've got an irulu X30 (expro 30 plus) running stock firmware, nougat 7.1.2 I've been trying to use rkflashtool in linux and androidtool in windows. Both programs can report some device info and read partitions, the img files created...
forum.xda-developers.com

Related

Problems connecting to fastboot

Hey,
I'm trying to work around with Linux on my Folio a little bit..
I compiled a kernel and build a boot.img and put it into an update.zip..
This works quite nicely but after updating the boot on the tablet the folio reboots and after the "Toshiba loading screen" the display becomes black and nothing else happens...
So I would like to enter fastboot mode to boot my compiled image easier by
Code:
./fastboot -c "blabla" zImage
...
But when my tablet is in fastboot mode ("Starting fastboot usb download protocol.." appears on the screen) I can't find it when I type:
Code:
./fastboot devices
I also tried this as root but nothing happens.
But lsusb shows my folio:
Code:
Bus 002 Device 012: ID 0955:7000 NVidia Corp.
I'm working in Ubuntu 10.04 64bit with ia32-libs installed!
Also tried to connect on my Windows 7 Desktop PC.
The drivers are installed correctly after adding the lines to the .inf file.
But my Folio100 doesn't appear in fastboot devices too..
Hope you can tell me what I can do to connect to my Folio using fastboot..
Greetz
Philipp
//Edit:
Also tried it on WinXP.. But it doesnt work too..
BTW: ADB-Shell works, so I think there is no problem with usb..
You need a recent version of fastboot, best take the one that comes precompiled with the android sdk. The fastboot binary that is still distributed by htc here does not work.
Also don't forget to set the right udev rules (http://developer.android.com/guide/developing/device.html).
I used the fastboot binary from Nvidia's Linux4Tegra package...
I just downloaded the Android SDK again, but there is no precompiled fastboot binary..
I guess the problem is that I'm using 64bit Linux.. I'm also not able to build the fastboot binary...
I used this udev rule:
Code:
SUBSYSTEM=="USB", SYSFS{idVendor}=="0955", MODE="0666", OWNER="philipp"
I guess this should work for my Device...
I took the vendor id from lsusb...
Thanks for your post.. I'm not at home atm, but I will go on trying later and edit this post..
Now that you mention it, the binary did not come with the sdk, but was compiled as a side product when I compiled cyanogenmod for my old g1. I am also on 64bit ubuntu (10.10), when I have some time I can upload the binary here, but it may take some time (quite busy this weekend).
Udev rule looks fine. If adb works, fastboot (correct binary) should also do.
Shame on me..
Looked at the source code of the fastboot binary and saw that the USB vendor id of Nvidia is not implemented into the source of fastboot >_<
And I also wasn't using -i parameter :-!
Sorry for taking your time^^
But now I'm still having problems with compiling a working kernel..
My kernel doesn't work on the Folio..
The display simply becomes black and nothing happens..
And I'm not able to compile this kernel correctly:
https://github.com/tsh/folio100
I'm trying to make using the following command:
make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j2
and the config provided in the config.gz but I always get this error:
Code:
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h: In function '_iovmm_client_lock':
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:60:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:60:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:80:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:80:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h: In function 'iovmm_block_put':
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h: In function 'tegra_iovmm_area_get':
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:42:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:42:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h: In function 'tegra_iovmm_find_area_get':
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:42:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:42:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h: In function 'tegra_iovmm_client_unlock':
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h: In function 'tegra_iovmm_free_client':
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: error: output number 2 not directly addressable
/media/data/kernel_source/folio100/arch/arm/include/asm/atomic.h:98:2: warning: use of memory input without lvalue in asm operand 5 is deprecated
I just like to know which kernel was used by DerArtem in his sdmmc/usb-update.zip..
This works for me, but then I'm having problems loading the kernel modules...
What toolchain (i.e. C compiler) are you using. arm-none-eabi- is not within (my) the source tree
For the kernel builds I do, I use <mvidia-android-source>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/
Note, that the black screen is a known issue with FolioMod 1.4.
The kernel will only work on pre 1.4 versions of the Mod.
Okay I got it now =)
Simply replaced the Header file (atomic.h) with the header-file of the original Linux kernel source for arm and now it works and I'm also able to boot normally (with output on screen)
Do you already got the wifi module running?
I checked out the git source @ nvidia and compiled the kernel module for my kernel.
I'm also able to install it via insmod, but the wifi interface doesn't appear in if/iwconfig..
°EraZoR° said:
Shame on me..
Looked at the source code of the fastboot binary and saw that the USB vendor id of Nvidia is not implemented into the source of fastboot >_<
And I also wasn't using -i parameter :-!
Sorry for taking your time^^
Click to expand...
Click to collapse
Wait a minute... I'm not that fast
Which source code did you use for compiling fastboot and how exactly did you modify it? What is it about that -i parameter?
I'm trying to do the same thing here, flashing with update.zip got pretty annoying... :-/ especially since im just trying to boot several kernels with several command lines... :-/
I used this source:
https://github.com/tsh/folio100
And fechted the asm/atomic.h from somewhere on the net...
The -i parameter is the USB-Vendor-ID..
You have to provide this parameter to tell the fastboot binary which USB device it has to use..
0x0955 is for Nvidia Tegra...
You can get this string by:
lssub
on Linux or in the Device Manager on Windows..
Im also having problems with Fastboot. I have ADB setup and working for Folio. But now device is ****ed up, i have clockwork rec. installed but when trying to flash it flashes system.img fine but when flashing boot.img it returns an error. So i would like to try and fastboot the boot.img to the device or if that fails i atleast can flash stock recovery so i can send it to toshiba. I put my device in fastboot mode, insert mini usb, computer detects Folio, I update driver to the same as ADB uses but i choose bootloader, it all goes well no error. But when writing fastboot devices in command prompt( from adb tools map) all i get is:
? fastboot
I have had my Folio like this for days now and have an open thread about it here:http://forum.xda-developers.com/showthread.php?t=1009587
I need help so if someone who has done this could point me in the right direction i would be most gratefull

[GUIDE] How to install Qualcomm PC Drivers (if you are having installation trouble)

These are the Qualcomm CDMA Technologies MSM Windows Vista 32-bit drivers for those of you who are having trouble installing the drivers. I have only noticed this problem on Windows Vista, and therefore I have created this thread.
I have only tested the below procedure on Windows Vista 32-bit.
Please note that I am not responsible for any damages caused to your windows system as a result of wrongly in putting the codes below.
Also note that following the installation of the drivers by this method may result in Test Mode being displayed on your desktop wallpaper.
Let’s get started:
1) Download, extract and place the Qualcomm folder on your desktop.
Installing the certificate:
2) Double click on “qcusbtest.cer” and open it.
3) Click on “Install Certificate.”
4) Select “Place certificate in the following stores”
5) Place the certificate in “Trusted Root Certification Authorities.”
6) Click Next, then Finish.
7) Follow steps 2 to 4
8) Place the certificate in “Trusted Publishers”
9) Click Next, then Finish.
10) Run Command Prompt as administrator (Start>Type “Command Prompt”>Right-click on command prompt and select “Run as administrator”)
In the below steps replace the red [insert] boxes with the relevant configurations of your system.
Next:
11) On command prompt type:
Code:
cd C:\Users\[COLOR="Red"][Insert Your Windows Username Here][/COLOR]\Desktop\Qualcomm CDMA Technologies MSM\Drivers
12) Then type:
Code:
PnPUtil -i -a msmdm.inf
13) You should receive a success message.
14) Repeat for the other .inf files type:
Code:
PnPUtil -i -a qcmdm.inf
and then type:
Code:
PnPUtil -i -a qcser.inf
15) Reboot your PC
Now you should have the Qualcomm CDMA Technologies MSM drivers installed.
What is it for?
ybregeon said:
What is it for?
Click to expand...
Click to collapse
How to install Qualcomm Drivers for people who are having trouble installing the drivers.
Just explain that you mean the PC drivers. Some might get confused and think you mean Qualcomm bootloaders in the phone.
Sent from my Lumia 800 using XDA Windows Phone 7 App
for xp??
ok i am with nokia lumia 710 and i am trying to write new os,but it wants this drivers "qualcomm cdma technologies msm" pls help,i am on xp,my phone have unlocked qualcomm bootloader
info
hi.
I succeeded in no way, unfortunately the third already does not settle. but Windows 7 64 bits of my system yes. May this be the trouble?
PnPUtil -i -a msmdm.inf (installed o.k.)
PnPUtil -i -a qcmdm.inf (installed o.k.)
PnPUtil -i -a qcser.inf (not installed, platform compatibility problem. )
i very sad! i flashed (my lumia 710 prototype rainbow rom with lumia 710 douwnloader. the rom is okay, but i have no call sound!!!! i want the original firmware . but nss not see the lumia help
Adrammelech said:
PnPUtil -i -a qcser.inf (not installed, platform compatibility problem. )
Click to expand...
Click to collapse
looks like you need x64 drivers...
Worked on x64 Windows 7. Thanks very much for this
hasn't worked for me, still shows up as drivers not installed in Device Manager. When I point towards the files it doesn't accept them or if I do a computer/internet search. Just says driver cannot be found.
Any ideas?
---------- Post added at 10:07 PM ---------- Previous post was at 10:03 PM ----------
RHodgett said:
hasn't worked for me, still shows up as drivers not installed in Device Manager. When I point towards the files it doesn't accept them or if I do a computer/internet search. Just says driver cannot be found.
Any ideas?
Click to expand...
Click to collapse
I should say I am running Windows 7 64bit.
Confirmed that work on Windows 8 dev preview and customers preview with Vista drivers (x86)
Hey, I've done the commands you gave.. All drivers installed correctly like you said.. But When I plug in my lumia 800 windows says it can't find the drivers
What can I do?
Yours sincereley,
Shabo09 said:
Hey, I've done the commands you gave.. All drivers installed correctly like you said.. But When I plug in my lumia 800 windows says it can't find the drivers
What can I do?
Yours sincereley,
Click to expand...
Click to collapse
does your phone come up as a flash disc in restore mode if it doesnt then you dont have a unlocked bootloader regardless if its a qualcomm, there were 2 versions from what i can gather one allows nand access and one doesnt sounds like you have the one that does not
rob:good:
I have problem only with the installation of this....
PnPUtil -i -a qcser.inf
When i try to install this, receive this message:
Can not install the drivers for any of the devices in the system: exhausted the available data (translated from italian)
I need only of this driver for flash, I have an unlocked NAND
OS Windows 7 x64
bombolo85 said:
I have problem only with the installation of this....
PnPUtil -i -a qcser.inf
When i try to install this, receive this message:
Can not install the drivers for any of the devices in the system: exhausted the available data (translated from italian)
I need only of this driver for flash, I have an unlocked NAND
OS Windows 7 x64
Click to expand...
Click to collapse
you dont need the drivers to flash put the phone into nand mode vol+ and power short vibration then plug usb, either flash in linux or in nss
rob:good:
moaster7 said:
These are the Qualcomm CDMA Technologies MSM Windows Vista 32-bit drivers for those of you who are having trouble installing the drivers. I have only noticed this problem on Windows Vista, and therefore I have created this thread.
I have only tested the below procedure on Windows Vista 32-bit.
Please note that I am not responsible for any damages caused to your windows system as a result of wrongly in putting the codes below.
Also note that following the installation of the drivers by this method may result in Test Mode being displayed on your desktop wallpaper.
Let’s get started:
1) Download, extract and place the Qualcomm folder on your desktop.
Installing the certificate:
2) Double click on “qcusbtest.cer” and open it.
3) Click on “Install Certificate.”
4) Select “Place certificate in the following stores”
5) Place the certificate in “Trusted Root Certification Authorities.”
6) Click Next, then Finish.
7) Follow steps 2 to 4
8) Place the certificate in “Trusted Publishers”
9) Click Next, then Finish.
10) Run Command Prompt as administrator (Start>Type “Command Prompt”>Right-click on command prompt and select “Run as administrator”)
In the below steps replace the red [insert] boxes with the relevant configurations of your system.
Next:
11) On command prompt type:
Code:
cd C:\Users\[COLOR="Red"][Insert Your Windows Username Here][/COLOR]\Desktop\Qualcomm CDMA Technologies MSM\Drivers
12) Then type:
Code:
PnPUtil -i -a msmdm.inf
13) You should receive a success message.
14) Repeat for the other .inf files type:
Code:
PnPUtil -i -a qcmdm.inf
and then type:
Code:
PnPUtil -i -a qcser.inf
15) Reboot your PC
Now you should have the Qualcomm CDMA Technologies MSM drivers installed.
Click to expand...
Click to collapse
---
Hello
Does anyone know why I get the following error?
Processing inf : qcmdm.inf
Adding the driver package failed : Access is denied.
Adding at least one driver package failed!
kian1234 said:
---
Hello
Does anyone know why I get the following error?
Processing inf : qcmdm.inf
Adding the driver package failed : Access is denied.
Adding at least one driver package failed!
Click to expand...
Click to collapse
Are you the admin or have the administrators rights to install drivers.
check that 1st.
I got the same 800 with Qualcom CDMA technologies MSM ... so can I flash and full unlock my 800????
I still get Certificate issues after installing your certificate.
Start command prompt as admin and type "shutdown -o -r -t 0"
disable driver signatures
Now installed drivers fine, going to restart now hope it works
Using windows 8 x64
After installed this drivers NSS pro didnt recognize my lumia 710
before driver
when i click on "READ INFO" it answer me correct
now
Checking selection...Supported(USB) interface selected.
Init connection...Done.
----------------------------------------------------------------------
Phone details:
-----------------
NCSD Version: N/A
SW Version: N/A
HW Version: N/A
IMEI: N/A
Product Code: N/A
Basic Product Code: N/A
Module Code: N/A
Production SN: N/A
Battery life: N/A
Number of Nams: N/A
Number of Mins: N/A
ESN: N/A
ESN Decoded: N/A
PRL Version: N/A
Battery Charge Capacity: N/A
Battery Full Capacity: N/A
Battery Cycle Count: N/A
Battery Temperature: N/A
Battery Voltage: N/A
Battery State of Charge: N/A
Battery Average Current: N/A
Battery Flags: N/A
Battery Standby Current: N/A
Battery MaxLoad Current: N/A
Battery Health State: N/A
Battery Nominal Capacity: N/A
Battery Remaining Capacity: N/A
any suggestions?
regards
moaster7 said:
These are the Qualcomm CDMA Technologies MSM Windows Vista 32-bit drivers for those of you who are having trouble installing the drivers. I have only noticed this problem on Windows Vista, and therefore I have created this thread.
I have only tested the below procedure on Windows Vista 32-bit.
Please note that I am not responsible for any damages caused to your windows system as a result of wrongly in putting the codes below.
Also note that following the installation of the drivers by this method may result in Test Mode being displayed on your desktop wallpaper.
Let’s get started:
1) Download, extract and place the Qualcomm folder on your desktop.
Installing the certificate:
2) Double click on “qcusbtest.cer” and open it.
3) Click on “Install Certificate.”
4) Select “Place certificate in the following stores”
5) Place the certificate in “Trusted Root Certification Authorities.”
6) Click Next, then Finish.
7) Follow steps 2 to 4
8) Place the certificate in “Trusted Publishers”
9) Click Next, then Finish.
10) Run Command Prompt as administrator (Start>Type “Command Prompt”>Right-click on command prompt and select “Run as administrator”)
In the below steps replace the red [insert] boxes with the relevant configurations of your system.
Next:
11) On command prompt type:
Code:
cd C:\Users\[COLOR="Red"][Insert Your Windows Username Here][/COLOR]\Desktop\Qualcomm CDMA Technologies MSM\Drivers
12) Then type:
Code:
PnPUtil -i -a msmdm.inf
13) You should receive a success message.
14) Repeat for the other .inf files type:
Code:
PnPUtil -i -a qcmdm.inf
and then type:
Code:
PnPUtil -i -a qcser.inf
15) Reboot your PC
Now you should have the Qualcomm CDMA Technologies MSM drivers installed.
Click to expand...
Click to collapse
seem to be having a problem while installing those inf files through cmd
getting the following message -
Adding the driver package failed : Invalid INF passed as parameter.
Total attempted: 0
Number successfully imported: 0

ADB sees device but cannot connect

Hello, I m after some help.
I ve got an Allwinner A20 tv box, it worked fine for a few months then one day, after being on (but idle) for a few hours, I noticed the screen was blank but the light on the front was blue (indicating it was on, red is standby). It would not respond to the remote control or to anything, so I unplugged it and since then it will not boot and the screen is blank, the red light will light up but that is it. I ve eliminated the remote controller not working, but I cant boot the device.
So I ve tried connecting via ADB (with Ubuntu) but I cant get the device to show up after typing "adb devices".
I can get the vendor id and device id and I ve added it and the manufacturer to udev/modeswitch devices, but when I type "sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W"
I get the following error:
~/Android/sdk/platform-tools$ sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1f3a
DefaultProduct= 0xefe8
SierraMode=1
NeedResponse=0
Look for default devices ...
found USB ID 048d:1336
found USB ID 1d6b:0002
found USB ID 19a8:2036
found USB ID 1f3a:efe8
vendor ID matched
product ID matched
found USB ID 1d6b:0001
found USB ID 062a:0102
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 004 on bus 003
Current configuration number is 1
Use interface number 0
USB description data (for identification)
-------------------------
Manufacturer: not provided
Product: not provided
Serial No.: not provided
-------------------------
Send Sierra control message
Error: Sierra control message failed (error -7). Abort
I ve searched Google for the error code but I cannot find anything.
The device was rooted and USB debugging was on.
Any help would really be appreciated.
Thanks

Android O

Sony releases AOSP Android 8.0 Oreo on Open Devices program
Can anyone build this for Xperia x someone is going to have to
Download the source code which is 20gb
Developer World
Menu
Developer WorldOpen DevicesAOSP build instructionsHow to build AOSP Oreo for unlocked Xperia devices
How to build AOSP Oreo for unlocked Xperia devices
On this page you can find guides on how to use our AOSP device configurations to build your own version of Android Oreo, and flash it on your unlocked Xperia device. For some of the Xperia devices, we provide Android Open Source Project (AOSP) device configurations on GitHub. This means that the software is open for you as a developer to use and contribute to. Please note that the software is not intended for daily usage and there are important limitations. For example, there could be stability issues, and important functions may be disabled.
Build AOSP Oreo 8.0 kernel 4.4
This guide assumes you run Ubuntu (we used Ubuntu 14.04 LTS), but it should work in a similar way on any Linux-based system. To use these instructions, you should be familiar with Android development. Follow the steps below to build Android Oreo on an unlocked Xperia device. The instructions will guide you through each step from how to prepare your environment and install all necessary tools to downloading and configuring the code, before you can finally build AOSP images and flash them on your device.
Prepare your Java environment
To prevent errors generated by having the wrong version of Java installed on your computer, we will start by removing any conflicting Java version and adding the correct version. Java 8 is needed to build Android 8.x.x.
On your computer: In a terminal window, enter the following command:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
A guide will appear on the screen. Follow the instructions to remove Java.
Once Java is removed, install the correct version of Java by entering the following commands in a terminal window:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
java -version
You should now see something similar to the following in your terminal window:
java version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
Install the necessary tools to make an Android build
To be able to build the images that you will later flash on your device, you need to install a set of software packages and libraries which give you the tools to compile source code into binary files that can run on your device.
In a terminal window, enter the following commands, all at once:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
Now you have the tools you need to compile and build a flashable AOSP image. Follow the steps below to learn how to do this.
Download Repo tool and set PATH
In order to access and use the source code available on the Sonyxperiadev GitHub, you need to install the Repo tool that is provided by Google.
In a terminal window, enter the following commands to download and install Repo, and set the right access rules for it:
mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Open the bashrc file included in the repo tool:
sudo nano ~/.bashrc
To set the right path for your local bin folder, paste the following code to a new line at the very bottom of the bashrc file, and then save the file using Ctrl+X:
export PATH=~/bin:$PATH
Reload bash variables to include the new path:
source ~/.bashrc
Now you have all the tools you need and can move on to initializing the AOSP code and Xperia device configurations. Learn how to do this below!
Initialise the AOSP tree
The next step is to create a folder on your computer, and then download the Android source code to it. Follow the steps below to do this.
In a terminal window, enter the following commands:
mkdir ~/android
cd ~/android
repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r15
Note! The downloaded data is around 20 GB, and for a successful build you need 100 GB free hard disk space. Depending on your Internet connection, it can take quite a long time to download the source code. When the download has finished you have the basic AOSP source code on your computer.
Clone the local_manifests from GitHub using the following commands:
cd .repo
git clone https://github.com/sonyxperiadev/local_manifests
cd local_manifests
git checkout master
cd ../..
Note! These repos include a precompiled kernel. If you want to change or improve the kernel, you can recompile a new kernel. The new kernel binary should be placed in the corresponding device repository along with new kernel modules for wireless hardware. For more information, see the page how to rebuild kernels for flagship Xperia devices.
To download the code into the device repos created above, run the command:
repo sync
Cherry-pick the upstream patches
./repo_update.sh
Build AOSP images that can be flashed
Now you are ready to build AOSP images that can be flashed to a device. To do this, you have to point out your specific device and then start building the images.
Enter the following commands:
source build/envsetup.sh && lunch
When prompted, pick the number corresponding to your device in the list displayed and press enter.
To start the build, type:
make –j <insert the cpu thread number of your computer>
This step will take a long time. It may take up to several hours, so go grab a coffee or play a game while you wait. When it’s done, AOSP images that can be flashed to a device will be ready.
Flash AOSP image to your device
Before you flash the images that you built in the previous step, you must make sure your device is unlocked through Sony’s unlock boot loader service. Then you can flash the AOSP images on your device by following these steps:
On your device: Connect the device to your computer in Fastboot mode, by pressing volume up while inserting the USB cable. When the device is in Fastboot mode, the LED on the device will be illuminated in blue.
On your computer: Flash the boot, system and userdata images by entering the following commands in a terminal window:
fastboot –S 256M flash boot out/target/product/<device>/boot.img
fastboot –S 256M flash system out/target/product/<device>/system.img
fastboot –S 256M flash userdata out/target/product/<device>/userdata.img
Note!It’s not necessary to re-flash the userdata every time you flash your device, but sometimes the new software is incompatible with previous content, which might result in a device that doesn’t boot. If you experience this, try to re-flash only the userdata again.
Now when you disconnect your device from the computer and start it, it will be running AOSP.
Flash vendor image to your device
Download the vendor image corresponding your device from List of devices and resources.
Unpack the vendor zip file to obtain the vendor image.
unzip SW_binaries_for_Xperia_AOSP_O_MR0_4.4_<release version>_<platform>.zip
Note: Release version should be equivalent to the latest downloaded image version, and platform should match your device.
On your device: Connect the device to your computer in Fastboot mode, by pressing volume up while inserting the USB cable. When the device is in Fastboot mode, the LED on the device will be illuminated in blue.
On your computer: Flash the vendor image by entering the following commands in a terminal window:
fastboot flash oem SW_binaries_for_Xperia_AOSP_O_MR0_4.4_<release version>_<platform>.img
Note: Release version should be equivalent to the latest downloaded image version, and platform should match your device.
We hope this tutorial will help you get started building your own version of Android for Xperia devices. Feel free to contribute your work back to our repositories on our Sonyxperiadev GitHub account. We will review and merge your code as soon as possible.
Legal
Copyright © 2017 Sony Mobile Communications Inc. All rights reserved.
Subscribe to newsletter
Follow us
YouTube
Twitter

Signing release for "fastboot update"?

Device in question, although likely not relevant to the issue I am having: Pixel 2 XL (Taimen). Let me know if there's any info I may have missed sharing that could help solve this.
My overarching goals here are:
1. Build vanilla AOSP "user" variant without root or any other additions
2. Sign the build with my own release keys
3. Be able to git-checkout release tags at a later time, build again, and produce OTA updates for this vanilla AOSP build
So far, I have been able to successfully build the latest release and flash it to my device using:
Code:
fastboot flashall
The device boots and runs as you would expect.
However, that is all using the test-key. I have followed the official documentation for generating release keys:
hxxps://source.android[.]com/devices/tech/ota/sign_builds#release-keys
The same documentation page provides the following listing for generating the release image:
Code:
make dist
./build/make/tools/releasetools/sign_target_files_apks \
-o \ # explained in the next section
--default_key_mappings ~/.android-certs out/dist/*-target_files-*.zip \
signed-target_files.zip
Apparently SignApk.jar doesn't work with password-encrypted keys (it throws an exception then swallows it which causes the whole thing to fail at a later point), and signing the APKs in the target files ZIP fails. Fine, I'm willing to use an unencrypted key for testing this project.
So I successfully get a signed-target_files.zip.
Lastly, the documentation provides the following for producing the release image:
Code:
./build/make/tools/releasetools/img_from_target_files signed-target-files.zip signed-img.zip
This also works successfully (minus the typo with the filename, switching the '_' character for '-'), so I use this to install:
Code:
fastboot update -w signed-img.zip
Then I get symptoms of the problem:
1. Warning that the bootloader is unlocked (fine)
2. White screen with "Google" logo
3. Reboot to bootloader
I never see the "android" splash screen after 2. like when I
Code:
fastboot flashall
to install the test-key version which does work.
So something else that I decided to try was to create an "unsigned-img.zip." I basically used img_from_target_files on the original, unsigned target_files.zip. and did a
Code:
fastboot update -w unsigned-img.zip
. This also booted successfully.
=====================
To recap:
1. Building is successful
2. "fastboot flashall" is successful
3. "fastboot update unsigned-img.zip" is successful
4. "fastboot update signed-img.zip" is NOT successful and always reboots back to the bootloader
Is there something I'm missing with regards to the image signing? If I'm doing this and having this issue on an unmodified AOSP branch, shouldn't everyone else be having these signing issues, as well?
Any help is appreciated.
It worked for me without -w argument:
Code:
fastboot update signed-img.zip

Categories

Resources