yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] barrmulio:
we would want a separate thread to discuss this, why don't you open one in general or q&a and we can take it from here

i'd have to see a working port on ics to see if it's feasible

--

on a thread related note, i've been building aosp/cm/hyrbrid roms with solutions from other devices, trying to see where things are working and failing...i think i have a pretty good sense of some things that we just overlooked (e.g. the fact the nexus 7 uses tvdpi and those drawable/layout/xml folders have none of the tablet info in them! no wonder it keeps fc'ing)
[Nexus 7 Android Development] Tapek-AU:
It definitely works on ICS, several ROMs successfully cooked it in to ICS for a few different devices, but i'm not sure if a 100% stable version was ever released..i have created a thread in Q&A as requested to gauge interest and find out if it's even possible. Sorry about the off-topicness!
[Nexus 7 Android Development] neilrl79:
Here is a quote from a pm I had from lithium76 when i asked how he got full tablet mode on his kindle fire rom, I hope it means more to you than it does to me.

Lithium79-

"I had to edit the source code where it decides which UI to load based on the smallest dimension between width and height. If it is less than 720dp then it would use the phone UI. I changed that so it would use the tablet UI instead and then I had to add some missing resources to SystemUI and framework."

---------- Post added at 07:41 AM ---------- Previous post was at 07:34 AM ----------

Can we pull systemui.apk and framework from the fire rom and plug that in, or is there too much different between them?
[Nexus 7 Android Development] aaronpoweruser:
That makes perfect sense I was looking over the code and it was so similar I couldn't figure out why it wasn't working.
[Nexus 7 Android Development] barrmulio:
yep, he gave me similar advice

so to translate - the 'source code' is what this thread started with (PhoneWindowManager), and now we just need to get the res files put into SystemUI properly

i have a bootable port from lithium's KF build from his git, systemui is still force closing due to missing resources, but it does boot and the settings/ui options are togglng
[Nexus 7 Android Development] zZDave_Stud:
Has anyone seen this over in the original dev section? This Rom has the ability to toggle between tablet and hybrid UI without a DPI change. Just thought I would let you guys know so that you don't have to spend anymore time on this project.

http://xdaforums.com/showthread.php?t=1788518
[Nexus 7 Android Development] cdesai:
I linked the commits enabling this functionality many posts back, and while it isn't the complete solution, it does work :)

Got an idea about toggling it on boot so that the actual tablet ui is loaded, but not sure if it can be done on the fly in a clean way, looking into it. :)
[Nexus 7 Android Development] barrmulio:
that's a great rom ,i used to alternate between that one, hashcodes and lithium76's a lot on my kf before i got a n7

we'll probably still offer something for folks wanting to stay close to aosp rather than cm
[Nexus 7 Android Development] zZDave_Stud:
alright good to know! glad im seeing all this development for this device. i'm planning on purchasing it when i save enough money (need like $40) so i've been checking on this forum quite often.

---------- Post added at 12:29 PM ---------- Previous post was at 12:27 PM ----------

well if possible in settings you could have it where if you would set toggle tablet ui, upon the next boot, the tablet ui would be loaded. if you toggled hybrid ui, the hybrid ui would be loaded upon boot. so all people would have to do is reboot their device to switch ui's, which to me is quick and on the fly. is this feasible?
[Nexus 7 Android Development] barrmulio:
has anyone found a working process for systemUI decompiling with JB? i tried the other threads and still getting errors with apktool 1.4.3 even after copying over the framework-res files. I can 'if' framework-res and into framework/1.apk, and decompile framework-res just fine with 1.4.2, but then when i try to decompile SystemUI with either .2 or .3 i get four png decode errors leading to other encode errors

This is the current logcat with SystemUI errors when booting up - any help appreciated

http://pastebin.com/YwCQBbJm
[Nexus 7 Android Development] Rovman:
Just wanted to just say this would be ideal for me also. I'm not at all interested in swapping "on the fly" and i'd bet most others aren't either. Those that are interested in tablet UI, probably just want to be in tablet mode always.
[Nexus 7 Android Development] MWBehr:
Try removing the classes.dex from the apk before decompling.
[Nexus 7 Android Development] barrmulio:
sorry i wasn't clear, i did try that (make it better but still has errors), thanks tho
[Nexus 7 Android Development] MWBehr:
Hmm...well I do use wanam's modded apk manager package for ICS, though I thought it was only 1.43 that simply has the extra java stuff removed (makes it function like 1.42 with the updates of 1.43). Not really sure why your method wouldn't work as long as you're swapping between 1.42 and 1.43 for decompile/recompile, but here's the apk manager I use if you want to try that.

I know for sure that his apk manager will decompile the odex'd SystemUI.apk anyway.
[Nexus 7 Android Development] barrmulio:
i need the special 'magic values' - the apktool from your link works!
[Nexus 7 Android Development] MWBehr:
Good to hear. I'm assuming you're asking someone else for the 'magic values' as I have no idea what you're talking about :laugh:
[Nexus 7 Android Development] barrmulio:
lol..no man it was from your link: 3. Hacked Apktool 1.4.3 (new magic values)

getting closer...no fc on systemui, but also no interface

the weird thing is the /res is built as tvdpi, but when decompiled it will decompile to 213dpi
[Nexus 7 Android Development] MWBehr:
Ah, gotcha lol. It's normal for the drawable and layout folders to be renamed in the process, couldn't tell you exactly why.
[Nexus 7 Android Development] Gunthermic:
Dont want to side track this valuable thread.But I decompile using 1.4.3 alll apk's. However I dont get the tvdpi. All my stuff gets to decompile as hdpi and hdpi213. All my images are in hdpi folder.

The key is the aapt.exe version your using in my experiance. Mine is still using the one from 01/08/2012 i.e Api 15..
[Nexus 7 Android Development] barrmulio:
right on, but even with 1.4.3 it was causing errors - MWBehr's link to wanam's modded 1.4.3 was the answer.

looks like getting hdpi-213 is normal, seems to be how aapt/apktool interprets the tvdpi folder
[Nexus 7 Android Development] barrmulio:
shifting focus today from missing framework/res files to more mundane java code

i have been able to successfully boot up with a tablet ui in launcher with modified frameworks but it will not drive true tablet ui (ie no dual pane)

reading through all the google resources tvdpi is a true hybrid resolution, and it defaults to sw600 res when files do not exist

looking into WindowManagerService (which rolls up to services.jar) - may yield a hack to trick the system to use the sw720 res folders instead

private void computeSizeRangesAndScreenLayout(boolean rotated, int dw, int dh,
float density, Configuration outConfig) {
// We need to determine the smallest width that will occur under normal
// operation. To this, start with the base screen size and compute the
// width under the different possible rotations. We need to un-rotate
// the current screen dimensions before doing this.
int unrotDw, unrotDh;
if (rotated) {
unrotDw = dh;
unrotDh = dw;
} else {
unrotDw = dw;
unrotDh = dh;
}
mSmallestDisplayWidth = 1<<30;
mSmallestDisplayHeight = 1<<30;
mLargestDisplayWidth = 0;
mLargestDisplayHeight = 0;
adjustDisplaySizeRanges(Surface.ROTATION_0, unrotDw, unrotDh);
adjustDisplaySizeRanges(Surface.ROTATION_90, unrotDh, unrotDw);
adjustDisplaySizeRanges(Surface.ROTATION_180, unrotDw, unrotDh);
adjustDisplaySizeRanges(Surface.ROTATION_270, unrotDh, unrotDw);
int sl = Configuration.SCREENLAYOUT_SIZE_XLARGE
| Configuration.SCREENLAYOUT_LONG_YES;
sl = reduceConfigLayout(sl, Surface.ROTATION_0, density, unrotDw, unrotDh);
sl = reduceConfigLayout(sl, Surface.ROTATION_90, density, unrotDh, unrotDw);
sl = reduceConfigLayout(sl, Surface.ROTATION_180, density, unrotDw, unrotDh);
sl = reduceConfigLayout(sl, Surface.ROTATION_270, density, unrotDh, unrotDw);
outConfig.smallestScreenWidthDp = (int)(mSmallestDisplayWidth / density);
outConfig.screenLayout = sl;
}
[Nexus 7 Android Development] Saint Wacko:
I think I'd be fine with just the launcher tablet UI. That includes the combined status bar, right?

Then again, I've never used this dual pane thing, so I don't know what I'm missing out on.
[Nexus 7 Android Development] barrmulio:
and...boom goes the dynamite

here you have it folks - tablet ui - dual pane apps (see settings in portrait), 213 dpi, and bottom navbar

if you look at settings, you'll understand why google wanted a hybrid ui (some elements like the wifi toggle overlap words)

will update op tonight with details and patch files (need to patch android services to force tablet ui, and services.jar to trick system into thinking it's a 720p device - which was a bit silly because it is)...no toggle at this point, i'll need some help with that

(launcher is apex in case folks wonder why it's a bit different)
[Nexus 7 Android Development] neilrl79:
Awesome can't wait! As for the overlap on some of the settings, it does the same thing on the kindle fire but I exclusively use mine in landscape unless forced onto portrait by an app so it's of little concern to me.
[Nexus 7 Android Development] Jiggavolt:
All hail!
[Nexus 7 Android Development] Saint Wacko:
Oh, that's wonderful! Thanks for doing this. Can't wait to be able to put it on my N7. Will you also make a revert patch available?

And what's the clock/weather/battery you have there?
[Nexus 7 Android Development] redmonke255:
A god among men. Thank you.
[Nexus 7 Android Development] barrmulio:
you're welcome

one more clock (chrome rings theme is in the free one too), and then add the widget
[Nexus 7 Android Development] keda51:
What rom will we need to have installed for this to patch onto? Stock?
[Nexus 7 Android Development] barrmulio:
willing testers:

AOSP 4.1.1 compiled, tested on de-odexed JRO0D, need recovery (CWM or TWRP) installed

this is hardcoded to tablet mode by changing mHasSystemNavBar = true; mNavigationBarCanMove = false; in PhoneWindowManager.java and outConfig.smallestScreenWidthDp=721; in WindowManagerService.java and compiling both files from aosp

please logcat any issues, or post back if succesful

disclaimer

- do not do this if you don't know adb, please wait for a flashable version (watch op)

- must be deodexed

- do not do this if the instructions below make no sense to you

- do not do this if you're not comfortable potentially having to factory restore your shiny new Nexus 7

pre-req:

0. you must be deodexed (doesn't have to be my files if you deodexed yourself)

steps:

1. do full system backup in recovery

2. backup services.jar and android.policy.jar

my way to backup is adb shell, cd /system/framework, and cat android.policy.jar > android.policy.bak and cat services.jar > services.bak

3. overwrite /system/framework/android.policy.jar and /system/framework/services.jar with files below using adb

adb shell, rm /system/framework/android.policy.jar, rm /system/framework/services.jar, exit

adb push services.jar /system/framework/services.jar, adb push android.policy.jar /system/framework/android.services.jar

restore

1. just adb reboot recovery, rm services.jar and android.policy.jar from /framework, and cat the two files back

please send logcats of any non-boot situations

UPDATE: files pulled - use the flash zip from op Thank you all for reporting issues
[Nexus 7 Android Development] barrmulio:
made for aosp, will be posting fuller instructions in op for rom developers to do what they will with it

btw, i tested several other dpi settings and all seem ok - 180, 200, 220, 240
[Nexus 7 Android Development] DroidHam:
Anyone test this? Will it work on the SGT7? I wanna try
[Nexus 7 Android Development] barrmulio:
you may want to wait until cdesai takes a look, i'm pretty sure this may conflict with their current implementation of navbars
[Nexus 7 Android Development] platinumandroid:
As soon as I get sometime today I will test and log for you
[Nexus 7 Android Development] mwalt2:
So you only need to change 3 lines to get it to do that? Great job :).
[Nexus 7 Android Development] pHaez:
worked great. Thanks.
[Nexus 7 Android Development] mwalt2:
How do apps like play store look? Is the text cut off? I won't be able to play around with it until tonight and I'm curious :).
[Nexus 7 Android Development] DroidHam:
Can't wait for a flashable zip
[Nexus 7 Android Development] pHaez:
Play Store looks the same as it did before applying anything. Only differences I have seen at all are the status bar and launcher.

EDIT: Take that back. Tablet UI is there for gmail, talk, settings, etc. Everything looks fine though. Some words are cut off in portrait, but everything looks great in landscape.
[Nexus 7 Android Development] DroidHam:
Does it crate the paned settings etc?
[Nexus 7 Android Development] barrmulio:
Yep
[Nexus 7 Android Development] DroidHam:
Someone create a flashable zip for the SGT7 rom ;)
[Nexus 7 Android Development] Sudeaux:
Patch works great on MCR Jr5. Haven't run into any problems yet. :)
[Nexus 7 Android Development] DroidHam:
Any screenshots of the sweetness?
[Nexus 7 Android Development] DroidHam:
think im going to do a nandroid and try doing this on SGT7
[Nexus 7 Android Development] DroidHam:
Getting this and then a bootloop
[Nexus 7 Android Development] pHaez:
Here you go... https://plus.google.com/u/0/108411013059206025351/posts/P4BCAhiD5Ba

Is anybody else that has tried this getting FC when trying to open dropbox?
[Nexus 7 Android Development] DroidHam:
ive been getting FC since switching to SGT7 last night and changing my DPI
[Nexus 7 Android Development] neilrl79:
I actually had a download of Jr5 on my sd that I hadn't tried flashing yet so i just replaced the the 2 files in the zip and dirty flashed(cache wipe only) over SGT7 and everything seems to be good.

---------- Post added at 05:21 PM ---------- Previous post was at 05:20 PM ----------

Yeah, dropbox f/c on me too.
[Nexus 7 Android Development] DroidHam:
I also was able to add those 2 files into the original rom zip and flash it, worked fine, but for some reason i prefer SGT7 with a 170 DPI.

Love being able to move my buttons around and the smaller icons makes me feel less cramped and like a phone
[Nexus 7 Android Development] barrmulio:
can you guys clear dalvik and cache and try again please?

pHaez, are you on a stock rom ? neilrl79, yours fc on sgt7 ?

i dont have any dropbox issues on my end (it's how i uploaded the screenshots...)
[Nexus 7 Android Development] neilrl79:
No mine is on MoDaCo Jr5. I was experimenting with adding your patch files to a zip of a rom I had already downloaded, then flashing the zip in recovery. Aside from dropbox everything else seems to be golden.

---------- Post added at 06:20 PM ---------- Previous post was at 06:13 PM ----------

Dalvik wipe resulted in the same dropbox f/c. I'll try a straight deodexed aosp rom and see how that works for me.
[Nexus 7 Android Development] barrmulio:
i'll try jr5 to see if i can replicate as well
[Nexus 7 Android Development] MWBehr:
lol. You guys should really start by mentioning any variations from the intended use of a patch or rom before submitting bug reports.

Ya, ideally I'd like to find a way to change the ui mode based on landscape or portrait. That's a better "hybrid" ui to me.
[Nexus 7 Android Development] barrmulio:
yes please do!!

i actually had the same thought...once this moves away from a hardcoded hack to variables with settings menu, it's possible that we can just have the rotation event trigger the same code as the settings menu would have...maybe we'll have standard mode, hybrid mode, tablet mode
[Nexus 7 Android Development] pHaez:
I am on stock rooted JRDO03D. I even wiped everything, did a clean install and then replaced the patched files.
[Nexus 7 Android Development] neilrl79:
Actually i did...
[Nexus 7 Android Development] barrmulio:
you did deodex right?
[Nexus 7 Android Development] pHaez:
Correct. Sorry, forgot to mention that.
[Nexus 7 Android Development] barrmulio:
ok i think i replicated the issue with dropbox on both stock and modaco r5 - neilrl79 and pHaez, can you confirm that you had not yet signed in?

dropbox works if the account is already present, but not after download/pre-sign-in or after deleting the account in settings
[Nexus 7 Android Development] neilrl79:
You actually quoted me explaining that i varied from intended use, I was simply responding to someone mentioning that dropbox was force closing on them. Perhaps you should read what you are quoting.
[Nexus 7 Android Development] pHaez:
I can confirm that I had not yet signed in.
[Nexus 7 Android Development] neilrl79:
yeah i had restored dropbox from a titanium back up, after a full wipe when trying to figure out my unrelated wifi issue.
[Nexus 7 Android Development] molesarecoming:
as soon as a cm10 is out paranoidandroid will come to nexus7. it has all these things sorted out to perfection. it doesnt touch dpi for a long time now, it can of course set the phone in all its three modes, but does it proper by being capable of setting individual apps. "tablet mode" then is nothing more than defining systemUI to mode 3. in the same way you scale and project every possible app, widget and systemcomponent. things run in whatever size you defined and whatever layoutmode you prefer. system always stays on its native dpi. its been ported to jb, just waiting for a proper rom base.
[Nexus 7 Android Development] barrmulio:
looking forward to it! and yes, definitely a more elegant and customizable solution

but this solution doesn't manipulate dpi either, it's still at native 213, just forcing the sw720 framework and SystemNavBar to true despite tvdpi
[Nexus 7 Android Development] G1_enthusiast:
hmmm i'm getting a read only access...when try to copy...did you guys do this in bootloader?
[Nexus 7 Android Development] barrmulio:
recovery

otherwise you need to mount system as rw
[Nexus 7 Android Development] neilrl79:
barmulio, I tested and can confirm your finding that if you are already signed into dropbox it will work fine.
[Nexus 7 Android Development] barrmulio:
thx for posting back!
[Nexus 7 Android Development] G1_enthusiast:
i booted into clockworkmod recovery, try adb shell, it wouldnt even read the command

---------- Post added at 01:41 AM ---------- Previous post was at 01:32 AM ----------

nvm i'm a dummy, i got it to work, thanks.

---------- Post added at 01:52 AM ---------- Previous post was at 01:41 AM ----------

in case ur **** dint boot, (mine dint cause i wipe cache, which probaly was a bad idea) press power button and hold down, then select recovery. OP please put this in front.
[Nexus 7 Android Development] barrmulio:
you wiped cache and had a problem??
[Nexus 7 Android Development] redmonke255:
How did you add them? I've tried with 7 zip and with solid explorer and each time I get the same screen.

I also get the same screen when I adb push them. Just says "complete action using" and then bootloops.
[Nexus 7 Android Development] neilrl79:
I did it through astro file manager.
[Nexus 7 Android Development] redmonke255:
Which ROM? Maybe it's because I'm using jellybro euroskank?
[Nexus 7 Android Development] G1_enthusiast:
actually could be several issue, i do have a different kernel, the motley kernel gonna try without the kernel now.

---------- Post added at 02:56 AM ---------- Previous post was at 02:50 AM ----------

maybe it's the rom? i'm using modaco JC5 wth...
[Sony Ericsson Xperia Neo, Pro] rajxelton:
I have a problem here. I was using nightelf oc kernel with JJ hybrid rom before. Then i decided to switch to KA21.1 latest.

Earlier i had tried to install KA18 and KA19 on my device but dont know why i faced some bugs so i quit it.

To install KA21.1 I first decided to install Official ICS 4.0.4. as a necessity to install KA21.1 device must have any 4.0.4 rom.

I flashed 4.0.4 using flashtool.

then I tried to install superuser. but got errors. I googled the issue and found the solution to install SU and CWM in latest 4.0.4 here .

after that i tried to flash KA21.1 in recovery mod. It was successfully installed and asked to reboot. After reboot device stucked at the Sony logo.

I re-tried the whole procedure from the beginning hoping I must have done some mistake. But the result was as it was.

Then I tried to repair my phone and update it through PCC. But at the end of its second step (2. Prepare), I got en error " Installation error - Unable to install or start phone software update components."

I again googled the problem and saw that SUS was helpful for some people who faced same problem. Then I tried SUS too. But It was also waste. SUS crashes after asking me to select my device.

Please Help. I just wanted to go for an light and fast rom.

Any suggestions/help is welcome. i wanted my phone working again.

Rooted.

BL : Locked

Now on Official 4.0.3 with stock kernel.
[Sony Ericsson Xperia Neo, Pro] viseshprasad:
Doesn't ka require unlocked bootloader? All custom roms nowadays require that.. Except miui,jj
[Sony Ericsson Xperia Neo, Pro] rajxelton:
bingo dude! thankx for reminding that thing. actually my BL was unlocked. thats why i was unable to update it through PCC or SUS. Now its locked. updating. hope it works :)

NO.! not working. same problem.
[Sony Ericsson Xperia Neo, Pro] viseshprasad:
flash ftf maybe?
[Sony Ericsson Xperia Neo, Pro] geekynoob:
u have committed the biggest sin of using pcc or sues with ulocked bl..

flash ftf for 4.0.4 using flashtool..I guess dats ur only way out..

If not..well U hv to visit the servic center..
[Sony Ericsson Xperia Neo, Pro] Madfysh:
Not really. Only problem he would have is that pcc/seus would refuse to update his phone, with excuse of modified software.

Unfortunately he didn't even came to that step, as pcc had problems with updating components. Common problem with pcc, will be solved in a few days, or even on the same day.
[Sony Ericsson Xperia Neo, Pro] rajxelton:
flashing ftf works. but i want to have a custom rom.
[Sony Ericsson Xperia Neo, Pro] rajxelton:
what if I again flash 4.0.3 and re-install PCC/SUS on my pc and try to update again.? will it work?
[Sony Ericsson Xperia Neo, Pro] Madfysh:
1) depends how you unlocked your BL.

If official, then it won't work, if unofficial, then it will work but..

2) reinstall of pcc won't help because its not problem in your installation, but in connection to Sony's servers. But no harm in trying :)

But you do need to reinstall seus as you said it crashed even when selecting device (you mean from phone list?).
[Sony Ericsson Xperia Neo, Pro] rajxelton:
yea! it crashes automatically after i choose my phone from the list. and i have unlocked BL official way. But locked it using this. It says re-locking this way can redeem back warranty and also will be able to update using PCC/SUS.
[Sony Ericsson Xperia Neo, Pro] motorazrv3:
you already had an unlocked bootloader so why didn't you install a compatible ics 4.0.4 kernel with root and cwm. After that flash sonys 4.0.4 ics via ftf file and you are done. You got you base to install that ka21.1 rom. That doesn't work?

Gesendet von meinem MT11i mit Tapatalk 2
[Sony Ericsson Xperia Neo, Pro] mangatparamveer:
There is not any "sin" in doing this. I have tried this many times. The thing is that whenever someone gets its phone stuck somewhere, he tries everything to get back his phone in working condition. I have even updated my phone using sus with "unlocked" bootloader !!! :cool:
[Sony Ericsson Xperia Neo, Pro] viseshprasad:
How on earth is that possible? :confused:
[Sony Ericsson Xperia Neo, Pro] megatpanji:
+1...unlock BL,From GB updated to ICS.i used SEUS...
[Sony Ericsson Xperia Neo, Pro] Madfysh:
They unlocked it with unofficial way, with s1tool. They "forgot" to mention that:)